RFC 9256 - SR Policy Architecture¶
| Field | Value |
|---|---|
| Title | Segment Routing Policy Architecture |
| Authors | C. Filsfils, et al. |
| Date | July 2022 |
| Status | Proposed Standard |
| Link | datatracker.ietf.org/doc/rfc9256 |
Summary¶
Defines the architecture for SR Policies - the mechanism used to steer traffic through specific paths in an SR network. Applicable to both SR-MPLS and SRv6.
Key Concepts¶
- SR Policy = (headend, color, endpoint)
- Candidate Paths - multiple paths with preferences
- Segment Lists - ordered list of SIDs per candidate path
- Binding SID (BSID) - single SID representing an SR Policy
Key Sections¶
| Section | Topic | Description |
|---|---|---|
| 2 | SR Policy Model | Defines the SR Policy as the tuple (headend, color, endpoint) and the hierarchical structure of candidate paths and segment lists |
| 2.1 | Candidate Paths | Multiple paths per policy, each with a preference value; highest preference wins |
| 2.2 | Segment Lists (SID Lists) | Ordered list of SIDs representing a source-routed path; each candidate path may have multiple weighted segment lists for ECMP |
| 2.3 | Protocol-Origin | How candidate paths are instantiated: via configuration, BGP (RFC 9830 SR Policy SAFI), or PCEP |
| 2.4 | Discriminator | Unique identifier within a protocol-origin to distinguish multiple candidate paths from the same source |
| 3 | Binding SID (BSID) | A single SID that represents an entire SR Policy; traffic steered to the BSID follows the policy's active path |
| 3.1 | BSID and Policy Lifecycle | BSID may be explicitly allocated or dynamically assigned; it remains stable across candidate path changes |
| 4 | Validity of SR Policy | Conditions under which a policy is operationally valid (at least one valid candidate path with a valid segment list) |
| 5 | Weighted ECMP | When a candidate path has multiple segment lists, traffic is distributed across them based on assigned weights |
| 6 | Steering into SR Policy | Mechanisms for directing traffic: BSID-based, color-based (BGP Color Extended Community), or per-destination steering |
| 7 | Security Considerations | Authorization of policy sources, BSID protection |
SR Policy Identification¶
An SR Policy is uniquely identified by the combination of:
| Component | Description | Example |
|---|---|---|
| Headend | The node where the policy is instantiated | Router-A (2001:db8::1) |
| Color | A 32-bit numeric value representing an intent or SLA class | 100 (low-latency) |
| Endpoint | The destination/far-end of the policy | Router-Z (2001:db8::9) |
Candidate Path Selection¶
When multiple candidate paths exist for a policy, the selection follows this order:
- Preference -- Highest numeric preference wins
- Protocol-Origin -- If preference ties: PCEP (30) > BGP (20) > Configuration (10)
- Discriminator -- Final tiebreaker within the same protocol-origin
Common Pitfalls
BSID allocation must be unique per headend. Each Binding SID must uniquely identify a single SR Policy on a given headend. If two policies inadvertently share a BSID, traffic may be steered into the wrong policy. Some implementations dynamically allocate BSIDs to avoid conflicts, but explicit allocation requires careful planning.
Candidate path preference is NOT the same as route preference. SR Policy candidate path preference is an internal ordering mechanism within a single policy. It does not interact with BGP Local Preference, IGP metric, or other routing protocol preferences. A higher candidate path preference means that path is preferred, but this only matters among candidate paths of the same SR Policy.
A policy with no valid candidate path is operationally down. If all candidate paths have invalid segment lists (e.g., unresolvable SIDs), the entire SR Policy becomes invalid. Traffic previously steered via the policy's BSID will be dropped or fall back depending on the implementation.
Weighted ECMP requires careful weight assignment. When a candidate path has multiple segment lists with weights, the traffic split is proportional to the weights (e.g., weights 1:3 means 25%/75%). Setting all weights to 1 produces equal distribution. A weight of 0 is not valid.
Color is not a priority. The Color value (32-bit integer) is an opaque identifier for intent. A higher color value does not mean higher priority -- it simply identifies a different SLA class or steering intent. Color matching is exact.
Related Drafts & Updates¶
| Document | Relationship | Description |
|---|---|---|
| RFC 9830 | Protocol | BGP SR Policy SAFI for distributing SR Policies via BGP (formerly draft-ietf-idr-sr-policy-safi) |
| RFC 9603 | Protocol | PCEP extensions for SRv6 candidate paths |
| RFC 9857 | Protocol | BGP-LS reporting of SR Policy candidate-path state |
| RFC 9960 | Extension | SR P2MP Policy reuses the candidate-path model for multicast trees |
| draft-ietf-idr-sr-policy-path-segment | Extension | Path Segment for SR Policy to enable path identification |
| draft-ietf-pce-segment-routing-policy-cp | Protocol | PCEP extensions for SR Policy candidate paths |
| RFC 9252 | Uses Color | BGP Overlay Services use the Color Extended Community for SR Policy steering |
Related¶
- Traffic Engineering
- RFC 8986 - SRv6 Network Programming