Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Key concepts of SRv6

Want to summarize with AI?

Log in

Defines the architectural components and behaviors that determine how packets are programmed, transported, and processed across an SRv6 network.


The key concepts of SRv6 are described in this table.

Table 1. SRv6 Concepts

SRv6 Concept

Description

Network program in the packet header

The network programming model refers to the approach of encoding network operations and services directly into IPv6 headers using the concept of segments.

Segment Routing Header (SRH):

Encodes an ordered list of instructions (segments) within each packet.

Segment Identifiers (SIDs)

28-bit values that represent routing instructions, functions, or paths.

SRv6 node roles

Nodes in an SRv6 network perform specific functions as source, transit, or endpoint nodes based on their position and SID processing requirements.


Network program in the packet header

The network programming model in SRv6 refers to the approach of encoding network operations and services directly into IPv6 headers using the concept of segments. SRv6 leverages the native IPv6 protocol to implement segment routing functionalities, allowing for flexible and scalable traffic engineering, and network programmability.

In SRv6, an IPv6 address represents an instruction. SRv6 uses a new type of IPv6 Routing Extension Header, called the Segment Routing Header (SRH), in order to encode an ordered list of instructions. The active segment is indicated by the destination address of the packet, and the next segment is indicated by a pointer in the SRH.

An packet header includes these components:

  • IPv6 header: This is the standard IPv6 header, which includes the source address of the packet and destination address.

  • Destination address: In a standard IPv6 header, the destination address contains a locator and a function.

  • Segment Routing Header (SRH): SRH contains an ordered list of segments that the packet must traverse and header is inserted between the IPv6 header and the payload. SRH includes these components:

    • Active segment: Indicates the current segment being processed.

    • Locator and Function: Each segment consists of a locator and a function. The locator identifies a network node or a set of nodes, while the function specifies the action to be performed at that node.

  • Payload: This section contains the actual data being transmitted. It can encapsulate various protocols, such as IPv4, IPv6, or Ethernet.

This figure illustrates the structure of a network program within the SRv6 packet header. In the example, there are multiple segments, each with its locator (Locator 1, Locator 2, Locator 3) and function (Function 1, Function 2, Function 3). The number of segments is determined by the Segments Left field in the SRH.

Figure 1. Packet Header

Segment Routing Header

Segment Routing Header (SRH) is an IPv6 routing extension header that

  • embeds an ordered list of instructions, called segments, within each packet

  • facilitates efficient routing, and network programmability, and

  • encodes explicit paths using a list of IPv6 addresses.

Segments are instructions represented as IPv6 addresses, that specify the sequence of nodes or functions a packet should traverse through a network using segment routing. For more information about SRH, see IETF RFC IPv6 Segment Routing Header (SRH).

Fields in the SRH

The SRH enables source routing in IPv6 by inserting a sequence of segments directly into packets. The active segment specifies the current destination address, while a pointer in the SRH identifies the next segment to be processed.

Field Description
Next Header Identifies the type of header immediately following the SRH.
Hdr Ext Len The length of the SRH in 8-octet units, not including the first 8 octets.
Segments Left Specifies the number of route segments remaining, i.e., the number of explicitly listed intermediate nodes still to be visited before reaching the final destination.
Last Entry Contains the index (zero-based) of the last element of the segment list.
Flags Contains 8 bits of flags.
Tag Tags a packet as part of a class or group of packets, such as packets sharing the same set of properties.
Segment List A list of 128-bit IPv6 addresses representing the nth segment in the segment list. The encoding starts from the last segment of the SR policy: Segment List [0] contains the last segment, Segment List [1] contains the penultimate segment, and so on.

Format of SRH


     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Last Entry   |     Flags     |              Tag              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |            Segment List[0] (128-bit IPv6 address)             |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |                                                               |
                                  ...
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |            Segment List[n] (128-bit IPv6 address)             |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    //                                                             //
    //         Optional Type Length Value objects (variable)       //
    //                                                             //
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Segment Identifiers

A Segment Identifier (SID) is a 128-bit value that identifies segments in an SRv6 network and consists of these three parts:

  • Locator (LOC): This is the first part of the SID with most significant bits and represents an address of a specific SRv6 node.

    • SID Block (B): The network designator, representing the SRv6 domain or a known address space.

    • Node ID (N): The specific identifier for the node within the SRv6 network.

  • Function (FUNCT): The portion of the SID that specifies a local behavior, or network instruction, executed by the node identified by the Locator. The Function field is opaque and bound to the SID’s behavior.

  • Arguments (ARG): An optional field containing additional information needed for SID processing. ARG values should remain constant within a flow to maintain consistent Equal-Cost Multi-Path (ECMP) hashing and avoid packet reordering.


SRv6 node roles

In an SRv6 network, nodes along the packet path perform specific roles based on their position in the network and the SID processing requirements. Each node along the SRv6 packet path has a different function.

The figure visually represents the different node roles in an SRv6 network.

  • Node 1 is the headend or the source node.

  • Node 4 and 5 are the transit node.

  • Node 8 is the endpoint node.

Figure 2. SRv6 Nodes

This table provides an overview of the roles and descriptions of various node types, highlighting their specific functions within an SRv6 network.

Table 2. SRv6 node roles

SRv6 node

Description

Source node or headend node

A node that can generate an IPv6 packet with an SRH, or an ingress node that can impose an SRH on an IPv6 packet. Also known as headend node.

For more information, see SRv6 Head-End Behaviors.

Transit node

A node along the path of the SRv6 packet (IPv6 packet and SRH).

The transit node does not inspect the SRH. The destination address of the IPv6 packet does not correspond to the transit node.

Endpoint node

A node in the SRv6 domain where the SRv6 segment is terminated. The destination address of the IPv6 packet with an SRH corresponds to the end point node. The segment endpoint node executes the function bound to the SID. A node where the SRv6 segment is terminated.

For more information, see SRv6 endpoint behaviors.


SRv6 headend behaviors

A segment routing headend behavior is a set of actions and mechanisms performed by a head-end router (or source node) that:

  • implements segment routing policies to manage and direct traffic through a network

  • initiates and enforces SR policies by defining the path traffic should take, and

  • ensures efficient traffic forwarding by leveraging SRv6.

SRv6 headend behavior variants

SRv6 supports these head-end behaviors:

  • H.Encaps.Red—H.Encaps with reduced encapsulation

  • H.Insert.Red—H.Insert with reduced insertion. Starting from Cisco IOS XR Release 24.3.1, the H.Insert.Red is supported.

Table 3. Feature History Table

Feature Name

Release Information

Feature Description

H.Encap.Red headend behavior

Release 25.4.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8011-12G12X4Y-A

  • 8011-12G12X4Y-D

H.Encap.Red headend behavior

Release 25.3.1

Introduced in this release on: Centralized Systems (8400 [ASIC: K100])(select variants only*)

* This feature is now supported on Cisco 8404-SYS-D routers.

H.Encap.Red headend behavior

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])

The H.Encap.Red is a headend behavior that encapsulates the original packet into a new IPv6 packet with a Segment Routing Header (SRH). By encapsulating with the SRH, you can control and manage the path the data packets take through a network.

This feature is now supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

H.Insert.Red Headend Behavior for SRv6 on Cisco Silicon One P100-based Line Cards

Release 24.3.1

Introduced in this release on: Modular Systems (8800 [LC ASIC: P100]) (select variants only*)

With H.Insert.Red head-end behavior, you can effectively steer traffic into an SR policy, allowing for fast rerouting, traffic optimization, and simplified path management without additional encapsulation.

The H.Insert.Red head-end behavior enables the router to insert a Segment Routing Header (SRH) directly into an existing IPv6 packet.

The feature is supported only on Cisco Silicon One P100-based line cards in Cisco 8800 modular routers operating in P100 compatibility mode.

* This feature is supported on:

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

Comparison between H.Encaps.Red and H.Insert.Red headend behaviors

Table 4. H.Encaps.Red versus H.Insert.Red headend behaviors

Headend behaviors

H.Encaps.Red

H.Insert.Red

Definition

The H.Encap.Red is a headend behavior that encapsulates the original packet into a new IPv6 packet with an SRH.

Note

Starting from Cisco IOS XR Release 24.3.1, we support the H.Insert.Red option.

The H.insert.Red is a headend behavior that inserts an SRH into the original IPv6 packet without encapsulating it into a new IPv6 packet.

Header manipulation

A new IPv6 header with an SRH is added to the packet, encapsulating the original packet.

The SRH is inserted into the packet by modifying the existing IPv6 header.

Packet size

The packet size increases as it includes both the SRH and an additional IPv6 header.

The packet size is smaller compared to H.encaps headend behavior. There is no extra IPv6 header and that helps maintain the packet size.

Processing at intermediate nodes

Intermediate nodes process the packet by examining the outer IPv6 header's destination address and the SRH.

Intermediate nodes process the packet by examining the inserted SRH and forwarding the packet based on the active segment.

Termination process

Ultimate Segment Pop

The termination process involves decapsulation, where the outer IPv6 header and SRH are removed to reveal the original packet.

Penultimate Segment Pop (PSP)

The termination process involves the removal of the SRH when the packet reaches the end of the SR Policy.

References

The SR Headend with Encapsulation behaviors are documented in the IETF RFC 8986 SRv6 Network Programming.

The SR Headend with Insertion head-end behaviors are documented in the following IETF draft:

https://datatracker.ietf.org/doc/draft-filsfils-spring-srv6-net-pgm-insertion/


SRv6 endpoint behaviors

The SRv6 endpoint behaviors are a set of actions and mechanisms that:

  • processes an SRv6 segment matching the network device's own address

  • terminates the SRv6 segment at a node within the SRv6 domain, and

  • executes the function bound to the SID.

The SRv6 endpoint behaviors are documented in the IETF RFC 8986 SRv6 Network Programming .

List of SRv6 endpoint behaviors

These are a subset of defined SRv6 endpoint behaviors that can be associated with a SID.

Basic Endpoint functions:

  • End—Endpoint function. The SRv6 instantiation of a Prefix SID [ RFC8402 ].

  • End.X—Endpoint with Layer-3 cross-connect. The SRv6 instantiation of an Adj SID [ RFC8402 ].

Decapsulation related:

  • End—Endpoint function. The SRv6 instantiation of a Prefix SID [ RFC8402 ].

  • End.X—Endpoint with Layer-3 cross-connect. The SRv6 instantiation of an Adj SID [ RFC8402 ].

  • End.DX6—Endpoint with decapsulation and IPv6 cross-connect (IPv6-L3VPN - equivalent to per-CE VPN label).

  • End.DX4—Endpoint with decapsulation and IPv4 cross-connect (IPv4-L3VPN - equivalent to per-CE VPN label).

  • End.DT6—Endpoint with decapsulation and IPv6 table lookup (IPv6-L3VPN - equivalent to per-VRF VPN label).

  • End.DT4—Endpoint with decapsulation and IPv4 table lookup (IPv4-L3VPN - equivalent to per-VRF VPN label).

  • End.DT46—Endpoint with decapsulation and specific IP table lookup (IP-L3VPN - equivalent to per-VRF VPN label). Starting from IOS XR Release 7.5.3 , the End.DT46 endpoint is supported.

  • End.DX2—Endpoint with decapsulation and L2 cross-connect (L2VPN use-case).

Binding SID related:

  • End.B6.Encaps—Endpoint bound to an SRv6 policy with encapsulation. SRv6 instantiation of a Binding SID.

  • End.B6.Encaps.RED—End.B6.Encaps with reduced SRH. SRv6 instantiation of a Binding SID.


SRv6 endpoint behavior variants

Segment Routing over IPv6 (SRv6) defines several endpoint behavior variants for the End and End.X behaviors, depending on how the Segment Routing Header (SRH) is processed. These variants can be supported individually or in combinations.

Table 5. Comparison of endpoint behavior variants

Penultimate Segment Pop (PSP)

Ultimate Segment Pop (USP)

Ultimate Segment Decapsulation (USD)

Definition

Penultimate Segment Pop is a mechanism where the penultimate SR endpoint node processes the SRH by modifying the destination address and segments list.

Ultimate Segment Pop (USP) is a mechanism where the ultimate (last) SR Segment Endpoint Node removes the SRH from the IPv6 header when the Segments Left field equals 0.

Ultimate Segment Decapsulation (USD) is a mechanism that processes upper-layer headers by removing the outer IPv6 header and forwarding the inner packet to its destination.

Key operations

as part of the SID processing, copies the last SID from the SRH into the IPv6 Destination Address and decrements the segments list value from one to zero.

If Segments Left is 0, then:

  • Updates the Next Header field in the preceding header to the next header value of the SRH.

  • Decreases the IPv6 header Payload Length by 8*(Hdr Ext Len+1)

  • Removes the SRH from the IPv6 extension header chain

  • Proceeds to process the next header in the packet

See SRv6 endpoint behavior variants and SRv6 endpoint behavior variants

Where performed

The PSP operation takes place only at a penultimate SR Segment Endpoint Node and does not happen at non-penultimate endpoint nodes. When a SID of PSP-flavor is processed at a non-penultimate SR Segment Endpoint Node, the PSP behavior is not performed since Segments Left would not be zero.

USP is performed only at the ultimate SR Segment Endpoint Node. riggered when the Segments Left field equals 0.

USD is performed at the last SR Segment Endpoint Node in the repair path.

Applications

PSP is used when the Source SR Node instructs the penultimate SR Segment Endpoint Node to remove the SRH from the IPv6 header. The Source SR Node achieves this by using a PSP-flavored SID.

One of the applications of the USP flavor is when a packet with an SRH is destined to an application on hosts with smartNICs implementing SRv6. The USP flavor is used to remove the consumed SRH from the extension header chain before sending the packet to the host.

One of the applications of the USD flavor is the case of TI-LFA in P routers with encapsulation with H.Encaps. The USD flavor allows the last 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.

Table 6. Key operation for the end behavior

If the Upper-layer header type is...

then..

Key operation for the end behavior of USD

41 (IPv6)

  1. Removes the outer IPv6 Header with all its extension headers.

  2. Submits the packet to the egress IPv6 FIB lookup and transmission to the new destination.

4 (IPv4)

  1. Removes the outer IPv6 Header with all its extension headers.

  2. Submits the packet to the egress IPv4 FIB lookup and transmission to the new destination.

else

process as per Section 4.1.1 (Upper-Layer Header) of IETF RFC 8986 SRv6 Network Programming

Key operation for the End.X behavior of USD

41 (IPv6) or 4 (IPv4)

  1. Removes the outer IPv6 header with all its extension headers.

  2. Forwards the exposed IP packet to the L3 adjacency J.

else

process as per Section 4.1.1 (Upper-Layer Header) of IETF RFC 8986 SRv6 Network Programming