Internet-Draft BGP Extensions of SR Policy for DiffServ November 2026
He & Huang Expires 30 May 2027 [Page]
Workgroup:
IDR Working Group
Internet-Draft:
draft-he-idr-bgp-sr-policy-diffserv-00
Published:
Intended Status:
Standards Track
Expires:
Authors:
X. He
China Telecom
Z. Huang
China Telecom

BGP Extensions of SR Policy for DiffServ

Abstract

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.

Status of This Memo

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.

▲

Table of Contents

1. Introduction

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:

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.

2. Conventions

2.1. Requirements Language

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.

2.2. Terminology

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

3. Problem Statement and Motivation

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:

The DiffServ PHB is realized in different packets fields depending on the data plane:

4. DiffServ PHB in SR Policy

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
              ...
            ...

5. SR Policy DiffServ PHB Sub-TLV

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      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: SR Policy DiffServ PHB sub-TLV

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.

5.1. Flags

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.

6. Ingress (Headend) Marking Behavior

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.

6.1. SRv6 Data Plane

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.

6.2. SR-MPLS Data Plane

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     |
      +----------------+---------+
Figure 2: Recommended Default Mapping from DSCP to TC

7. Interaction with Other SR Policy Sub-TLVs

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.

8. IANA Considerations

8.1. SR Policy DiffServ PHB Sub-TLV

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  |
   +--------+------------------------------+----------------+

8.2. SR Policy DiffServ PHB Flags

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                                    |
   +-----+-----------------------------------------------+

9. Security Considerations

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:

The security considerations of SR Policies [RFC9256] [RFC9830], of SRv6 [RFC8754] [RFC8986], and of SR-MPLS [RFC8660] also apply.

10. References

10.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC2474]
Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, DOI 10.17487/RFC2474, , <https://www.rfc-editor.org/info/rfc2474>.
[RFC2475]
Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., and W. Weiss, "An Architecture for Differentiated Services", RFC 2475, DOI 10.17487/RFC2475, , <https://www.rfc-editor.org/info/rfc2475>.
[RFC2597]
Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, "Assured Forwarding PHB Group", RFC 2597, DOI 10.17487/RFC2597, , <https://www.rfc-editor.org/info/rfc2597>.
[RFC3032]
Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack Encoding", RFC 3032, DOI 10.17487/RFC3032, , <https://www.rfc-editor.org/info/rfc3032>.
[RFC3246]
Davie, B., Charny, A., Bennet, J.C.R., Benson, K., Le Boudec, J.Y., Courtney, W., Davari, S., Firoiu, V., and D. Stiliadis, "An Expedited Forwarding PHB (Per-Hop Behavior)", RFC 3246, DOI 10.17487/RFC3246, , <https://www.rfc-editor.org/info/rfc3246>.
[RFC3270]
Le Faucheur, F., Ed., Wu, L., Davie, B., Davari, S., Vaananen, P., Krishnan, R., Cheval, P., and J. Heinanen, "Multi-Protocol Label Switching (MPLS) Support of Differentiated Services", RFC 3270, DOI 10.17487/RFC3270, , <https://www.rfc-editor.org/info/rfc3270>.
[RFC4271]
Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, , <https://www.rfc-editor.org/info/rfc4271>.
[RFC5462]
Andersson, L. and R. Asati, "Multiprotocol Label Switching (MPLS) Label Stack Entry: "EXP" Field Renamed to "Traffic Class" Field", RFC 5462, DOI 10.17487/RFC5462, , <https://www.rfc-editor.org/info/rfc5462>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8200]
Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", STD 86, RFC 8200, DOI 10.17487/RFC8200, , <https://www.rfc-editor.org/info/rfc8200>.
[RFC8660]
Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing with the MPLS Data Plane", RFC 8660, DOI 10.17487/RFC8660, , <https://www.rfc-editor.org/info/rfc8660>.
[RFC8754]
Filsfils, C., Ed., Dukes, D., Ed., Previdi, S., Leddy, J., Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header (SRH)", RFC 8754, DOI 10.17487/RFC8754, , <https://www.rfc-editor.org/info/rfc8754>.
[RFC8986]
Filsfils, C., Ed., Camarillo, P., Ed., Leddy, J., Voyer, D., Matsushima, S., and Z. Li, "Segment Routing over IPv6 (SRv6) Network Programming", RFC 8986, DOI 10.17487/RFC8986, , <https://www.rfc-editor.org/info/rfc8986>.
[RFC9012]
Patel, K., Van de Velde, G., Sangli, S., and J. Scudder, "The BGP Tunnel Encapsulation Attribute", RFC 9012, DOI 10.17487/RFC9012, , <https://www.rfc-editor.org/info/rfc9012>.
[RFC9256]
Filsfils, C., Talaulikar, K., Ed., Voyer, D., Bogdanov, A., and P. Mattes, "Segment Routing Policy Architecture", RFC 9256, DOI 10.17487/RFC9256, , <https://www.rfc-editor.org/info/rfc9256>.
[RFC9830]
Previdi, S., Filsfils, C., Talaulikar, K., Ed., Mattes, P., and D. Jain, "Advertising Segment Routing Policies in BGP", RFC 9830, DOI 10.17487/RFC9830, , <https://www.rfc-editor.org/info/rfc9830>.

10.2. Informative References

[I-D.he-spring-sr-policy-bandwidth-guarantee]
He, X., Xie, C., Gong, L., and R. Pang, "A Framework for SR Policy Bandwidth Guarantee", Work in Progress, Internet-Draft, draft-he-spring-sr-policy-bandwidth-guarantee-00, , <https://datatracker.ietf.org/doc/html/draft-he-spring-sr-policy-bandwidth-guarantee-00>.
[RFC2697]
Heinanen, J. and R. Guerin, "A Single Rate Three Color Marker", RFC 2697, DOI 10.17487/RFC2697, , <https://www.rfc-editor.org/info/rfc2697>.
[RFC2698]
Heinanen, J. and R. Guerin, "A Two Rate Three Color Marker", RFC 2698, DOI 10.17487/RFC2698, , <https://www.rfc-editor.org/info/rfc2698>.
[RFC4115]
Aboul-Magd, O. and S. Rabie, "A Differentiated Service Two-Rate, Three-Color Marker with Efficient Handling of in-Profile Traffic", RFC 4115, DOI 10.17487/RFC4115, , <https://www.rfc-editor.org/info/rfc4115>.
[RFC4594]
Babiarz, J., Chan, K., and F. Baker, "Configuration Guidelines for DiffServ Service Classes", RFC 4594, DOI 10.17487/RFC4594, , <https://www.rfc-editor.org/info/rfc4594>.
[RFC8402]
Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, , <https://www.rfc-editor.org/info/rfc8402>.

Authors' Addresses

Xiaoming He
China Telecom
Zhoujun Huang
China Telecom