Internet-Draft | SR Policy Extensions for Path Selection | March 2025 |
Li & Song | Expires 4 September 2025 | [Page] |
To enable the headend node to do performance-aware path selection, this document proposes an extension to the BGP SR Policy protocol by defining a new optional Metric Sub-TLV within the BGP Tunnel Encapsulation Attribute [RFC9012]. The introduced Metric Sub-TLV encodes performance parameters (such as latency, bandwidth, reliability, etc.) for SR Policy paths. This specification also updates the BGP route selection procedures in [RFC4271], modifying the Breaking Ties (Phase 2) logic to prioritize the metrics for SR Policy paths.¶
Key contributions include:¶
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 4 September 2025.¶
Copyright (c) 2025 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] allows a headend node to steer a packet flow along a specific path. [RFC9256] further details the concepts of SR Policy and steering into an SR Policy. [I-D.ietf-idr-sr-policy-safi] specifies the use of BGP to distribute one or more of the candidate paths of an SR Policy to the headend of that policy.Currently [I-D.ietf-idr-sr-policy-safi] lacks the capability to propagate performance metrics such as path latency, bandwidth, or reliability. This limitation prevents headends from implementing policy selection based on path metrics when there are multiple paths reaching the same destination. Consequently, the headends cannot dynamically elect performance-optimal path among multiple SR Policies. To address this limitation, this document extends the BGP SR Policy protocol to carry performance metrics in SR Policy advertisements.¶
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.¶
As shown in Figure 1,the SR Policy Computation and Provisioning System, such as a SDN controller, collects real-time network state information (e.g., topology, link utilization) and performance metrics (e.g., link latency, jitter, packet loss rate). Based on service or customer requirements (e.g., minimum latency), it computes SR Policy paths between designated endpoints and distributes them to headend nodes via the BGP SR Policy protocol [I-D.ietf-idr-sr-policy-safi].¶
For example:¶
The system provisions two low-latency policies to headend node PE3:¶
Policy1: Path via P1-->PE1, with a measured latency of 20 ms.¶
Policy2: Path via P2-->PE2, with a measured latency of 12 ms.¶
However, the current BGP SR Policy protocol [I-D.ietf-idr-sr-policy-safi] only propagates path definitions (e.g., segment lists) without embedding performance metrics. This forces headend nodes to select paths based solely on static criteria (e.g., administrative preferences), potentially leading to suboptimal traffic engineering decisions.¶
To address this limitation, this proposal extends the BGP SR Policy protocol by introducing a new Performance Metrics Sub-TLV within the BGP Tunnel Encapsulation Attribute [RFC9012]. This Sub-TLV encodes key performance indicators (KPIs) such as latency, bandwidth, and reliability (see Section 3 for details). With this extension: The SR Policy Computation and Provisioning System can advertise SR Policies alongside their associated KPIs. Headend nodes leverage the enhanced BGP route selection logic (Section 6) to prioritize paths that meet dynamic performance requirements.¶
+---------------------------------------------+ |SR Policy Computation and Provisioning System| +---------------------------------------------+ * * * * * * * *Extended BGP * * * *SR Policy * * * * +---+ 15ms* +---+ 5ms * +---+ /|PE1| ----*----| P1|-------------*-----|PE3|\ / +---+ * +---+----\ /--*----+---+ \ / | * | \ / * | \ +---+/ | * | ----\ * | \+---+ |CE1|0.5ms| * |0.5ms / \ * |0.5ms |CE2| +---+\ | * | ---- ---\ * | /+---+ \ | * | /1ms 5ms\ * | / \ +---+ +---+ --+---+ / \|PE2|----------|P2 |-------------------|PE4|/ +---+ 11ms +---+ 1ms +---+
This document extends the BGP SR Policy protocol by introducing a new sub-TLV, Metric Sub-TLV, within the BGP Tunnel Encapsulation Attribute. The Extended BGP SR Policy Encoding structure is as follows:¶
SR Policy SAFI NLRl: <Distinguisher, Policy-Color, Endpoint> Attributes: Tunnel Encapsulation Attribute(23) Tunnel Type: SR Policy(15) Binding SID SRv6 Binding SID Preference Priority Metric Policy Name Policy Candidate Path Name Explicit NULL Label Policy (ENLP) Segment List Weight Segment Segment ... ...
Metric Sub-TLV is used to carry performance metrics such as latency, bandwidth, and reliability. The format of Metric Sub-TLV is as follows:¶
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 | Length | Flags | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Delay(8 octets,optinal) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Bandwidth(4 octets,optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reliability(4 octets,optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Where:¶
Type (1 octet): Indicates this sub-TLV is Metric, Specific values need to be assigned by IANA.¶
Length (1 octet): Indicates the length of the Metric sub-TLV in bytes.¶
Flags (1 octet): Indicates the presence of specific performance metrics. Its definition is shown in Figure 4.¶
Reserved (1 octet): Reserved for future use. This field MUST be set to 0 when sending and ignored when receiving.¶
Delay(8 octets): Carries delay information. Its format depends on the D flag in Flags Field:¶
Bandwidth (4 octets): Carries bandwidth information in Mbps.¶
Reliability (4 octets): Carries reliability information, such as the maximum number of failures that have occurred on all links in the SR policy path within the past month.¶
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | D |B|R|Reserved| +-+-+-+-+-+-+-+-+
Where, D Flag is for delay, B Flag is for Bandwidth and R Flag is for reliability, all the other bits are reserved. The detailed encodings of the three flags defined in this document are as follows: ¶
+------+-------+-------------------------------+ | Flag | Bits | Description | +------+-------+-------------------------------+ | D | 0-1 | 00: No delay | | | | 01: NTPv4 delay | | | | 10: PTP delay | | | | 11: Reserved | +------+-------+-------------------------------+ | B | 2 | 0: No bandwidth | | | | 1: Bandwidth | +------+-------+-------------------------------+ | R | 3 | 0: No reliability | | | | 1: Reliability | +------+-------+-------------------------------+
Implementations SHOULD set only one flag (D, B, or R) at a time, as these metrics are typically not directly comparable. Network operators MAY configure which metric to prioritize based on service requirements.¶
The Policy Computation and Provisioning System is responsible for calculating Segment Routing (SR) policies based on network state and business requirements, and provisioning them to headend nodes. When provisioning SR policies that include performance metrics, the system should follow these steps:¶
Collect Network State Information: Gather real-time network topology, link utilization, and other relevant data.¶
Compute SR Policies: Calculate SR policy paths that meet performance requirements based on service needs and network state.¶
Encapsulate Performance Metrics: Embed performance metrics such as latency, bandwidth, and reliability within the Metric Sub-TLV of the BGP Tunnel Encapsulation Attribute.¶
Provision BGP Update Messages: Include the SR policies with performance metrics in BGP update messages and send them to the appropriate headend nodes.¶
Process BGP Acknowledgments: Await acknowledgments from headend nodes to ensure successful reception and processing of the SR policies.¶
Upon receiving SR policies with performance metrics, headend nodes should process them as follows:¶
Parse BGP Update Messages: Extract SR policies and their associated performance metrics from the received BGP update messages.¶
Store Performance Metrics: Save the performance metrics in a local database for subsequent path selection.¶
Path Selection: Prioritize paths that meet dynamic performance requirements when multiple paths are available.¶
Update Routing Tables: Modify routing tables based on the selected paths to ensure traffic is forwarded along optimized routes.¶
Based on practical use cases and hands-on operational experience, the Breaking Ties (Phase 2) logic in [RFC4271] SHOULD be updated. This can be achieved by inserting the comparison of Metric attribute values between steps e and f. More precisely, when the next-hop costs are identical, first compare the Metric attribute values of the SR policy, then compare the BGP IDs of the BGP Speakers. The detailed comparison algorithm is as follows:¶
Check if the Route Iterates to an SR Policy Tunnel:¶
All Iterations to Tunnels:¶
Some Iterations to Tunnels:¶
No Iterations to Tunnels:¶
This update aims to make route selection more aligned with actual network requirements, thereby enhancing the accuracy and efficiency of traffic engineering.¶
IANA is requested to assign the following code point from the "BGP Tunnel Encapsulation Attribute Sub-TLVs" Registry:¶
Code Point | Description | Reference |
---|---|---|
TBD | Metric Sub-TLV | This document |
The authors would like to acknowledge the supports from Cheng Chang and Bo Liu.¶