<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC7149 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7149.xml">
<!ENTITY RFC7426 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7426.xml">
<!ENTITY RFC8299 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8299.xml">
<!ENTITY RFC8309 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8309.xml">
<!ENTITY RFC8340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8453 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8453.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8345 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8345.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-he-idr-bgp-ls-sr-policy-diffserv-00"
     ipr="trust200902">
  <front>
    <title>Advertisement of SR Policy DiffServ using BGP Link-State</title>

    <author fullname="Xiaoming He" initials="X." surname="He">
      <organization>China Telecom</organization>

      <address>
        <email>hexm4@chinatelecom.cn</email>
      </address>
    </author>
    
    <author fullname="Xuejing Yuan" initials="X." surname="Yuan">
      <organization>China Telecom</organization>

      <address>
        <email>yuanxj2@chinatelecom.cn</email>
      </address>
    </author>

    <date year="2026"/>

    <area>IDR</area>

    <workgroup>IDR Working Group</workgroup>

    <keyword>SR Policy for DiffServ</keyword>

    <abstract>
      <t>This document defines an extension to BGP Link-State (BGP-LS) for the
   advertisement of the Differentiated Services (DiffServ) Per-Hop
   Behavior (PHB) that is bound to a Segment Routing (SR) Policy
   candidate path.  It introduces a new descriptor TLV carried in the
   SR Policy Candidate Path NLRI defined in [RFC9857]. This TLV reports
   the SR Policy candidate path to PHB binding
   that is actually installed in the data plane by a headend node. This document complements the
   control-plane signaling which conveys the desired PHB
   binding, by enabling the management or control plane to observe the actual PHB binding.</t>     
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
     <t>BGP Link-State (BGP-LS) [RFC9552] is a mechanism by which link-state
   and Traffic Engineering (TE) information is collected from a network
   and advertised to external components such as a centralized
   controller or a network management system.  BGP-LS has been extended
   to collect Segment Routing (SR) Policy information
   [RFC9857].  Specifically, [RFC9857] defines the SR Policy Candidate
   Path NLRI (NLRI Type 5) that reports, for each SR Policy candidate
   path (CP), its state, the underlying segment lists, and related
   attributes.  This allows a controller or management system to build
   a complete view of the SR Policies that are actually instantiated in
   the network.</t>

     <t>Differentiated Services (DiffServ) [RFC2475] realizes Quality of
   Service (QoS) by classifying traffic into service classes and
   applying a Per-Hop Behavior (PHB) to each class at every node
   [RFC2474].  [I-D.he-idr-bgp-sr-policy-diffserv] defines a BGP
   extension that publishes, in the southbound direction, the binding
   between an SR Policy candidate path and a DiffServ PHB.  That
   mechanism conveys the desired PHB binding from a controller or an
   egress node to a headend, which then realizes the PHB in the data
   plane by marking the DSCP (SRv6) or the TC/EXP (SR-MPLS) of the
   packets steered into the candidate path.</t>

	<t>The southbound signaling of [I-D.he-idr-bgp-sr-policy-diffserv]
   expresses an intent.  It does not, by itself, tell the management
   plane what a headend actually installed.  A headend may reject or
   ignore a PHB binding, may be provisioned with a local PHB binding
   through NETCONF/YANG or CLI, or may have synthesized a binding from
   a local policy.  Without a northbound reporting mechanism, the
   management or control plane cannot verify that the actual candidate path to PHB
   mapping in the data plane matches the intended mapping.</t>

     <t>This document closes that gap.  It defines a new descriptor TLV, the
   "SR Policy DiffServ PHB TLV", carried in the SR Policy Candidate
   Path NLRI [RFC9857].  The TLV reports the PHB binding that is
   actually installed on the headend node for the
   candidate path, i.e., the DSCP or TC values used to realize
   the PHB.  The TLV reuses the same field layout as the PHB sub-TLV of
   [I-D.he-idr-bgp-sr-policy-diffserv], so that the management or control plane can
   directly correlate the desired binding (carried southbound in BGP)
   with the actual binding (reported northbound in BGP-LS).</t>

   <t>The mechanism is intended to be independent of how the PHB binding
   was installed: whether through BGP
   [I-D.he-idr-bgp-sr-policy-diffserv], PCEP, NETCONF/YANG, or local
   configuration, a headend that implements this document reports the
   resulting candidate path to PHB binding through BGP-LS.</t>
    </section>

    <section title="Conventions">
    
     <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
     </section>

	<section title="Terminology">
      <t>Abbreviations and Notations used in this document:</t>
      <t>BGP:     	Border Gateway Protocol</t>
      <t>BGP-LS:  	BGP Link-State</t>
      <t>DSCP:     	Differentiated Services Code Point</t>      
      <t>MPLS:     	Multi-Protocol Label Switching</t>
      <t>NLRI:     	Network Layer Reachability Information</t>
      <t>PHB:		Per-Hop Behavior</t>
      <t>QoS:     	Quality of Service</t>
      <t>SR:     	Segment Routing</t>
      <t>SRH:		Segment Routing Header</t>    
      <t>SR-MPLS:   Segment Routing with the MPLS data plane</t>
      <t>SRv6:     	Segment Routing over IPv6</t>
      <t>TC:     	Traffic Class</t>
      <t>TLV:		Type-Length-Value</t>      	     	 
     </section>
    </section>
	
  <section title="SR Policy DiffServ PHB TLV">
    <t>The SR Policy DiffServ PHB TLV is an optional descriptor TLV carried in the
   SR Policy Candidate Path NLRI defined in [RFC9857].  When present, it
   reports the PHB binding that the advertising (headend) node has actually
   installed for the candidate path described by the enclosing NLRI.</t>
   
    <t> Because an SR Policy candidate
   path is bound to a single PHB at the headend, only a single instance of
   this TLV is expected per candidate path.If multiple instances are
   present, then the first valid one (i.e., not determined to be
   malformed as per Section 8.2.2 of [RFC9552]) is used and the rest are
   ignored.</t>

   <t>The PHB binding reported by this TLV is the same information that is
   conveyed southbound by the SR Policy DiffServ PHB
   sub-TLV defined in [I-D.he-idr-bgp-sr-policy-diffserv].</t>
   
    <t>The SR Policy DiffServ PHB TLV has the following format:
    <figure title="SR Policy DiffServ PHB TLV">
    <artwork>
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |          Type = TBD1          |           Length = 4          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     Flags     |   Reserved    |     DSCP      |      TC       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
    </artwork></figure></t>
    <t>Where:</t>
    <t>Type: 2 octets.  The value TBD1, to be assigned by IANA.</t>
    <t>Length: 2 octets.  Set to 4.</t>
    <t>Flags: 1 octet.  See Section 3.1.</t>
    <t>Reserved: 1 octet. MUST be set to zero on transmission and
      ignored on reception.</t>
    <t>DSCP: 1 octet.  The 6-bit DSCP value [RFC2474] used to realize
      the PHB in an SRv6 data plane, carried in the six most significant bits; the two least significant bits MUST
      be set to zero on transmission and ignored on reception.</t>
    <t> TC: 1 octet. The 3-bit TC (EXP) value [RFC5462]  used
      to realize the PHB in an SR-MPLS data plane, carried in the three most significant bits; the five least
      significant bits MUST be set to zero on transmission and ignored on reception.</t>     

    <section title="Flags">
    <t>The Flags octet is encoded identically to the Flags octet of the SR
   Policy DiffServ PHB sub-TLV in [I-D.he-idr-bgp-sr-policy-diffserv]:
    <artwork>
    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |D|T|C| Reserved|
   +-+-+-+-+-+-+-+-+
    </artwork></t>
    <t>Where:</t>
    <t>D (bit 0, most significant): DSCP valid.  Set when the DSCP field of the outer IPv6 base header
      carries a value that is actually applied in the SRv6 data plane.</t> 
    <t>T (bit 1): TC valid. Set when the TC field of the label stack entries carries a value that
      is actually applied in the SR-MPLS data plane.</t> 
    <t>C (bit 2): Copy valid.  For the SRv6 data plane, set when the DSCP value marked within the IPv6 header 
   is actually copied to the DSCP field of the outer IPv6 header of the conditioned original packets steered into the SR Policy CP with the bound PHB; 
   for the SR-MPLS data plane, set when the headend MUST directly copy the most significant 3 bits of the DSCP value marked within the IPv6 header 
   is actually copied to the TC field of the label stack entries of the conditioned original packets steered into the SR POlicy CP
   with the bound PHB.</t>
    <t>Reserved (bits 3-7): MUST be set to zero on transmission and ignored on reception.</t>
    </section>
   </section>
   
   <section title="Procedures">	
    <section title="Advertisement">
     <t>A headend node that has an SR Policy candidate path with an installed
   DiffServ PHB binding SHOULD advertise the binding by including the SR
   Policy DiffServ PHB TLV in the SR Policy Candidate Path NLRI
   [RFC9857] for that candidate path.</t>
     <t>The advertising node populates the TLV from its installed forwarding
   state, not from the message that may have configured the PHB binding:</t>
     <list style="symbols">
     <t>If the node realizes the PHB in SRv6 by writing a DSCP value to the DSCP field of the outer IPv6 base header, the
      D flag is set and the DSCP field is populated with that value.</t>
     <t>If the node realizes the PHB in SR-MPLS by writing a TC value to the TC field of the label stack entries, the
      T flag is set and the TC field is populated with that value.</t>
     <t>If the node realizes the PHB in SRv6 by copying the DSCP value marked within the IPv6 header 
     to the DSCP field of the outer IPv6 header of the original packets, the
     C flag is set and the DSCP field is populated with that value.</t>
     <t>If the node realizes the PHB in SR-MPLS by copying the most significant 3 bits of the DSCP value marked within the IPv6 header 
     to the TC field of the label stack entries of the original packets, the
     C flag is set and the TC field is populated with that value.</t>
	</list>
     
    <t>If the PHB binding of a candidate path changes, the advertising node
   re-advertises the SR Policy Candidate Path NLRI with the updated TLV,
   following the NLRI withdrawal and re-advertisement procedures of
   [RFC9552] and [RFC9857].  When the PHB binding is removed, the
   advertising node withdraws the TLV.</t> 
    <t>An implementation that supports this document MUST be prepared to
   advertise the SR Policy DiffServ PHB TLV regardless of the mechanism
   by which the PHB binding was installed (BGP
   [I-D.he-idr-bgp-sr-policy-diffserv], PCEP, NETCONF/YANG, or local
   configuration).</t> 
    </section>

    <section title="Reception and Consumption">
    <t>On receipt of an SR Policy Candidate Path NLRI carrying the SR Policy
   DiffServ PHB TLV, a BGP-LS consumer validates the encoding as
   follows:</t>
   <list style="symbols">
   <t>If the Length field is not 4, or a Reserved field is non-zero, the
      TLV is considered malformed and is ignored for the purposes of
      interpreting the PHB binding.</t>
   </list>
   
    <t>The consumer uses the reported information to maintain a map of SR
   Policy candidate path to PHB bindings.  It SHOULD be able to compare
   this actual binding against the desired binding carried by
   [I-D.he-idr-bgp-sr-policy-diffserv] and to raise an event when the
   two differ, subject to local policy.</t>
    <t>The consumer SHOULD NOT treat the reported PHB binding as an
   instruction to reconfigure the network.  The TLV is a telemetry
   mechanism; it describes what is installed, not what must be
   installed.</t>
    </section>

    <section title="Relationship to the BGP SR Policy PHB Sub-TLV">
    <t>[I-D.he-idr-bgp-sr-policy-diffserv] defines a southbound, intent-
   oriented mechanism: a controller or egress node instructs a headend
   to bind a PHB to an SR Policy candidate path.  This document defines
   a northbound, state-oriented mechanism: a headend reports the PHB
   binding it has actually installed.</t>

    <t>The two mechanisms are complementary and use the same field layout
   for the PHB binding so that desired and actual state can be compared
   directly.  They are also independent: a headend MAY report a PHB
   binding through this document even if the binding was installed by a
   means other than [I-D.he-idr-bgp-sr-policy-diffserv], and a headend
   MAY receive a PHB binding through
   [I-D.he-idr-bgp-sr-policy-diffserv] without implementing the
   reporting described here (although doing so is not recommended).</t>
    </section>
   </section>
    
  <section anchor="IANA" title="IANA Considerations">
   <section title="SR Policy DiffServ PHB TLV">
    <t>IANA is requested to make the following allocation from the "BGP-LS NLRI and Attribute TLVs"
   under the "Border Gateway Protocol - Link State (BGP-LS) Parameters" registry group:
    <artwork>
   +========+==============================+================+
   | Value  | Description                  | Reference      |
   +========+===============================================+
   | TBD1   | SR Policy DiffServ PHB       | This document  |
   +--------+------------------------------+----------------+
    </artwork></t>
    </section>

    <section title="SR Policy DiffServ PHB Flags">
    <t>This document requests to create a new registry called "SR Policy DiffServ PHB Flags"
   under the "Border Gateway Protocol - Link State (BGP-LS) Parameters"
   registry group.  The registration policy of this registry is "IETF
   Review" (see [RFC8126]).</t>
    <t>The following flags are defined:
    <artwork>
   +=====+==============================+================+
   | Bit | Description                  | Reference      |
   +=====+===============================================+
   | 0   | DSCP Flag (D-Flag)           | This document  |
   +-----+-----------------------------------------------+
   | 1   | TC Flag (T-Flag)             | This document  |
   +-----+-----------------------------------------------+
   | 2   | Copy  Flag (C-Flag)          | This document  |
   +-----+-----------------------------------------------+
   | 3-7 | Unassigned                                    |
   +-----+-----------------------------------------------+
   </artwork></t>
   </section>
  </section>

   <section anchor="scecurity" title="Security Considerations">
    <t>The extensions defined in this document distribute DiffServ PHB
   binding information through BGP-LS and are therefore subject to the
   security considerations of BGP [RFC4271], BGP-LS [RFC9552], and the
   SR Policy BGP-LS extensions [RFC9857].  In particular:</t>
   <list style="symbols">
   <t>The reported PHB binding is telemetry.  A false or maliciously
      modified report could cause a management plane to form an
      incorrect view of the QoS treatment in the network, potentially
      leading to incorrect traffic engineering or SLA conclusions. Consumers SHOULD accept BGP-LS
      information only from trusted speakers and SHOULD protect BGP-LS
      sessions using the normal BGP security mechanisms.</t>
   <t>the reported PHB, DSCP, and TC values carried by the SR Policy DiffServ PHB TLV do not, 
   by themselves, cause the headend to mark
      traffic; they only describe marking that is already in effect.</t>
   </list>
   <t>The security considerations of [RFC9256], [RFC8986], and [RFC8660]
   also apply to the SR Policies whose bindings are reported.</t>
   </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>     
	 <?rfc include="reference.RFC.4271.xml"?>
	 <?rfc include="reference.RFC.5462.xml"?>
	 <?rfc include="reference.RFC.8174.xml"?>
	 <?rfc include="reference.RFC.9552.xml"?>
      <?rfc include="reference.RFC.9857.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.2474.xml"?>
	 <?rfc include="reference.RFC.2475.xml"?>
	 <?rfc include="reference.RFC.3270.xml"?>
	 <?rfc include="reference.RFC.8402.xml"?>
	 <?rfc include="reference.RFC.8660.xml"?>
	 <?rfc include="reference.RFC.8986.xml"?>
	 <?rfc include="reference.RFC.9830.xml"?>
	 <?rfc include="reference.I-D.he-idr-bgp-sr-policy-diffserv.xml"?> 

    </references>
  </back>
</rfc>