Skip to main content

3. SRv6 SID

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:

  • A FIB entry that represents a locally instantiated SRv6 SID

  • A FIB entry that represents a local interface, not locally instantiated as an SRv6 SID

  • A FIB entry that represents a nonlocal route

  • No Match

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:

  • Assign block B::/48 to the SR domain

  • Assign a unique B:N::/64 block to each SRv6-enabled node in the domain

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:

  • A network operator may assign an SRv6 SID block 2001:db8:bbbb::/48 from their in-house operation block for their SRv6 infrastructure.

  • A network operator may assign an SRv6 Locator 2001:db8:bbbb:3::/64 to one particular router, for example Router 3, in their SR Domain.

  • At Router 3, within the locator 2001:db8:bbbb:3::/64, the network operator or the router performs dynamic assignment for:

    • Function 0x0100 associated with the behavior End.X (Endpoint with L3 cross-connect) between router 3 and its connected neighbor router (e.g., Router 4). This function is encoded as a 16-bit value and has no arguments (F=16, A=0).

      This SID is advertised in the control plane as 2001:db8:bbbb:3💯: with an SRv6 Endpoint Behavior codepoint value of 5.

    • Function 0x0101 associated with the behavior End.X (Endpoint with L3 cross-connect) between router 3 and its connected neighbor router (e.g., Router 2). This function is encoded as a 16-bit value and has no arguments (F=16, A=0).

      This SID is advertised in the control plane as 2001:db8:bbbb:3:101:: with an SRv6 Endpoint Behavior codepoint value of 5.

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:db8🅱️1💯: and 2001:db8🅱️2:101::.

The network learns about a path to 2001:db8🅱️1::/64 via the IGP; hence, a packet destined to 2001:db8🅱️1💯: would be routed up to N. The network does not learn about a path to 2001:db8🅱️2::/64 via the IGP; hence, a packet destined to 2001:db8🅱️2:101:: would not be routed up to N.

A packet could be steered through a non-routed SID 2001:db8🅱️2:101:: by using a SID list <...,2001:db8🅱️1💯:,2001:db8🅱️2:101::,...> where the non-routed SID is preceded by a routed SID to the same node. A packet could also be steered to a node instantiating a non-routed SID by preceding it in the SID list with an Adj-SID to that node. Routed and non-routed SRv6 SIDs are the SRv6 instantiation of global and local segments, respectively [RFC8402].