| Internet-Draft | BGP Extensions of SR Policy for DiffServ | November 2026 |
| He & Huang | Expires 30 May 2027 | [Page] |
This document defines BGP extensions to associate a Differentiated Services (DiffServ) Per-Hop Behavior (PHB) with a Segment Routing (SR) Policy candidate path. It introduces a new sub-TLV carried in the BGP Tunnel Encapsulation Attribute that accompanies an SR Policy NLRI, thereby publishing the binding between an SR Policy candidate path and a PHB.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 30 May 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Segment Routing (SR) [RFC8402] enables the ingress node of an SR domain to steer a packet along an explicit path by prepending a stack of segments. A Segment Routing Policy (SR Policy) [RFC9256] is an ordered list of segments, identified by the tuple (headend, color, endpoint), that expresses a steering intent such as "low latency" or "high bandwidth." An SR Policy may contain one or more candidate paths (CPs), and at any time a single CP is active and can be used for traffic steering. BGP can be used to advertise SR Policies and their candidate paths [RFC9830].¶
Differentiated Services (DiffServ) [RFC2475] provides a scalable mechanism for QoS by classifying traffic into a small number of aggregate service classes at the boundary of a network and applying a Per-Hop Behavior (PHB) to each class at every node along the path. A PHB is a treatment applied to a packet at a node, expressed in terms of scheduling (queue selection) and drop precedence [RFC2474] [RFC2597] [RFC3246]. Standardized PHBs include Default (Best Effort), Expedited Forwarding (EF) [RFC3246], the Assured Forwarding group (AF1x through AF4x) [RFC2597], and the Class Selector (CS) PHBs [RFC2474].¶
Currently, the selection of a DiffServ PHB for traffic steered into an SR Policy is a matter of local configuration at the ingress (headend) node. There is no protocol mechanism by which a controller or an egress node can convey to the headend the PHB that must be applied to traffic steered into a given SR Policy CP. As a consequence, when a controller computes a SR Policy that is intended to carry a specific DiffServ service class (for example, an EF class for a real-time voice service or an AF class for a bandwidth-guaranteed data service), the headend must be configured out-of-band to mark the corresponding packets with the correct DSCP or TC value. This fragmentation is error prone and does not scale in networks with many policies and service classes.¶
This document defines BGP extensions to close this gap. A new sub-TLV, the "SR Policy DiffServ PHB sub-TLV", is carried in the Tunnel Encapsulation Attribute accompanying an SR Policy NLRI. The sub-TLV publishes the binding between an SR Policy candidate path and a PHB. The binding is realized at the data plane as follows:¶
In an SRv6 network [RFC8754] [RFC8986], the PHB is realized by the Differentiated Services Code Point (DSCP) [RFC2474] carried in the Traffic Class field of the outer IPv6 base header.¶
In an SR-MPLS network [RFC8660], the PHB is realized by the Traffic Class (TC) field, formerly the EXP field, of the MPLS label stack [RFC3270] [RFC5462].¶
The mechanisms described in this document are complementary to the SR Policy bandwidth guarantee framework described in [I-D.he-spring-sr-policy-bandwidth-guarantee], where the DiffServ QoS enforcement, queue scheduling, and traffic conditioning are realized by the per-hop data-plane enforcement layer.¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Abbreviations and Notations used in this document:¶
AF: Assured Forwarding PHB [RFC2597]¶
BGP: Border Gateway Protocol¶
BE: Best Effort¶
CP: Candidate Path¶
CS: Class Selector¶
DSCP: Differentiated Services Code Point¶
EF: Expedited Forwarding PHB [RFC3246]¶
MPLS: Multi-Protocol Label Switching¶
NLRI: Network Layer Reachability Information¶
PHB: Per-Hop Behavior¶
PSC: PHB Scheduling Class¶
QoS: Quality of Service¶
SR: Segment Routing¶
SRH: Segment Routing Header¶
SR-MPLS: Segment Routing with the MPLS data plane¶
SRv6: Segment Routing over IPv6¶
TC: Traffic Class¶
TLV: Type-Length-Value¶
An SR Policy CP, as computed and installed at a headend, carries traffic toward a destination endpoint. However, the SR Policy architecture does not associate a QoS class with the policy itself. Operators require the ability to bind a DiffServ PHB to an SR Policy CP so that all traffic steered into that CP receives a well-defined per-hop treatment. The motivation for doing so at the control plane, rather than by local configuration only, includes:¶
Consistency: A controller that computes a SR Policy for a given service class can convey the intended PHB together with the policy, avoiding headend-by-headend configuration divergence.¶
Automation: When policies are instantiated through BGP (for example, by an SDN controller programming the headend), the PHB binding travels in the same control-plane message, so no out-of-band provisioning step is required.¶
Multiple data planes: A single control-plane PHB binding must be realizable on both the SRv6 data plane (through the DSCP field) and the SR-MPLS data plane (through the TC field). The binding therefore expresses a PHB, and the mapping of that PHB onto the data-plane marking field is data-plane specific.¶
Interworking with bandwidth reservation: In deployments that combine DiffServ-based bandwidth guarantee [I-D.he-spring-sr-policy-bandwidth-guarantee] with SR Policy steering, the service class of a policy determines the queue and the scheduling treatment applied at each hop. Publishing the PHB at the control plane makes the end-to-end DiffServ behavior explicit and auditable.¶
The DiffServ PHB is realized in different packets fields depending on the data plane:¶
In SRv6, the DSCP is the six most significant bits of the 8-bit Traffic Class (TC) field of the IPv6 base header [RFC8200] [RFC2474]. When an outer IPv6 header and an SRH are present, the DSCP value is set in the TC field of the outermost IPv6 header; the inner (payload) DSCP is preserved for end-to-end service interpretation.¶
In SR-MPLS, the TC (EXP) field is the 3-bit field in each MPLS label stack entry [RFC3032] [RFC5462]. The TC field conveys a PHB Scheduling Class (PSC) derived from the PHB according to [RFC3270]. Because the TC field is only 3 bits, it can represent at most eight PHB scheduling classes, and the per-PHB drop precedence of the AF group cannot be fully carried in a single TC value¶
As defined in [RFC9830], the SR policy encoding structure is as follows:¶
SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>
Attributes:
Tunnel Encaps Attribute (23)
Tunnel Type: SR Policy
Binding SID
SRv6 Binding SID
Preference
Priority
Policy Name
Policy Candidate Path Name
Explicit NULL Label Policy (ENLP)
Segment List
Weight
Segment
Segment
...
...
¶
SR policy with DiffServ PHB is expressed as follows:¶
SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>
Attributes:
Tunnel Encaps Attribute (23)
Tunnel Type: SR Policy
Binding SID
SRv6 Binding SID
Preference
Priority
Policy Name
Policy Candidate Path Name
Explicit NULL Label Policy (ENLP)
DiffServ PHB
Segment List
Weight
Segment
Segment
...
...
¶
The SR Policy DiffServ PHB sub-TLV is carried as a sub-TLV of the Tunnel Encapsulation Attribute [RFC9012] that is advertised together with an SR Policy NLRI [RFC9830]. When present, the sub-TLV binds a DiffServ PHB to the CP.¶
A headend that receives an SR Policy NLRI carrying this sub-TLV applies the bound PHB to traffic that is steered into the corresponding CP.¶
The DiffServ PHB sub-TLV is OPTIONAL; it MUST NOT appear more than once in the SR Policy encoding.¶
The SR Policy DiffServ PHB sub-TLV has the following format:¶
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Where:¶
Type: 1 octet. The value TBD1, to be assigned by IANA from the "BGP Tunnel Encapsulation Attribute sub-TLVs" registry.¶
Length: 1 octet. Set to 4.¶
Flags: 1 octet. See Section 5.1.¶
Reserved: 1 octet. MUST be set to zero on transmission and ignored on reception.¶
DSCP: 1 octet. The 6-bit DSCP value [RFC2474] corresponding to the PHB, carried in the six most significant bits; the two least significant bits MUST be set to zero on transmission and ignored on reception.¶
TC: 1 octet. The 3-bit TC value [RFC5462] corresponding to the PHB,carried in the three most significant bits; the five least significant bits MUST be set to zero on transmission and ignored on reception.¶
The DSCP and TC fields apply to the SRv6 and SR-MPLS data planes, respectively.¶
The Flags octet is encoded as follows:¶
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|D|T|C| Reserved|
+-+-+-+-+-+-+-+-+
¶
Where:¶
D (bit 0, most significant): DSCP valid. When set, the DSCP field carries a value that MUST be copyed to the DSCP field of the outer IPv6 base header and applied to the SRv6 data plane; when clear, the DSCP field MUST be set to zero on transmission and ignored on reception.¶
T (bit 1): TC valid. When set, the TC field carries the value that MUST be copyed to the TC field of the label stack entries and applied to the SR-MPLS data plane; when clear, the TC field MUST be set to zero on transmission and ignored on reception.¶
C (bit 2): Copy valid. For the SRv6 data plane, when set, the headend MUST directly copy the DSCP value marked within the IPv6 header 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, when set,the headend MUST directly copy 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 conditioned original packets steered into the SR POlicy CP with the bound PHB. Section 6 explains the reasons for settting this C bit.¶
Reserved (bits 3-7): MUST be set to zero on transmission and ignored on reception.¶
When a headend steers a packet into a SR Policy CP for which a PHB binding is installed, it applies the bound PHB to the packet as described in this section.¶
In an SRv6 network, the headend encodes the DSCP corresponding to the bound PHB in the TC field of the outermost IPv6 header. When an SRH is inserted by the headend, the DSCP of the outer IPv6 header is set according to the bound PHB; the DSCP of the original (inner) packet is preserved unchanged so that downstream and egress classification can recover the original end-to-end service class.¶
In many sceniros, ingress nodes perform conditioning on user traffic flows. Typically, the incoming traffic is classified, metered, policed, and marked at the access interface. As described in [I-D.he-spring-sr-policy-bandwidth-guarantee], the meter selection for user flows should be aligned with the specified service PHB. For example, for a user flow with EF class, a single rate with burst size token bucket meter can be configured to ensure that the traffic stays within its negotiated bounds. And in-profile packets are marked green with the DSCP value '101110'. Another example is for a user flow with AF class, a Two Rate Three Color Marker (trTCM [RFC2698] [RFC4115]) can be configured, and produce green, yellow, red marking with the three DSCP values 'AFn1, AFn2, AFn3', corresponding to the three drop precedence of the same AFn queue, respectively. When the D bit is set, only a DCSP value can applied to all AFn packets, which cannot enforce differentiated treatment of packets with different drop precedence. In this case, setting the C flag is also necessary.¶
Given that the incoming traffic is classified, metered, policed, and marked at the access interface, when the C flag is set, the headend MUST directly copy the DSCP value marked within the IPv6 header to the DSCP field of the outer IPv6 header of the conditioned original packets steered into the SR Policy CP with the bound PHB.¶
In an SR-MPLS network, the headend encodes the TC value corresponding to the bound PHB in the TC field of the label stack entries it pushes. The TC value SHOULD be set on the top-of-stack label and, for consistency, on any label that a transit node may inspect for PHB scheduling.¶
Given that the incoming traffic is classified, metered, policed, and marked at the access interface, when the C flag is set, the headend MUST directly copy 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 conditioned original packets steered into the SR POlicy CP with the bound PHB. It can be applied to Class Selector (CS) PHBs with DSCP value 'xxx000' as defined in [RFC2474].¶
Because the TC field is only 3 bits, it can represent at most eight PHB scheduling classes, and the per-PHB drop precedence of the AF group cannot be fully carried in a single TC value. To obtain the consistent scheduling treatment as DSCP field does, when a trTCM [RFC2698] [RFC4115] is configured, it is recommended to set green packets as CS1-4, discard all red packets, and forward yellow packets as best effort (CS0).¶
The recommended default mapping from DSCP to TC is as follows:¶
+================+=========+
| DSCP | TC |
+================+=========+
| BE (CS0) | 000 |
+----------------+---------+
| AF1 (CS1) | 001 |
+----------------+---------+
| AF2 (CS2) | 010 |
+----------------+---------+
| AF3 (CS3) | 011 |
+----------------+---------+
| AF4 (CS4) | 100 |
+----------------+---------+
| EF | 101 |
+----------------+---------+
| CS6 (control) | 110 |
+----------------+---------+
| CS7 (control) | 111 |
+----------------+---------+
The SR Policy DiffServ PHB sub-TLV is independent of the Preference, Binding SID, and Segment List sub-TLVs [RFC9256] [RFC9830]. When a candidate path carries several of these sub-TLVs, the PHB binding is applied to the traffic steered into that candidate path, irrespective of the preference and binding SID values. The PHB derived from this sub-TLV does not modify the forwarding semantics of the segment list; it only governs the DiffServ marking and the resulting per-hop scheduling treatment.¶
IANA is requested to make the following allocation from the "BGP Tunnel Encapsulation Attribute sub-TLVs" registry:¶
+========+==============================+================+ | Value | Description | Reference | +========+===============================================+ | TBD1 | SR Policy DiffServ PHB | This document | +--------+------------------------------+----------------+¶
This document requests to create a new registry called "SR Policy DiffServ PHB Flags" under the "Border Gateway Protocol (BGP) Tunnel Encapsulation" registry group. The registration policy of this registry is "IETF Review" (see [RFC8126]).¶
The following flags are defined:¶
+=====+==============================+================+ | 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 | +-----+-----------------------------------------------+¶
The extensions defined in this document propagate a DiffServ PHB binding in BGP and thus are subject to the security considerations of BGP [RFC4271] and of the BGP Tunnel Encapsulation Attribute [RFC9012]. In particular:¶
A malicious or misconfigured BGP speaker could advertise a PHB binding that elevates the forwarding treatment of its traffic (for example, binding traffic to the EF PHB) or degrades the treatment of another party's traffic. Operators SHOULD deploy the normal BGP security mechanisms to authenticate BGP sessions, and SHOULD apply inbound route policies that accept the SR Policy DiffServ PHB sub-TLV only from trusted peers.¶
Because the PHB binding influences scheduling, it could be used in a denial-of-service attack by causing headends to remark a large volume of best-effort traffic into a high-priority class, thereby starving other classes. Operators SHOULD combine the PHB binding with headend policing/metering (for example, single-rate or two-rate three-color markers [RFC2697] [RFC2698]) that bound the rate admitted into each PHB.¶
The security considerations of SR Policies [RFC9256] [RFC9830], of SRv6 [RFC8754] [RFC8986], and of SR-MPLS [RFC8660] also apply.¶