Skip to content

Segment Routing for AI Fabrics · Part 2 of 8

Act 2 — SRv6 Architecture, Packet Format, and uSID Compression

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.

INTERACTIVE
SRv6 Packet Header Anatomy
Click Next Hop to advance the Segments Left pointer. Toggle uSID to see overhead compression.
IPv6 Header40 bytes
Next Header: 43 (SRH)
Src: 2001:db8:0:leaf01::gpu1
Dst: 2001:db8:0:leaf08::100
Segment Routing Header (SRH)72 bytes
Routing Type
4
Segments Left
3
Last Entry
3
Hdr Ext Len
7
SID[3] (dest)2001:db8:0:leaf01::2Egress adjacencyACTIVE
SID[2] 2001:db8:0:spine02::1Waypoint 1
SID[1] 2001:db8:0:spine03::1Waypoint 2
SID[0] (first)2001:db8:0:leaf08::100Destination (VRF decap)
Inner payload (RoCEv2 / RDMA Write)up to 8888 bytes
SRH Overhead
72 bytes
Effective MTU
8888 bytes
SIDs in path
4

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:

BehaviorDescriptionUse in AI fabrics
EndRoute to this node (pure transit)Spine waypoint: "traverse spine-2"
End.XCross-connect to adjacency XExplicit link selection: "exit via swp3"
End.DT4Decapsulate + IPv4 lookup in VRFTenant egress: "deliver to VRF A's table"
End.DT6Decapsulate + IPv6 lookup in VRFSame for IPv6 tenant traffic
End.DX4Decapsulate + forward to adjacent IPv4Last-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.

INTERACTIVE
SRv6 SID Architecture and Endpoint Behaviors
SID Address Anatomy
Block (40b)
Node (24b)
Function (16b)
Args (48b)
Example SID decomposition:
2001:db8:0:leaf01::1:0:0
└─ Block: topology prefix·Node: this switch's ID·Function: behavior code
Locator = Block + Node = 64 bits · Function = 16 bits · Args = 48 bits (total = 128 bits)
Endpoint Behavior Explorer
End
Endpoint
2001:db8:0:spine02::1
Transit node processing. Switch accepts the packet, pops the active segment, and routes the packet to the next SID.
Switch action sequence:
11. Verify SID matches local locator
22. Decrement Segments Left
33. Update IPv6 DA = next SID in list
44. Forward normally via FIB lookup on new DA
Use case: Spine waypoints: "traverse spine-02"

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.