RFC 8986: Segment Routing over IPv6 (SRv6) Network Programming
- C. Filsfils, Ed.,
- P. Camarillo, Ed.,
- J. Leddy,
- D. Voyer,
- S. Matsushima,
- Z. Li
Abstract
The Segment Routing over IPv6 (SRv6) Network Programming framework enables a network operator or an application to specify a packet processing program by encoding a sequence of instructions in the IPv6 packet header.¶
Each instruction is implemented on one or several nodes in the network and identified by an SRv6 Segment Identifier in the packet.¶
This document defines the SRv6 Network Programming concept and specifies the base set of SRv6 behaviors that enables the creation of interoperable overlays with underlay optimization.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2021 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://
1. Introduction
Segment Routing [RFC8402] leverages the source routing paradigm. An ingress node steers a packet through an ordered list of instructions, called "segments". Each one of these instructions represents a function to be called at a specific location in the network. A function is locally defined on the node where it is executed and may range from simply moving forward in the segment list to any complex user-defined behavior. Network Programming combines Segment Routing functions, both simple and complex, to achieve a networking objective that goes beyond mere packet routing.¶
This document defines the SRv6 Network Programming concept and specifies the main Segment Routing behaviors to enable the creation of interoperable overlays with underlay optimization.¶
[SRV6
Familiarity with the Segment Routing Header [RFC8754] is expected.¶
2. Terminology
The following terms used within this document are defined in [RFC8402]: Segment Routing (SR), SR Domain, Segment ID (SID), SRv6, SRv6 SID, SR Policy, Prefix-SID, and Adj-SID.¶
The following terms used within this document are defined in [RFC8754]: Segment Routing Header (SRH), SR source node, transit node, SR Segment Endpoint Node, Reduced SRH, Segments Left, and Last Entry.¶
The following terms are used in this document as defined below:¶
- FIB:
- Forwarding Information Base. A FIB lookup is a lookup in the forwarding table.¶
- SA:
- Source Address¶
- DA:
- Destination Address¶
- L3:
- Layer 3¶
- L2:
- Layer 2¶
- MAC:
- Media Access Control¶
- EVPN:
- Ethernet VPN¶
- ESI:
- Ethernet Segment Identifier¶
- Per-CE VPN label:
- A single label for each attachment circuit that is shared by all routes with the same "outgoing attachment circuit" (Section 4.3.2 of [RFC4364])¶
- Per-VRF VPN label:
- A single label for the entire VPN Routing and Forwarding (VRF) table that is shared by all routes from that VRF (Section 4.3.2 of [RFC4364])¶
- SL:
- The Segments Left field of the SRH¶
- SRv6 SID function:
- The function part of the SID is an opaque identification of a local behavior bound to the SID. It is formally defined in Section 3.1 of this document.¶
- SRv6 Endpoint behavior:
-
A packet processing behavior executed at an SRv6 Segment Endpoint Node. Section 4 of this document defines SRv6 Endpoint behaviors related to traffic
-engineering and overlay use cases. Other behaviors (e.g., service programming) are outside the scope of this document.¶
An SR Policy is resolved to a SID list. A SID list is represented as <S1, S2, S3> where S1 is the first SID to visit, S2 is the second SID to visit, and S3 is the last SID to visit along the SR path.¶
(SA,DA) (S3, S2, S1; SL) represents an IPv6 packet with:¶
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.¶
3. SRv6 SID
[RFC8402] defines an SRv6 Segment Identifier as an IPv6 address explicitly associated with the segment.¶
When an SRv6 SID is in the Destination Address field of an IPv6 header of a packet, it is routed through transit nodes in an IPv6 network as an IPv6 address.¶
Its processing is defined in Section 4.3 of [RFC8754] and reproduced here as a reminder:¶
Without constraining the details of an implementation, the SR segment endpoint node creates Forwarding Information Base (FIB) entries for its local SIDs.¶
When an SRv6-capable node receives an IPv6 packet, it performs a longest
-prefix -match lookup on the packet's destination address. This lookup can return any of the following:¶
Section 4 of this document defines a new set of SRv6 SID behaviors in addition to that defined in Section 4.3.1 of [RFC8754].¶
3.1. SID Format
This document defines an SRv6 SID as consisting of LOC:FUNCT:ARG, where a locator (LOC) is encoded in the L most significant bits of the SID, followed by F bits of function (FUNCT) and A bits of arguments (ARG). L, the locator length, is flexible, and an operator is free to use the locator length of their choice. F and A may be any value as long as L+F+A <= 128. When L+F+A is less than 128, then the remaining bits of the SID MUST be zero.¶
A locator may be represented as B:N where B is the SRv6 SID block (IPv6 prefix allocated for SRv6 SIDs by the operator) and N is the identifier of the parent node instantiating the SID.¶
When the LOC part of the SRv6 SIDs is routable, it leads to the node, which instantiates the SID.¶
The FUNCT is an opaque identification of a local behavior bound to the SID.¶
The term "function" refers to the bit string in the SRv6 SID. The term "behavior" identifies the behavior bound to the SID. Some behaviors are defined in Section 4 of this document.¶
An SRv6 Endpoint behavior may require additional information for its processing (e.g., related to the flow or service). This information may be encoded in the ARG bits of the SID.¶
In such a case, the semantics and format of the ARG bits are defined as part of the SRv6 Endpoint behavior specification.¶
The ARG value of a routed SID SHOULD remain constant among packets in a given flow. Varying ARG values among packets in a flow may result in different ECMP hashing and cause reordering.¶
3.2. SID Allocation within an SR Domain
Locators are assigned consistent with IPv6 infrastructure allocation. For example, a network operator may:¶
As an example, one mobile service provider has commercially deployed SRv6 across more than 1000 commercial routers and 1800 whitebox routers. All these devices are enabled for SRv6 and advertise SRv6 SIDs. The provider historically deployed IPv6 and assigned infrastructure addresses from the Unique Local Address (ULA) space [RFC4193]. They specifically allocated three /48 prefixes (Country X, Country Y, Country Z) to support their SRv6 infrastructure. From those /48 prefixes, each router was assigned a /64 prefix from which all SIDs of that router are allocated.¶
In another example, a large mobile and fixed-line service provider has commercially deployed SRv6 in their country-wide network. This provider is assigned a /20 prefix by a Regional Internet Registry (RIR). They sub-allocated a few /48 prefixes to their infrastructure to deploy SRv6. Each router is assigned a /64 prefix from which all SIDs of that router are allocated.¶
IPv6 address consumption in both these examples is minimal, representing less than one billionth and one millionth of the available address space, respectively.¶
A service provider receiving the current minimum allocation of a /32 prefix from an RIR may assign a /48 prefix to their infrastructure deploying SRv6 and subsequently allocate /64 prefixes for SIDs at each SRv6 node. The /48 assignment is one sixty-five thousandth (1/2^16) of the usable IPv6 address space available for assignment by the provider.¶
When an operator instantiates a SID at a node, they specify a SID value B:N:FUNCT and the behavior bound to the SID using one of the SRv6 Endpoint Behavior codepoints of the registry defined in this document (see Table 6).¶
The node advertises the SID, B:N:FUNCT, in the control plane (see Section 8) together with the SRv6 Endpoint Behavior codepoint identifying the behavior of the SID.¶
An SR source node cannot infer the behavior by examination of the FUNCT value of a SID.¶
Therefore, the SRv6 Endpoint Behavior codepoint is advertised along with the SID in the control plane.¶
An SR source node uses the SRv6 Endpoint Behavior codepoint to map the received SID (B:N:FUNCT) to a behavior.¶
An SR source node selects a desired behavior at an advertising node by selecting the SID (B:N:FUNCT) advertised with the desired behavior.¶
As an example:¶
These examples do not preclude any other IPv6 addressing allocation scheme.¶
3.3. SID Reachability
Most often, the node N would advertise IPv6 prefix(es) matching the LOC parts covering its SIDs or shorter-mask prefix. The distribution of these advertisements and calculation of their reachability are specific to the routing protocol and are outside of the scope of this document.¶
An SRv6 SID is said to be routed if its SID belongs to an IPv6 prefix advertised via a routing protocol. An SRv6 SID that does not fulfill this condition is non-routed.¶
Let's provide a classic illustration:¶
Node N is configured explicitly with two SIDs: 2001
The network learns about a path to 2001
A packet could be steered through a non-routed SID
2001
4. SR Endpoint Behaviors
The following is a set of well-known behaviors that can be associated with a SID.¶
The list is not exhaustive. In practice, any behavior can be attached to a local SID; for example, a node N can bind a SID to a local Virtual Machine (VM) or container that can apply any complex processing on the packet, provided there is an SRv6 Endpoint Behavior codepoint allocated for the processing.¶
When an SRv6-capable node (N) receives an IPv6 packet whose destination address matches a FIB entry that represents a locally instantiated SRv6 SID (S), the IPv6 header chain is processed as defined in Section 4 of [RFC8200]. For SRv6 SIDs associated with an Endpoint behavior defined in this document, the SRH and Upper-Layer header are processed as defined in the following subsections.¶
The pseudocode describing these behaviors details local processing at a node. An implementation of the pseudocode is compliant as long as the externally observable wire protocol is as described by the pseudocode.¶
Section 4.16 defines flavors of some of these behaviors.¶
Section 10.2 of this document defines the IANA registry used to maintain all these behaviors as well as future ones defined in other documents.¶
4.1. End: Endpoint
The Endpoint behavior ("End" for short) is the most basic behavior. It is the instantiation of a Prefix-SID [RFC8402].¶
When N receives a packet whose IPv6 DA is S and S is a local End SID, N does the following:¶
4.1.1. Upper-Layer Header
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End SID, N does the following:¶
Allowing the processing of specific Upper-Layer header types is useful for Operations, Administration, and Maintenance (OAM). As an example, an operator might permit pinging of SIDs. To do this, they may enable local configuration to allow Upper-Layer header type 58 (ICMPv6).¶
It is RECOMMENDED that an implementation of local configuration only allows Upper-Layer header processing of types that do not result in the packet being forwarded (e.g., ICMPv6).¶
4.2. End.X: L3 Cross-Connect
The "Endpoint with L3 cross-connect" behavior ("End.X" for short) is a variant of the End behavior.¶
It is the SRv6 instantiation of an Adj-SID [RFC8402], and its main use is for traffic
Any SID instance of this behavior is associated with a set, J, of one or more L3 adjacencies.¶
When N receives a packet destined to S and S is a local End.X SID, the line S15 from the End processing is replaced by the following:¶
If a node N has 30 outgoing interfaces to 30 neighbors, usually the operator would explicitly instantiate 30 End.X SIDs at N: one per L3 adjacency to a neighbor. Potentially, more End.X could be explicitly defined (groups of L3 adjacencies to the same neighbor or to different neighbors).¶
Note that if N has an outgoing interface bundle I to a neighbor Q made of 10 member links, N might allocate up to 11 End.X local SIDs: one for the bundle itself and then up to one for each L2 member link. The flows steered using the End.X SID corresponding to the bundle itself get load-balanced across the member links via hashing while the flows steered using the End.X SID corresponding to a member link get steered over that specific member link alone.¶
When the End.X behavior is associated with a BGP Next-Hop, it is the SRv6 instantiation of the BGP peering segments [RFC8402].¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.X SID, process the packet as per Section 4.1.1.¶
4.3. End.T: Specific IPv6 Table Lookup
The "Endpoint with specific IPv6 table lookup" behavior ("End.T" for short) is a variant of the End behavior.¶
The End.T behavior is used for multi-table operation in the core. For this reason, an instance of the End.T behavior is associated with an IPv6 FIB table T.¶
When N receives a packet destined to S and S is a local End.T SID, the line S15 from the End processing is replaced by the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.T SID, process the packet as per Section 4.1.1.¶
4.4. End.DX6: Decapsulation and IPv6 Cross-Connect
The "Endpoint with decapsulation and IPv6 cross-connect" behavior ("End.DX6" for short) is a variant of the End.X behavior.¶
One of the applications of the End.DX6 behavior is the L3VPNv6 use case where a FIB lookup in a specific tenant table at the egress Provider Edge (PE) is not required. This is equivalent to the per-CE VPN label in MPLS [RFC4364].¶
The End.DX6 SID MUST be the last segment in an SR Policy, and it is associated with one or more L3 IPv6 adjacencies J.¶
When N receives a packet destined to S and S is a local End.DX6 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DX6 SID, N does the following:¶
4.5. End.DX4: Decapsulation and IPv4 Cross-Connect
The "Endpoint with decapsulation and IPv4 cross-connect" behavior ("End.DX4" for short) is a variant of the End.X behavior.¶
One of the applications of the End.DX4 behavior is the L3VPNv4 use case where a FIB lookup in a specific tenant table at the egress PE is not required. This is equivalent to the per-CE VPN label in MPLS [RFC4364].¶
The End.DX4 SID MUST be the last segment in an SR Policy, and it is associated with one or more L3 IPv4 adjacencies J.¶
When N receives a packet destined to S and S is a local End.DX4 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DX4 SID, N does the following:¶
4.6. End.DT6: Decapsulation and Specific IPv6 Table Lookup
The "Endpoint with decapsulation and specific IPv6 table lookup" behavior ("End.DT6" for short) is a variant of the End.T behavior.¶
One of the applications of the End.DT6 behavior is the L3VPNv6 use case where a FIB lookup in a specific tenant table at the egress PE is required. This is equivalent to the per-VRF VPN label in MPLS [RFC4364].¶
Note that an End.DT6 may be defined for the main IPv6 table, in which case an End.DT6 supports the equivalent of an IPv6-in-IPv6 decapsulation (without VPN/tenant implication).¶
The End.DT6 SID MUST be the last segment in an SR Policy, and a SID instance is associated with an IPv6 FIB table T.¶
When N receives a packet destined to S and S is a local End.DT6 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DT6 SID, N does the following:¶
4.7. End.DT4: Decapsulation and Specific IPv4 Table Lookup
The "Endpoint with decapsulation and specific IPv4 table lookup" behavior ("End.DT4" for short) is a variant of the End.T behavior.¶
One of the applications of the End.DT4 behavior is the L3VPNv4 use case where a FIB lookup in a specific tenant table at the egress PE is required. This is equivalent to the per-VRF VPN label in MPLS [RFC4364].¶
Note that an End.DT4 may be defined for the main IPv4 table, in which case an End.DT4 supports the equivalent of an IPv4-in-IPv6 decapsulation (without VPN/tenant implication).¶
The End.DT4 SID MUST be the last segment in an SR Policy, and a SID instance is associated with an IPv4 FIB table T.¶
When N receives a packet destined to S and S is a local End.DT4 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DT4 SID, N does the following:¶
4.8. End.DT46: Decapsulation and Specific IP Table Lookup
The "Endpoint with decapsulation and specific IP table lookup" behavior ("End.DT46" for short) is a variant of the End.DT4 and End.DT6 behavior.¶
One of the applications of the End.DT46 behavior is the L3VPN use case where a FIB lookup in a specific IP tenant table at the egress PE is required. This is equivalent to the single per-VRF VPN label (for IPv4 and IPv6) in MPLS [RFC4364].¶
Note that an End.DT46 may be defined for the main IP table, in which case an End.DT46 supports the equivalent of an IP-in-IPv6 decapsulation (without VPN/tenant implication).¶
The End.DT46 SID MUST be the last segment in an SR Policy, and a SID instance is associated with an IPv4 FIB table T4 and an IPv6 FIB table T6.¶
When N receives a packet destined to S and S is a local End.DT46 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DT46 SID, N does the following:¶
4.9. End.DX2: Decapsulation and L2 Cross-Connect
The "Endpoint with decapsulation and L2 cross-connect" behavior ("End.DX2" for short) is a variant of the Endpoint behavior.¶
One of the applications of the End.DX2 behavior is the L2VPN [RFC4664] / EVPN Virtual Private Wire Service (VPWS) [RFC7432] [RFC8214] use case.¶
The End.DX2 SID MUST be the last segment in an SR Policy, and it is associated with one outgoing interface I.¶
When N receives a packet destined to S and S is a local End.DX2 SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.DX2 SID, N does the following:¶
Note that an End.DX2 SID may also be associated with a bundle of outgoing interfaces.¶
4.10. End.DX2V: Decapsulation and VLAN L2 Table Lookup
The "Endpoint with decapsulation and VLAN L2 table lookup" behavior ("End.DX2V" for short) is a variant of the End.DX2 behavior.¶
One of the applications of the End.DX2V behavior is the EVPN Flexible Cross-connect use case. The End.DX2V behavior is used to perform a lookup of the Ethernet frame VLANs in a particular L2 table. Any SID instance of this behavior is associated with an L2 table T.¶
When N receives a packet whose IPv6 DA is S and S is a local End.DX2 SID, the processing is identical to the End.DX2 behavior except for the Upper-Layer header processing, which is modified as follows:¶
4.11. End.DT2U: Decapsulation and Unicast MAC L2 Table Lookup
The "Endpoint with decapsulation and unicast MAC L2 table lookup" behavior ("End.DT2U" for short) is a variant of the End behavior.¶
One of the applications of the End.DT2U behavior is the EVPN Bridging Unicast [RFC7432]. Any SID instance of the End.DT2U behavior is associated with an L2 table T.¶
When N receives a packet whose IPv6 DA is S and S is a local End.DT2U SID, the processing is identical to the End.DX2 behavior except for the Upper-Layer header processing, which is as follows:¶
4.12. End.DT2M: Decapsulation and L2 Table Flooding
The "Endpoint with decapsulation and L2 table flooding" behavior ("End.DT2M" for short) is a variant of the End.DT2U behavior.¶
Two of the applications of the End.DT2M behavior are the EVPN Bridging of Broadcast, Unknown Unicast, and Multicast (BUM) traffic with Ethernet Segment Identifier (ESI) filtering [RFC7432] and the EVPN Ethernet-Tree (E-Tree) [RFC8317] use cases.¶
Any SID instance of this behavior is associated with an L2 table T. The behavior also takes an argument: "Arg.FE2". This argument provides a local mapping to ESI for split-horizon filtering of the received traffic to exclude a specific OIF (or set of OIFs) from L2 table T flooding. The allocation of the argument values is local to the SR Segment Endpoint Node instantiating this behavior, and the signaling of the argument to other nodes for the EVPN functionality occurs via the control plane.¶
When N receives a packet whose IPv6 DA is S and S is a local End.DT2M SID, the processing is identical to the End.DX2 behavior except for the Upper-Layer header processing, which is as follows:¶
4.13. End.B6.Encaps: Endpoint Bound to an SRv6 Policy with Encapsulation
This is a variation of the End behavior.¶
One of its applications is to express scalable traffic
Any SID instance of this behavior is associated with an SR Policy B and a source address A.¶
When N receives a packet whose IPv6 DA is S and S is a local End.B6.Encaps SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.B6.Encaps SID, process the packet as per Section 4.1.1.¶
4.14. End.B6.Encaps.Red: End.B6.Encaps with Reduced SRH
This is an optimization of the End.B6.Encaps behavior.¶
End
The SRH Last Entry field is set as defined in Section 4.1.1 of [RFC8754].¶
The SRH MAY be omitted when the SRv6 Policy only contains one SID and there is no need to use any flag, tag, or TLV.¶
4.15. End.BM: Endpoint Bound to an SR-MPLS Policy
The "Endpoint bound to an SR-MPLS Policy" behavior ("End.BM" for short) is a variant of the End behavior.¶
The End.BM behavior is required to express scalable traffic
Any SID instance of this behavior is associated with an SR-MPLS Policy B.¶
When N receives a packet whose IPv6 DA is S and S is a local End.BM SID, N does the following:¶
When processing the Upper-Layer header of a packet matching a FIB entry locally instantiated as an End.BM SID, process the packet as per Section 4.1.1.¶
4.16. Flavors
The Penultimate Segment Pop (PSP) of the SRH, Ultimate Segment Pop (USP) of the SRH, and Ultimate Segment Decapsulation (USD) flavors are variants of the End, End.X, and End.T behaviors. The End, End.X, and End.T behaviors can support these flavors either individually or in combinations.¶
4.16.1. PSP: Penultimate Segment Pop of the SRH
4.16.1.1. Guidelines
SR Segment Endpoint Nodes advertise the SIDs instantiated on them via control-plane protocols as described in Section 8. Different behavior IDs are allocated for flavored and unflavored SIDs (see Table 6).¶
An SR Segment Endpoint Node that offers both PSP- and
non
The SR Segment Endpoint Node only advertises the PSP flavor if the operator enables this capability at the node.¶
The PSP operation is deterministical
A PSP-flavored SID is used by the SR source node when it needs to instruct the penultimate SR Segment Endpoint Node listed in the SRH to remove the SRH from the IPv6 header.¶
4.16.1.2. Definition
SR Segment Endpoint Nodes receive the IPv6 packet with the Destination Address field of the IPv6 header equal to its SID address.¶
A penultimate SR Segment Endpoint Node is one that, as part of the SID processing, copies the last SID from the SRH into the IPv6 Destination Address and decrements the Segments Left value from one to zero.¶
The PSP operation only takes place at a penultimate SR Segment Endpoint Node and does not happen at any transit node. When a SID of PSP flavor is processed at a non-penultimate SR Segment Endpoint Node, the PSP behavior is not performed as described in the pseudocode below since Segments Left would not be zero.¶
The SRH processing of the End, End.X, and End.T behaviors are modified: after the instruction "S14. Update IPv6 DA with Segment List[Segments Left]" is executed, the following instructions must be executed as well:¶
The usage of PSP does not increase the MTU of the IPv6 packet and hence does not have any impact on the Path MTU (PMTU) discovery mechanism.¶
As a reminder, Section 5 of [RFC8754] defines the SR Deployment Model within the SR Domain [RFC8402]. Within this framework, the Authentication Header (AH) is not used to secure the SRH as described in Section 7.5 of [RFC8754]. Hence, the discussion of applicability of PSP along with AH usage is beyond the scope of this document.¶
In the context of this specification, the End, End.X, and End.T behaviors with PSP do not contravene Section 4 of [RFC8200] because the destination address of the incoming packet is the address of the node executing the behavior.¶
4.16.1.3. Use Case
One use case for the PSP functionality is streamlining the operation of an egress border router.¶
In the above illustration, for a packet sent from the ingress
provider edge (iPE) to the egress provider edge (ePE), node R3 is an
intermediate traffic
The benefits for the egress PE are straightforward
4.16.2. USP: Ultimate Segment Pop of the SRH
The SRH processing of the End, End.X, and End.T behaviors are modified; the instructions S02-S04 are substituted by the following ones:¶
One of the applications of the USP flavor is when a packet with an SRH is destined to an application on hosts with smartNICs ("Smart Network Interface Cards") implementing SRv6. The USP flavor is used to remove the consumed SRH from the extension header chain before sending the packet to the host.¶
4.16.3. USD: Ultimate Segment Decapsulation
The Upper-Layer header processing of the End, End.X, and End.T behaviors are modified as follows:¶
End:¶
End.T:¶
End.X:¶
One of the applications of the USD flavor is the case of a Topology Independent Loop-Free Alternate (TI-LFA) in P routers with encapsulation. The USD flavor allows the last SR Segment Endpoint Node in the repair path list to decapsulate the IPv6 header added at the TI-LFA Point of Local Repair and forward the inner packet.¶
5. SR Policy Headend Behaviors
This section describes a set of SRv6 Policy Headend [RFC8402] behaviors.¶
This list is not exhaustive, and future documents may define additional behaviors.¶
5.1. H.Encaps: SR Headend with Encapsulation in an SR Policy
Node N receives two packets P1=(A, B2) and P2=(A,B2)(B3, B2, B1; SL=1). B2 is neither a local address nor SID of N.¶
Node N is configured with an IPv6 address T (e.g., assigned to its loopback).¶
N steers the transit packets P1 and P2 into an SRv6 Policy with a Source Address T and a segment list <S1, S2, S3>.¶
The H.Encaps encapsulation behavior is defined as follows:¶
After the H.Encaps behavior, P1' and P2' respectively look like:¶
The received packet is encapsulated unmodified (with the exception of the IPv4 TTL or IPv6 Hop Limit that is decremented as described in [RFC2473]).¶
The H.Encaps behavior is valid for any kind of L3 traffic. This behavior is commonly used for L3VPN with IPv4 and IPv6 deployments. It may be also used for TI-LFA [SR-TI-LFA] at the Point of Local Repair.¶
The push of the SRH MAY be omitted when the SRv6 Policy only contains one segment and there is no need to use any flag, tag, or TLV.¶
5.2. H.Encaps.Red: H.Encaps with Reduced Encapsulation
The H.Encaps.Red behavior is an optimization of the H.Encaps behavior.¶
H.Encaps.Red reduces the length of the SRH by excluding the first SID in the SRH of the pushed IPv6 header. The first SID is only placed in the Destination Address field of the pushed IPv6 header.¶
After the H.Encaps.Red behavior, P1' and P2' respectively look like:¶
The push of the SRH MAY be omitted when the SRv6 Policy only contains one segment and there is no need to use any flag, tag, or TLV.¶
5.3. H.Encaps.L2: H.Encaps Applied to Received L2 Frames
The H.Encaps.L2 behavior encapsulates a received Ethernet [IEEE.802.3_2018] frame and its attached VLAN header, if present, in an IPv6 packet with an SRH. The Ethernet frame becomes the payload of the new IPv6 packet.¶
The Next Header field of the SRH MUST be set to 143.¶
The push of the SRH MAY be omitted when the SRv6 Policy only contains one segment and there is no need to use any flag, tag, or TLV.¶
The encapsulating node MUST remove the preamble (if any) and frame check sequence (FCS) from the Ethernet frame upon encapsulation, and the decapsulating node MUST regenerate, as required, the preamble and FCS before forwarding the Ethernet frame.¶
5.4. H.Encaps.L2.Red: H.Encaps.Red Applied to Received L2 Frames
The H.Encaps.L2.Red behavior is an optimization of the H.Encaps.L2 behavior.¶
H.Encaps.L2.Red reduces the length of the SRH by excluding the first SID in the SRH of the pushed IPv6 header. The first SID is only placed in the Destination Address field of the pushed IPv6 header.¶
The push of the SRH MAY be omitted when the SRv6 Policy only contains one segment and there is no need to use any flag, tag, or TLV.¶
6. Counters
A node supporting this document SHOULD implement a pair of traffic counters (one for packets and one for bytes) per local SID entry, for traffic that matched that SID and was processed successfully (i.e., packets that generate ICMP Error Messages or are dropped are not counted). The retrieval of these counters from MIB, NETCONF/YANG, or any other data structure is outside the scope of this document.¶
7. Flow-Based Hash Computation
When a flow-based selection within a set needs to be performed, the IPv6 Source Address, the IPv6 Destination Address, and the IPv6 Flow Label of the outer IPv6 header MUST be included in the flow-based hash.¶
This may occur in any of the following scenarios:¶
Additionally, any transit router in an SRv6 domain includes the outer flow label in its ECMP flow-based hash [RFC6437].¶
8. Control Plane
In an SDN environment, one expects the controller to explicitly provision the SIDs and/or discover them as part of a service discovery function. Applications residing on top of the controller could then discover the required SIDs and combine them to form a distributed network program.¶
The concept of "SRv6 Network Programming" refers to the capability of an application to encode any complex program as a set of individual functions distributed through the network. Some functions relate to underlay SLA, others to overlay/tenant, and others to complex applications residing in VMs and containers.¶
While not necessary for an SDN control plane, the remainder of this section provides a high-level illustrative overview of how control-plane protocols may be involved with SRv6. Their specification is outside the scope of this document.¶
8.1. IGP
The End, End.T, and End.X SIDs express topological behaviors and hence are expected to be signaled in the IGP together with the flavors PSP, USP, and USD. The IGP should also advertise the Maximum SID Depth (MSD) capability of the node for each type of SRv6 operation -- in particular, the SR source (e.g., H.Encaps), intermediate endpoint (e.g., End and End.X), and final endpoint (e.g., End.DX4 and End.DT6) behaviors. These capabilities are factored in by an SR source node (or a controller) during the SR Policy computation.¶
The presence of SIDs in the IGP does not imply any routing semantics to the addresses represented by these SIDs. The routing reachability to an IPv6 address is solely governed by the non-SID-related IGP prefix reachability information that includes locators. Routing is neither governed nor influenced in any way by a SID advertisement in the IGP.¶
These SIDs provide important topological behaviors for the IGP to build Fast Reroute (FRR) solutions based on TI-LFA [SR-TI-LFA] and for TE processes relying on an IGP topology database to build SR Policies.¶
8.2. BGP-LS
BGP-LS provides the functionality for topology discovery that includes the SRv6 capabilities of the nodes, their locators, and locally instantiated SIDs. This enables controllers or applications to build an inter-domain topology that can be used for computation of SR Policies using the SRv6 SIDs.¶
8.3. BGP IP/VPN/EVPN
The End.DX4, End.DX6, End.DT4, End.DT6, End.DT46, End.DX2, End.DX2V, End.DT2U, and End.DT2M SIDs can be signaled in BGP.¶
In some scenarios, an egress PE advertising a VPN route might wish to abstract the specific behavior bound to the SID from the ingress PE and other routers in the network. In such case, the SID may be advertised using the Opaque SRv6 Endpoint Behavior codepoint defined in Table 6. The details of such control-plane signaling mechanisms are out of the scope of this document.¶
8.4. Summary
The following table summarizes which SID behaviors may be signaled in which control-plane protocol.¶
The following table summarizes which SR Policy Headend capabilities may be signaled in which control-plane protocol.¶
The previous table describes generic capabilities. It does not describe specific instantiated SR Policies.¶
For example, a BGP-LS advertisement of H.Encaps behavior would describe the capability of node N to perform H.Encaps behavior. Specifically, it would describe how many SIDs could be pushed by N without significant performance degradation.¶
As a reminder, an SR Policy is always assigned a Binding SID [RFC8402]. Binding SIDs are also advertised in BGP-LS as shown in Table 3. Hence, Table 4 only focuses on the generic capabilities related to H.Encaps.¶
9. Security Considerations
The security considerations for Segment Routing are discussed in [RFC8402]. Section 5 of [RFC8754] describes the SR Deployment Model and the requirements for securing the SR Domain. The security considerations of [RFC8754] also cover topics such as attack vectors and their mitigation mechanisms that also apply the behaviors introduced in this document. Together, they describe the required security mechanisms that allow establishment of an SR domain of trust. Having such a well-defined trust boundary is necessary in order to operate SRv6-based services for internal traffic while preventing any external traffic from accessing or exploiting the SRv6-based services. Care and rigor in IPv6 address allocation for use for SRv6 SID allocations and network infrastructure addresses, as distinct from IPv6 addresses allocated for end users and systems (as illustrated in Section 5.1 of [RFC8754]), can provide the clear distinction between internal and external address space that is required to maintain the integrity and security of the SRv6 Domain. Additionally, [RFC8754] defines a Hashed Message Authentication Code (HMAC) TLV permitting SR Segment Endpoint Nodes in the SR domain to verify that the SRH applied to a packet was selected by an authorized party and to ensure that the segment list is not modified after generation, regardless of the number of segments in the segment list. When enabled by local configuration, HMAC processing occurs at the beginning of SRH processing as defined in Section 2.1.2.1 of [RFC8754].¶
This document introduces SRv6 Endpoint and SR Policy Headend behaviors for implementation on SRv6-capable nodes in the network. The definition of the SR Policy Headend should be consistent with the specific behavior used and any local configuration (as specified in Section 4.1.1). As such, this document does not introduce any new security considerations.¶
The SID behaviors specified in this document have the same HMAC TLV handling and mutability properties with regard to the Flags, Tag, and Segment List field as the SID behavior specified in [RFC8754].¶
10. IANA Considerations
10.1. Ethernet Next Header Type
IANA has allocated "Ethernet" (value 143) in the "Assigned
Internet Protocol Numbers" registry (see <https://
10.2. SRv6 Endpoint Behaviors Registry
IANA has created a new top-level registry
called "Segment Routing" (see <https://
Additionally, IANA has created a new subregistry called "SRv6 Endpoint Behaviors" under the top-level "Segment Routing" registry. This subregistry maintains 16-bit identifiers for the SRv6 Endpoint behaviors. This registry is established to provide consistency for control-plane protocols that need to refer to these behaviors. These values are not encoded in the function bits within a SID.¶
10.2.1. Registration Procedures
The range of the registry is 0-65535
10.2.2. Initial Registrations
The initial registrations for the subregistry are as follows:¶
11. References
11.1. Normative References
- [IEEE
.802 .3 _2018] -
IEEE, "IEEE Standard for Ethernet", IEEE 802.3-2018, DOI 10
.1109 , , <https:///IEEESTD .2018 .8457469 ieeexplore >..ieee .org /document /8457469 - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC2473]
-
Conta, A. and S. Deering, "Generic Packet Tunneling in IPv6 Specification", RFC 2473, DOI 10
.17487 , , <https:///RFC2473 www >..rfc -editor .org /info /rfc2473 - [RFC6437]
-
Amante, S., Carpenter, B., Jiang, S., and J. Rajahalme, "IPv6 Flow Label Specification", RFC 6437, DOI 10
.17487 , , <https:///RFC6437 www >..rfc -editor .org /info /rfc6437 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 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 , , <https:///RFC8200 www >..rfc -editor .org /info /rfc8200 - [RFC8402]
-
Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing Architecture", RFC 8402, DOI 10
.17487 , , <https:///RFC8402 www >..rfc -editor .org /info /rfc8402 - [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 , , <https:///RFC8754 www >..rfc -editor .org /info /rfc8754
11.2. Informative References
- [RFC4193]
-
Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast Addresses", RFC 4193, DOI 10
.17487 , , <https:///RFC4193 www >..rfc -editor .org /info /rfc4193 - [RFC4364]
-
Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private Networks (VPNs)", RFC 4364, DOI 10
.17487 , , <https:///RFC4364 www >..rfc -editor .org /info /rfc4364 - [RFC4664]
-
Andersson, L., Ed. and E. Rosen, Ed., "Framework for Layer 2 Virtual Private Networks (L2VPNs)", RFC 4664, DOI 10
.17487 , , <https:///RFC4664 www >..rfc -editor .org /info /rfc4664 - [RFC4761]
-
Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and Signaling", RFC 4761, DOI 10
.17487 , , <https:///RFC4761 www >..rfc -editor .org /info /rfc4761 - [RFC4762]
-
Lasserre, M., Ed. and V. Kompella, Ed., "Virtual Private LAN Service (VPLS) Using Label Distribution Protocol (LDP) Signaling", RFC 4762, DOI 10
.17487 , , <https:///RFC4762 www >..rfc -editor .org /info /rfc4762 - [RFC7432]
-
Sajassi, A., Ed., Aggarwal, R., Bitar, N., Isaac, A., Uttaro, J., Drake, J., and W. Henderickx, "BGP MPLS-Based Ethernet VPN", RFC 7432, DOI 10
.17487 , , <https:///RFC7432 www >..rfc -editor .org /info /rfc7432 - [RFC8126]
-
Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10
.17487 , , <https:///RFC8126 www >..rfc -editor .org /info /rfc8126 - [RFC8214]
-
Boutros, S., Sajassi, A., Salam, S., Drake, J., and J. Rabadan, "Virtual Private Wire Service Support in Ethernet VPN", RFC 8214, DOI 10
.17487 , , <https:///RFC8214 www >..rfc -editor .org /info /rfc8214 - [RFC8317]
-
Sajassi, A., Ed., Salam, S., Drake, J., Uttaro, J., Boutros, S., and J. Rabadan, "Ethernet-Tree (E-Tree) Support in Ethernet VPN (EVPN) and Provider Backbone Bridging EVPN (PBB-EVPN)", RFC 8317, DOI 10
.17487 , , <https:///RFC8317 www >..rfc -editor .org /info /rfc8317 - [SR-TI-LFA]
-
Litkowski, S., Bashandy, A., Filsfils, C., Francois, P., Decraene, B., and D. Voyer, "Topology Independent Fast Reroute using Segment Routing", Work in Progress, Internet-Draft, draft
-ietf , , <https://-rtgwg -segment -routing -ti -lfa -06 tools >..ietf .org /html /draft -ietf -rtgwg -segment -routing -ti -lfa -06 - [SRV6
-NET -PGM -ILLUST] -
Filsfils, C., Camarillo, P., Ed., Li, Z., Matsushima, S., Decraene, B., Steinberg, D., Lebrun, D., Raszuk, R., and J. Leddy, "Illustrations for SRv6 Network Programming", Work in Progress, Internet-Draft, draft
-filsfils , , <https://-spring -srv6 -net -pgm -illustration -03 tools >..ietf .org /html /draft -filsfils -spring -srv6 -net -pgm -illustration -03
Acknowledgements
The authors would like to acknowledge Stefano Previdi, Dave Barach, Mark Townsley, Peter Psenak, Thierry Couture, Kris Michielsen, Paul Wells, Robert Hanzl, Dan Ye, Gaurav Dawra, Faisal Iqbal, Jaganbabu Rajamanickam, David Toscano, Asif Islam, Jianda Liu, Yunpeng Zhang, Jiaoming Li, Narendra A.K, Mike Mc Gourty, Bhupendra Yadav, Sherif Toulan, Satish Damodaran, John Bettink, Kishore Nandyala Veera Venk, Jisu Bhattacharya, Saleem Hafeez, and Brian Carpenter.¶