Segment Routing can run over two data planes: MPLS (SR-MPLS) and IPv6 (SRv6). In modern AI data centres, SRv6 is the preferred choice because:
- The fabric is already IPv6 (or dual-stack) for scale reasons
- SRv6 SIDs are IPv6 addresses — they leverage existing routing infrastructure
- uSID compression eliminates the overhead concern for short path lengths
- EVPN+SRv6 integration is native (no separate MPLS signalling plane)
The SRv6 Segment Routing Header (SRH)
An SRv6 packet is a standard IPv6 packet with an optional SRH (Segment Routing Header) extension header inserted between the IPv6 header and the upper-layer protocol (UDP/TCP).
IPv6 Packet with SRH:
┌─────────────────────────────────────────────────────┐
│ IPv6 Header (40 bytes) │
│ Destination: current active SID (next hop) │
│ Next Header: 43 (Routing Header) │
├─────────────────────────────────────────────────────┤
│ SRH (Segment Routing Header) │
│ ├── Next Header: 17 (UDP) or 41 (IPv6 in IPv6) │
│ ├── Hdr Ext Len: (N×2) - 1 (N = number of SIDs) │
│ ├── Routing Type: 4 │
│ ├── Segments Left: pointer to active SID │
│ ├── Last Entry: index of last SID │
│ ├── Flags: 0 │
│ ├── Tag: 0 │
│ ├── Segment List[0]: last SID (destination) │
│ ├── Segment List[1]: second-to-last SID │
│ └── Segment List[N-1]: first SID (inserted last) │
├─────────────────────────────────────────────────────┤
│ Original payload (UDP/TCP/RDMA over UDP) │
└─────────────────────────────────────────────────────┘
The SID list is stored in reverse order: the first hop to visit is at index [N-1],
the final destination is at index [0]. The Segments Left pointer starts at N-1 and
decrements at each hop. Each hop sets the IPv6 Destination Address to the next SID,
which causes the next router to forward to that address.
Each SID is 128 bits (a full IPv6 address). A 4-SID path (leaf → spine → spine → leaf) adds 4 × 16 = 64 bytes of SRH overhead plus the 8-byte SRH fixed header = 72 bytes total. For a 9000-byte jumbo frame MTU, this is less than 1% overhead. For small messages (512 bytes), it is 14%. This motivated uSID compression.
SRv6 SID structure: locator and function
Every SRv6 SID consists of two parts:
SID = Locator (prefix) + Function (local opcode)
Example:
2001:db8:leaf1::/48 = Locator for leaf-01
Function 1 = End (route to this node)
Function 2 = End.X (exit via specific interface)
Function 3 = End.DT4 (decapsulate and IPv4 table lookup)
Full SID: 2001:db8:leaf1::1 = leaf-01's End SID
2001:db8:leaf1::2 = leaf-01's End.X for swp1 toward spine
The Endpoint behaviors define what a router does when it becomes the active segment:
| Behavior | Description | Use in AI fabrics |
|---|---|---|
| End | Route to this node (pure transit) | Spine waypoint: "traverse spine-2" |
| End.X | Cross-connect to adjacency X | Explicit link selection: "exit via swp3" |
| End.DT4 | Decapsulate + IPv4 lookup in VRF | Tenant egress: "deliver to VRF A's table" |
| End.DT6 | Decapsulate + IPv6 lookup in VRF | Same for IPv6 tenant traffic |
| End.DX4 | Decapsulate + forward to adjacent IPv4 | Last-hop to host |
The locator is announced into IS-IS (or BGP) as a normal IPv6 prefix. Any router learning the locator knows how to reach that node — meaning SRv6 SIDs are automatically routable without additional configuration on transit routers. This is fundamentally different from MPLS, which requires LDP or RSVP-TE signalling across every transit node.
uSID compression: 16-bit micro-segments
The uSID (micro-SID) format packs multiple segment identifiers into a single 128-bit IPv6 address, using 16 bits per micro-segment. This reduces SRH overhead dramatically for short paths.
Standard SRv6: 4 SIDs × 16 bytes = 64 bytes of SID list
uSID format: 4 micro-SIDs × 2 bytes = 8 bytes packed in 1 SID
uSID IPv6 address layout (example):
FC00: 0001: 0002: 0003: 0004: 0000: 0000: 0000
└─ Carrier prefix
└─ µSID 1 (node 1)
└─ µSID 2 (node 2)
└─ µSID 3 (node 3)
└─ µSID 4 (destination)
└─ (end-of-path, zeroes)
Each switch processes its µSID (the leftmost non-zero 16-bit block after the carrier prefix) and shifts the address left by 16 bits before forwarding. The IPv6 destination address itself carries the remaining path — no SRH needed for paths that fit within one 128-bit address.
In a 2-tier AI fabric (leaf → spine → leaf = 3 hops), a single uSID address carries the complete path with zero SRH overhead. This makes uSID very attractive for the common case in AI cluster design.