SRv6 SID Decoder and uSID Calculator¶
Paste any SRv6 SID — a classic SID or a uSID container — and the decoder splits it into its Locator-Block, node, function and argument bits, flags what the address tells you, and walks the container hop by hop the way an RFC 9800 NEXT-CSID router processes it. Every decode has its own URL, so you can link a colleague straight to it. It runs entirely in your browser: nothing you paste is sent anywhere.
How to Read an SRv6 SID¶
An SRv6 SID is a 128-bit IPv6 address that the network treats as an instruction. RFC 8986 splits it into three parts, written LOC:FUNCT:ARG:
| Part | What it is | Who reads it |
|---|---|---|
| Locator (L bits) | A routable prefix that leads to one node. It is itself split into the Block (B), the prefix shared by the whole SR domain, and the Node (N) part that picks one router | Every router: it is an ordinary IPv6 route in IS-IS, OSPFv3 or BGP |
| Function (F bits) | Selects the behavior bound to the SID on that node: End, End.X, End.DT4, and so on | Only the node that owns the locator |
| Argument (A bits) | Optional per-packet parameter for the behavior, such as the ESI filter of End.DT2M | Only the owning node, and only for behaviors that take one |
L + F + A can be at most 128, and when it is less, the remaining low bits must be zero (RFC 8986 Section 3.1). The lengths are a design choice of the operator, not something you can infer from the address, which is why the decoder asks for them. A common classic layout is a /48 locator (32-bit block + 16-bit node), a 16-bit function, and no argument: fc00:0:2:e004:: is function 0xe004 on the node with locator fc00:0:2::/48.
Transit routers never look past the locator: they do a longest-prefix match on the destination address like for any IPv6 packet. That is the whole trick that lets SRv6 run over routers with no SRv6 support. The full anatomy, including the IANA block, is in SID Structure.
SRv6 SID Formats: Classic SIDs and uSIDs¶
A classic SID spends 128 bits on one instruction. A uSID (micro-SID, the NEXT-CSID flavor of RFC 9800) packs several short instructions into one 128-bit container: a Locator-Block followed by a list of compressed SIDs, each one the Node and Function of a SID with the shared block left out. The format name gives the two lengths: F3216 means a 32-bit Locator-Block and 16-bit uSIDs.
| Format | Locator-Block | uSID length | uSIDs per container | Where you see it |
|---|---|---|---|---|
| F3216 | 32 bits | 16 bits | 6 | The format every NEXT-CSID implementation must support (RFC 9800 Section 4.1). Cisco IOS-XR and IOS-XE call it usid-f3216; Arista EOS and Juniper use it too |
| F4816 | 48 bits | 16 bits | 5 | The examples in RFC 9800, with blocks such as 2001:db8:b1::/48 |
| F1616 | 16 bits | 16 bits | 7 | Maximum packing, but the block takes a whole /16 |
| Custom NEXT-CSID | any | any | floor((128 − block) / uSID) | RFC 9800 allows other lengths; leftover bits are padding |
| Classic SID | — | — | 1 | RFC 8986 SIDs, one per SRH entry |
The capacity formula is from RFC 9800: a container holds K = floor((128 − LBL) / LNFL) uSIDs, where LBL is the Locator-Block length and LNFL the uSID length. RFC 9800's other flavor, REPLACE-CSID (G-SRv6), uses 16- or 32-bit C-SIDs and an index in the argument instead of a shift, so it is not visualized here. See uSID Compression for the overhead comparison.
Reading an F3216 uSID¶
fcbb:bb00is the 32-bit Locator-Block, the same on every node of the domain.0100is the active uSID. Node 1 advertisesfcbb:bb00:0100::/48in the IGP, so plain longest-prefix match delivers the packet there.0200,0300are the next nodes;e004is a local service uSID (here uDT4 on node 3).0000is the end-of-container marker. CSID value 0 is reserved for exactly this (RFC 9800 Section 5).
A common convention from the uSID draft splits the 16-bit space into a GIB (0x0000–0xDFFF, global uSIDs such as a node's uN) and a LIB (0xE000–0xFFFF, local uSIDs such as uA adjacencies and uDT/uDX services). RFC 9800 Section 9.2 leaves the split to the operator, so the decoder labels it as a hint, not a fact.
How uSID Shift-and-Forward Works¶
When a router receives a packet whose destination matches one of its NEXT-CSID SIDs, it applies RFC 9800 Section 4.1.1, lines N01 to N09:
- If the Argument (every bit after the active uSID) is not zero, copy it into the bits right after the Locator-Block, overwriting the active uSID, and set the last uSID-length bits to zero. In F3216, that is "shift bits 48–127 left by 16".
- Decrement the Hop Limit and forward on the new destination address. Segments Left in the SRH is not touched, and in many deployments there is no SRH at all.
- If the Argument is zero, this uSID is the last one in the container: the node runs the ordinary RFC 8986 behavior, taking the next 128-bit entry from the SRH if Segments Left is above zero, or acting as the final destination (a uDT4, for example, decapsulates and looks up the inner packet).
Applied to the example above:
received fcbb:bb00:0100:0200:0300:e004:0000:0000 node 1 (uN 0100) shifts
after node 1 fcbb:bb00:0200:0300:e004:0000:0000:0000 node 2 (uN 0200) shifts
after node 2 fcbb:bb00:0300:e004:0000:0000:0000:0000 node 3 (uN 0300) shifts
after node 3 fcbb:bb00:e004:0000:0000:0000:0000:0000 node 3 (uDT4 e004): Argument 0, decapsulate
Four instructions, sixteen bytes, no SRH. The decoder's step-through shows the same walk for whatever you paste.
Worked Examples¶
Each link opens the decoder with the example loaded.
- F3216 uSID path with a VPN service.
fcbb:bb00:100:200:300:e004::carries three node uSIDs and a local uDT4 in one destination address, the case walked through above. - A SID from the IANA block.
5f00:0:1:e001::uses5f00::/32as its Locator-Block, carved from5f00::/16, the block RFC 9602 reserves for SRv6 SIDs: node uSID0001, then local service uSIDe001. It is the layout of the Juniper example. Using5f00::/16is optional; operator GUA and ULA locators are just as valid. - A full container from RFC 9800.
2001:db8:b1:10:20:30:40:50has a 48-bit block and five uSIDs with no end-of-container marker, like the first container of RFC 9800 Figure 2. After the fifth uSID the Argument is zero and processing continues with the next SRH entry. - A classic SID.
fc00:0:2:e004::with B=32, N=16, F=16, A=0 is function0xe004behind locatorfc00:0:2::/48, the End.DT4 SID used in the L3VPN example. - A malformed container.
fcbb:bb00:100:0:300::has a uSID after the end-of-container. Node 1 shifts0000into the active position, no node owns the resulting address, and the decoder says so.
Function Bits vs Behavior Codepoints¶
The function bits in a SID are allocated locally by the router; 0xe004 means End.DT4 on one node and something else on the next. What is standardized is the behavior codepoint a router advertises next to each SID in IS-IS, OSPFv3, BGP and BGP-LS, from the IANA "SRv6 Endpoint Behaviors" registry. So you cannot tell a SID's behavior from its bits alone: look the SID up in the router's SID table, or take the codepoint from the routing protocol and look it up here.
The registry above is the complete IANA list as of October 2026, including codepoints assigned to drafts. Vendors shorten the common NEXT-CSID behaviors as uN (End with NEXT-CSID, PSP & USD, codepoint 48) and uA (End.X with NEXT-CSID, PSP & USD, codepoint 57). Network Programming explains what each behavior does.
Frequently Asked Questions¶
What is an SRv6 SID?¶
An SRv6 Segment Identifier (SID) is a 128-bit IPv6 address that encodes an instruction. Its locator routes the packet to a node, its function selects what that node does (forward, cross-connect, decapsulate into a VRF), and its optional argument parameterizes the function. Routers that do not own the locator forward it as normal IPv6.
What does F3216 mean?¶
F3216 is the most common SRv6 uSID format: a 32-bit Locator-Block followed by 16-bit uSIDs, so one 128-bit address holds up to six uSIDs. RFC 9800 requires every NEXT-CSID implementation to support it, and Cisco IOS-XR and IOS-XE configure it as usid-f3216.
How many uSIDs fit in one container?¶
floor((128 − Locator-Block length) / uSID length). That is 6 for F3216, 5 for a 48-bit block with 16-bit uSIDs, and 7 for F1616. When a path needs more, the source puts further containers in the SRH and the last uSID of each container moves processing to the next one.
What is the end-of-container (0000) in a uSID?¶
RFC 9800 reserves the CSID value 0 to mark the end of a container. When the bits after the active uSID are all zero, the node knows it holds the last uSID of the container and takes the next SID from the SRH, or is the final destination if there is none.
Do SRv6 SIDs have to be in 5f00::/16?¶
No. RFC 9602 reserves 5f00::/16 so SIDs are easy to recognize and filter, and marks it as not globally reachable, but operators can keep using their own global unicast or unique local prefixes as locators. Whatever the prefix, filter it at the SR domain edge.
Can I tell the behavior of a SID from its bits?¶
No. Function values are allocated locally by each router. The behavior is known from the router's SID table or from the IANA codepoint it advertises in the IGP or BGP, which you can look up in the behavior table on this page.
Further Reading¶
- SID Structure - Locator, function, argument and the 5f00::/16 block
- uSID Compression - Overhead savings and uSID vs G-SRv6
- Network Programming - What every RFC 8986 and RFC 9800 behavior does
- SRH & Packet Walk - Classic SIDs and Segments Left hop by hop
- RFC 9800 - Compressed SRv6 segment lists (NEXT-CSID, REPLACE-CSID)
- RFC 9602 - The 5f00::/16 SRv6 SID block
References¶
- RFC 8986 - SRv6 Network Programming - SID structure (Section 3.1), endpoint behaviors and flavors
- RFC 9800 - Compressed SRv6 Segment List Encoding - NEXT-CSID pseudocode (Section 4.1.1), CSID allocation (Section 5), GIB/LIB guidance (Section 9.2)
- RFC 9602 - SRv6 SIDs in the IPv6 Addressing Architecture - The 5f00::/16 block
- IANA - SRv6 Endpoint Behaviors - The registry of behavior codepoints used in the lookup table
- draft-filsfils-spring-net-pgm-extension-srv6-usid - uN/uA naming and the 0x0000-0xDFFF / 0xE000-0xFFFF GIB/LIB convention
- RFC 5952 - IPv6 Address Text Representation - The compressed form the decoder prints