An SRv6 SID looks like an ordinary IPv6 address, and that is exactly the point. But a SID is not just an address: it is a 128-bit value split into fields, and each field answers a different question. Where do I send this packet? What should the node do when it gets there? And is there any extra data to hand to that behavior? This post takes the SID apart bit by bit: Locator, Function and Argument.
The 128-bit SID at a glance
The SRv6 network programming model (RFC 8986) defines a SID as three logical parts, written LOC:FUNCT:ARG:
|The split is logical. On the wire it is a plain IPv6 address in the destination field, and routers forward it with a normal longest-prefix match. The boundaries between fields are not carried in the packet. They are a convention that the node owning the SID, and the control plane that advertises it, agree on. The lengths of the Block, Node, Function and Argument parts are often called the "SID structure", and the control plane can advertise it so other devices (and controllers) can interpret the SID.
Locator: where to go
The Locator is the most significant part of the SID. It is a routable IPv6 prefix that belongs to the node that owns the SID. The IGP (IS-IS or OSPFv3) advertises it, so every other router installs a route to it and can deliver any packet whose destination falls inside that prefix, using plain IPv6 forwarding. This is why SRv6 transit nodes need no SRv6-specific state: they just follow the locator route.
The locator itself is usually structured as Block plus Node. The Block is a prefix shared across the whole SRv6 domain (and can be summarised), and the Node part identifies one router inside it. That split, and how to choose lengths, is its own topic; I cover it in SRv6 locator, node ID and SID block. Here, remember only the key idea: the locator is what makes a SID reachable.
Function: what to do
Once the packet reaches the owner of the locator, the Function bits tell the node which behavior to run. The node keeps a local table, often called the "My SID table", that maps each SID it owns to a behavior. Function values are local to the node: the same function number on two routers can mean two different things, because the meaning is defined by that router's own table.
RFC 8986 defines a set of standard behaviors. Some common ones:
End: the node is a waypoint. Decrement Segments Left, copy the next segment into the IPv6 destination address, forward.
End.X: like End, but forward over a specific layer-3 adjacency (a chosen link or next hop) instead of doing a normal FIB lookup.
End.DT4 / End.DT6 / End.DT46: decapsulate the outer IPv6 header and look the inner IPv4, IPv6 or either packet up in a specific VRF table. This is the building block for L3VPN service.
End.DX4 / End.DX6: decapsulate and send the inner packet to a specific next hop, without a table lookup.
Do not confuse the behavior names with the function bits. The IANA registry assigns code points to behaviors for protocol signalling, but the actual function value embedded in the address is chosen by the node (manually or dynamically allocated), so that, for example, function 0x40 might be End.DT4 for VRF "red" on one router. Treat the bits as an opaque index into a local table.
Argument: extra data for the behavior
The Argument is the least-significant, optional field. It lets the SID carry a small parameter to the behavior, so one function can serve many cases without burning a separate SID for each. Most SIDs you will meet in practice, such as End, End.X and End.DT*, use no argument, and the argument bits are all zero. When arguments are used, the owning node must ignore them for the lookup of the SID itself, matching the locator and function and treating the rest as data.
Two places where an argument shows up in the standards: the End.DT2M behavior used for EVPN Ethernet segment filtering, where an argument identifies the flooding filter, and mobile user-plane SIDs defined later, which carry session information. For a first look at SRv6, you can safely leave the argument at zero and focus on locator and function.
Worked example: carving up a /32 block
Here is an illustrative layout using the documentation prefix 2001:db8::/32 as the block. These numbers are an example, not a recommendation.
Block : 2001:db8::/32 (32 bits, shared by the domain)
Node : 0001 (16 bits, identifies router R1)
Locator : 2001:db8:1::/48 (Block + Node)
Function : 0001 (16 bits, local meaning)
Argument : 0 (unused)
SID 2001:db8:1:1:: = locator 2001:db8:1::/48 + function 0x1
If we let R1 allocate its first function (0x1) to End and its second (0x2) to End.DT4 for a customer VRF, the "My SID table" on R1 looks conceptually like this:
SID Behavior Notes
2001:db8:1:1:: End waypoint / node SID
2001:db8:1:2:: End.DT4 decap + lookup in VRF "red"The exact layout varies by implementation: some platforms place the function in the bits immediately after the locator, as above, while others use different default allocations. The principle is the same. Another router that wants to reach VRF red behind R1 simply puts 2001:db8:1:2:: in the destination address, and the network delivers it to R1 via the locator route.
Illustrative configuration
The snippet below is an illustrative IOS XR style sketch showing where the SID structure comes from. Exact syntax and defaults differ between platforms and software releases, so check your vendor documentation before using it.
segment-routing
srv6
locators
locator MAIN
prefix 2001:db8:1::/48
!
!
!
!
router isis CORE
address-family ipv6 unicast
segment-routing srv6
locator MAIN
!
!
!In a classic (non-compressed) design you configure the locator prefix, tell the IGP to advertise it, and the router allocates function values out of it for End, End.X and, when you attach it to a VRF, End.DT*. You can then inspect the allocated SIDs with the platform's SRv6 SID show commands and see the behavior each one maps to. To see this end to end on a real topology, follow the IS-IS locator, SID and function lab on IOS XR.
Why the structure matters in practice
Summarisation. Because the locator is a prefix, a whole node's SIDs are reachable through one route. Sharing a block across the domain lets you summarise at area or domain boundaries.
Fault isolation. If the locator route disappears, every SID under it becomes unreachable at once, which makes the failure easy to reason about.
Scale. Function bits give each node a large local space, since a 128-bit address leaves plenty of room after the locator for behaviors, even if the argument field is also reserved.
Header size. A full 128-bit SID per segment makes the segment list long. That is the motivation for compressed SID work, which shortens the per-segment cost. It is a separate topic from the structure described here.
Common mistakes
Assuming function numbers mean the same thing everywhere. They are local to the node that owns the locator.
Reading the field boundaries off the packet. They are not in the packet; you need the advertised SID structure or the node's configuration.
Forgetting that transit routers only look at the locator. Only the node that owns it interprets the function.
Where to go next
With the SID anatomy clear, the next question is how packets carry a list of these SIDs and how each node updates it. That is the Segment Routing Header, covered in SRv6 data plane: SRH, SIDs and forwarding. If you are new to the technology overall, start with the SRv6 versus SR-MPLS overview.
Key reference: RFC 8986 (SRv6 Network Programming) for SID structure and behaviors, and RFC 8754 for the Segment Routing Header.
Comments (0)
Please sign in to comment.