rfc-9800

Compressed SRv6 Segment List Encoding

W. Cheng (Editor), C. Filsfils, Z. Li, B. Decraene, F. Clad (Editor)
date2025-06 streamIETF areartg wgspring statusPROPOSED STANDARD pages59 canonicalhttps://www.rfc-editor.org/rfc/rfc9800 doi10.17487/RFC9800
Segment Routing over IPv6 (SRv6) is the instantiation of Segment Routing (SR) on the IPv6 data plane. This document specifies new flavors for the SRv6 endpoint behaviors defined in RFC 8986, which enable the compression of an SRv6 segment list. Such compression significantly reduces the size of the SRv6 encapsulation needed to steer packets over long segment lists. This document updates RFC 8754 by allowing a Segment List entry in the Segment Routing Header (SRH) to be either an IPv6 address, as specified in RFC 8754, or a REPLACE-CSID container in packed format, as specified in this document.

updates

Extracted elements (30)

design-rationale §3

CSIDs within a given NEXT-CSID container appear in forward order to leverage longest-prefix match (LPM) IP forwarding, while entries in the SRH Segment List appear in reversed processing order as required by RFC 8754. This asymmetry is intentional to enable hardware-efficient LPM-based SID lookup at each hop without reordering the SRH.

routing, ip

design-rationale §9.1

Two separate compression flavors (NEXT-CSID and REPLACE-CSID) are defined rather than a single mechanism because they serve different deployment needs: NEXT-CSID is optimized for smaller CSID lengths and pure LPM forwarding, while REPLACE-CSID supports wider CSID lengths and 32-bit compression better suited for networks requiring larger SID numbering spaces.

routing, ip

interoperability-note §4

A NEXT-CSID flavor is not defined for End.DX6, End.DX4, End.DT6, End.DT4, End.DT46, End.DX2, End.DX2V, End.DT2U, and End.DT2M behaviors because these behaviors are always in the last position of a SID list; the last SID of any NEXT-CSID container sequence is not required to have NEXT-CSID flavor itself.

routing, ip

interoperability-note §9.1

Both CSID flavors can coexist in the same SR domain, on the same SR segment endpoint node, and within the same segment list. However, operators should generally avoid mixing flavors within the same routing domain or Locator-Block because they have different length and allocation recommendations that may reduce compression efficiency.

routing, ip

interoperability-note §4.2

This document updates RFC 8754 by allowing each entry in the SRH Segment List to be either an IPv6 address (as in RFC 8754) or a REPLACE-CSID container in packed format. The IPv6 Destination Address field always remains a valid SRv6 SID conforming to RFC 9602; packed-format CSID containers never appear directly in the Destination Address.

routing, ip

normative-requirement §6.4 MUST

All SIDs compressed in a REPLACE-CSID sequence MUST share the same Locator-Block and the same compression scheme (16-bit or 32-bit CSID length). All SIDs except the last one in a CSID sequence MUST have the REPLACE-CSID flavor.

routing, ip

normative-requirement §4.2 MUST

An implementation MUST support a 32-bit CSID length (LNFL) for REPLACE-CSID flavor SIDs. This document also defines the REPLACE-CSID flavor for 16-bit CSID lengths.

routing, ip

normative-requirement §4.1 MUST

An implementation MUST support a 32-bit Locator-Block length (LBL) and a 16-bit CSID length (LNFL) for NEXT-CSID flavor SIDs, and MAY support any additional Locator-Block and CSID lengths.

routing, ip

normative-requirement §4.1 MUST

An SR segment endpoint node instantiating a SID with the NEXT-CSID flavor MUST accept any Argument value for that SID.

routing, ip

normative-requirement §8 REQUIRED

Signaling the SRv6 SID Structure (LBL, LNL, FL, AL values) is REQUIRED for all SIDs introduced in this document. The advertising node MUST set the length values in the SRv6 SID Structure to match the format of the SID on the SR segment endpoint node.

routing, ip

normative-requirement §6.2 MUST

The compressed SID list pushed onto the packet by the SR source node MUST comply with the rules in Sections 6.3 and 6.4 and MUST express the same list of segments as the original SID list. Failure to do so may result in the packet being dropped or misrouted.

routing, ip

normative-requirement §5 MUST NOT

The CSID value of 0 is reserved and is used to indicate the end of a CSID container. It MUST NOT be allocated to any segment.

routing, ip, registry

normative-requirement §8 MUST

The SR segment endpoint node MUST set the SID Argument bits to 0 when advertising a locally instantiated SID of this document in routing protocols such as IS-IS, OSPF, or BGP-LS.

routing, ip

normative-requirement §6.1 MUST

The SR source node MUST validate the SID structure of each CSID-flavor SID in the segment list before compression, regardless of whether the segment list is explicitly configured, locally computed, or advertised by a controller. A SID with an unknown or invalid structure MUST be treated as uncompressible.

routing, ip

normative-requirement §5.3 SHOULD

To ensure any valid Argument value is accepted, an SR segment endpoint node instantiating a NEXT-CSID or REPLACE-CSID flavor SID should install a FIB entry matching only the Locator and Function parts of the SID (prefix length LBL+LNL+FL).

routing, ip

normative-requirement §9.3 MUST

When pinging a SID of this document, the SR source node MUST construct the IPv6 packet as described in Section 6, including computing the ICMPv6 checksum using the ultimate destination address as defined in Section 6.5.

routing, ip

normative-requirement §6.3 MUST

When the Argument of a NEXT-CSID container is not used to full capacity, the remaining least significant bits of that Argument MUST be set to 0.

routing, ip

protocol-element §2

A Compressed-SID (CSID) is a compressed encoding of an SRv6 SID that includes the Locator-Node and Function bits of the SID being compressed. If either constituent is empty (zero length), the same applies to its CSID encoding. The combined Locator-Node and Function length is called CSID length (LNFL).

routing, ip

protocol-element §2

A CSID container is a 128-bit IPv6 address that functions as a container holding a list of one or more CSIDs and the Argument (if any) of the last CSID. A CSID sequence is a group of one or more consecutive SID list entries encoding the common Locator-Block and at least one CSID container.

routing, ip

protocol-element §7.1

End.LBS (Endpoint with SRv6 Locator-Block Swap) is a new SRv6 endpoint behavior that modifies the Locator-Block of the active CSID sequence, enabling a CSID sequence to span multiple routing domains. It is used when the routing domain boundary is at the SR segment endpoint node itself. It is defined with both NEXT-CSID and REPLACE-CSID flavors.

routing, ip

protocol-element §7.2

End.XLBS (Endpoint with L3 cross-connect and SRv6 Locator-Block Swap) is a new SRv6 endpoint behavior combining L3 cross-connect with Locator-Block swap. It is used when the routing domain boundary is on a link adjacent to the SR segment endpoint node. It is defined with both NEXT-CSID and REPLACE-CSID flavors.

routing, ip

protocol-element §5

The Global Identifiers Block (GIB) is a pool of CSID values with global semantic within the Locator-Block, shared across all SR segment endpoint nodes; used primarily for node-identifying segments like End. The Local Identifiers Block (LIB) is a per-node pool with local semantic, suitable for adjacency and service segments like End.X, End.DT*, and End.DX*.

routing, ip

protocol-element §4.1

The NEXT-CSID flavor compresses a segment list where each CSID container is a fully formed SRv6 SID: its Locator-Node+Function are those of the first CSID and its Argument carries subsequent CSIDs. Contiguous NEXT-CSID containers are independent and can be treated as separate CSID sequences.

routing, ip

protocol-element §4.2

The REPLACE-CSID flavor compresses a segment list where only the first entry in a CSID sequence is a fully formed SRv6 SID; remaining entries are CSID containers in packed format carrying subsequent CSIDs without the Locator-Block. The Argument of the first SID carries an index indicating the current CSID position within the current packed container.

routing, ip

registry §12.1

IANA updated the 'SRv6 Endpoint Behaviors' registry under the 'Segment Routing' registry group to assign values 43–92 (and additional higher values) for End, End.X, End.T, End.B6.Encaps, End.B6.Encaps.Red, End.BM, and End.DX/DT variants with NEXT-CSID and REPLACE-CSID flavors, and combinations with PSP/USP/USD flavors; references updated to RFC 9800 with IETF change control.

registry, routing

security-consideration §11

The NEXT-CSID and REPLACE-CSID flavors do not introduce new SID semantics or change how the SID list is encoded in the IPv6 packet. The paths enforced using compressed segment list encoding are topologically and semantically equivalent to those using uncompressed RFC 8986 SIDs, so this document is subject to the same security considerations as RFC 8402, RFC 8754, and RFC 8986.

security, routing, ip

state-machine §4.1.1

NEXT-CSID endpoint processing: if DA.Argument is non-zero, copy DA.Argument into bits [LBL..(LBL+AL-1)] of the Destination Address, zero bits [(LBL+AL)..127], decrement Hop Limit, and submit for FIB lookup (without advancing Segments Left). If DA.Argument is zero, advance normally per RFC 8986 by copying the next SRH Segment List entry to the Destination Address.

routing, ip

state-machine §4.2.1

REPLACE-CSID endpoint processing: if DA.Arg.Index is non-zero, decrement it and extract the CSID at the new index from the current packed container into bits [LBL..LBL+LNFL-1] of the Destination Address. If DA.Arg.Index is zero, decrement Segments Left and set DA.Arg.Index to K-1, then extract the CSID from the next packed container. A zero CSID value or reaching the end of the segment list terminates the CSID sequence.

routing, ip

wire-format §4.1

A NEXT-CSID flavor SID is a 128-bit container structured as: Locator-Block (LBL bits) | Locator-Node+Function of first CSID (LNFL bits) | Argument carrying subsequent CSIDs (AL = 128-LBL-LNFL bits). Each subsequent CSID is packed into the Argument in forward order, most significant bits first. A container can carry up to K = floor((128-LBL)/LNFL) CSIDs.

routing, ip

wire-format §4.2

A REPLACE-CSID container in packed format is a 128-bit Segment List entry split into K = floor(128/LNFL) positions of LNFL bits each, with CSIDs packed from least significant to most significant position (the second CSID in the sequence occupies position K-1, the third K-2, etc.). If LNFL does not divide 128 evenly, zero padding fills the least significant remaining bits.

routing, ip