Segment Routing (SRv6)
The Future of Simplified Source Routing
The Paradigm Shift:
Imagine you are going on a road trip.Traditional Routing is like driving and stopping at every intersection to ask a local for directions — each router consults its and makes an independent decision based on the destination address alone. Segment Routing is like having a that prints a list of waypoints on your windshield before you leave: "Turn right at Node A, then left at Node B, detour through the firewall at Node C." The source knows the full path; intermediate nodes simply follow the instructions.
This "source routing" principle eliminates the need for routers in the middle of the network to maintain per-flow state, dramatically simplifying the core while providing the source with unprecedented traffic engineering control.
Packet Structure
Unlike , which uses a stack of labels prepended before the header, uses the standard Routing Header (Type 4) — also called the Segment Routing Header (). This means packets are valid packets and can cross any network without modification.
- Segment List: An array of representing the desired path, stored in reverse order (destination first).
- Segments Left: A pointer (decremented at each hop) that indicates which in the list is currently active — analogous to the label at the top of the stack.
SRv6 Network Programming
Watch how SIDs guide a packet using IPv6 Extension Headers.
Operational Insight
Ingress router encapsulates IP packet in SRv6 header. Destination Address (DA) is set to the first Segment ID (SID).
Why ? (Eliminating Complexity)
- No : Eliminates two of the most complex protocols in the Service Provider core. distributes label bindings for every prefix; maintains per-tunnel state signaling on every node in the path. eliminates both with a single control-plane extension to or .
- :Provides guaranteed protection against link or node failures for any arbitrary network topology — without requiring a pre-provisioned backup . The backup path is computed using post-convergence results.
- Service Chaining: Forces traffic through specific security (firewall), optimization ( accelerator), or simply by including their in the segment list. No tunnels or required.
- Network Slicing: Enables distinct "Network Slices" where high-priority traffic (video conferencing, industrial control) takes a low-latency path, while bulk data (backups, analytics) takes a cheaper, high-bandwidth path — all on the same physical infrastructure.
SRv6 SID Allocation and Control-Plane Protocol Extension Mechanics
The power of SRv6 does not emerge from the data-plane alone — it requires a control-plane protocol to distribute SID reachability and SID functions across the network. Unlike SR-MPLS which can rely on LDP or RSVP-TE as label distribution protocols, SRv6 extends existing IGP protocols — IS-IS (RFC 9352) and OSPFv3 (RFC 8666) — with new Type-Length-Value (TLV) encodings. These extensions carry the SID prefixes, the associated endpoint behaviors (e.g., End, End.X, End.DT6), and algorithmic tie-breakers known as Flex-Algorithms.
IS-IS TLV Extensions for SRv6
The IS-IS SRv6 extensions (RFC 9352) define three primary new TLVs:
- SRv6 Capabilities Sub-TLV (type 6): Carried in the IS-IS Router Capability TLV (242). It signals that a node supports SRv6 and includes the SRv6 SID Locator prefix length (typically /48 or /64) and a block size flag.
- SRv6 End SID Sub-TLV (type 8): Carried in the IS-IS Extended Reachability TLV (22) or the MT-ISN TLV (222). It advertises an End (local) SID bound to an adjacency — conceptually similar to a MPLS label bound to a prefix.
- SRv6 LAN End SID Sub-TLV (type 9): Used specifically on multi-access (LAN) segments where the Designated Intermediate System (DIS) must coordinate SID allocation to avoid duplication.
Each SID sub-TLV contains the 128-bit SID value, the SRv6 Endpoint Behavior code point (e.g., 5 for End, 42 for End.X), and an Algorithm ID (0–255). Algorithm ID 0 is the standard Shortest Path First (SPF) algorithm; IDs 128–255 are reserved for Flex-Algorithm definitions. This encoding allows a single IS-IS LSP (Link-State PDU) to carry both the topology information and the SID-based instructions in a unified message, eliminating the need for a separate label distribution protocol.
├─ SID (128 bits): FC00:1:2::1A
├─ Behavior Code (8 bits): 0x2A (End.X)
├─ Algorithm (8 bits): 128 (Flex-Algo 128)
└─ Flags (8 bits): B-Flag = Backup protection enabled
Flex-Algorithm: Compute-Engine-Driven Path Selection
Flex-Algorithm (Flex-Algo) is the SRv6 mechanism for compute-engine-driven path computation. An operator defines an algorithm by combining three elements: a Metric Type (IGP cost, delay, TE metric), a Constraints Set (include/exclude link affinities, administrative groups), and a Calculation Type (standard SPF, Strict SPF, or the experimental Balanced SPF). This definition is flooded via IS-IS or OSPFv3 new TLVs. Each router independently runs the specified algorithm and installs only the paths that satisfy all constraints into its FIB.
For example, Flex-Algorithm 129 might define "minimum delay path excluding links with affinity RED":
A single SRv6 SID bound to Algo 128 automatically steers traffic along the optimal delay-avoiding path, without any per-flow policy configuration on the head-end. This is the mechanism that underpins 5G network slicing: each slice uses a different Flex-Algorithm, and each slice's SID prefix carries the algorithm number, enabling deterministic path isolation from the ingress edge.
SRv6 Micro-SID (uSID) Compression and the 128-Bit Overhead Problem
A standard SRv6 SID is 128 bits. If the segment list contains 10 SIDs, the SRH header adds of overhead to every packet. For a 64-byte VoIP packet, this nearly triples the packet size — an unacceptable efficiency loss. Micro-SID (uSID, RFC draft-filsfils-spring-net-pgm-extension-srv6-usid) solves this by compressing multiple SIDs into a single 128-bit IPv6 address.
The uSID Encoding Scheme
A uSID block uses the first 32 bits of the IPv6 address as a common prefix (the uSID Block, typically FC00::/8 or a locally defined prefix). The remaining 96 bits are partitioned into up to six 16-bit slots, each slot containing one Micro-SID:
FC00:0001:0002:0003:0004:0005::
│ │ │ │ │ │
Block Node Func Args Node Func
The advantage is dramatic: a six-SID segment list fits into a single IPv6 destination address, requiring zero SRH header overhead. If the path requires more than six uSIDs, the first six are encoded in the destination address and the remainder is placed in a compressed SRH — but six uSIDs cover the vast majority of DC spines (typically 3–5 hops).
The C-SID Alternate Compression
A competing compression scheme, C-SID (Compressed SID, RFC 8986 Section 3.1.1), uses a different approach: instead of fixed 16-bit slots, C-SID encodes a variable-length list using a bitmask. Each SID in C-SID is 32 bits long, and the SRH carries up to 12 C-SIDs in a single 512-bit cache line. C-SID offers better packing density than uSID for paths longer than 6 hops (up to 12 C-SIDs vs 6 uSIDs per 128-bit anchor) at the cost of requiring SRH processing on every transit node. uSID, by encoding in the destination address, allows non-SRv6-aware transit routers to forward the packet without any SRH inspection — a key deployment advantage during brownfield migration.
Conclusion
is more than a routing protocol; it is a Network Programming Language. It treats the entire global network as a single programmable entity, allowing path steering, service insertion, and traffic engineering to be expressed as a simple list of addresses. For operators seeking to simplify their , enable network slicing, or build cloud-scale fabrics, is the architecture that makes it operationally feasible.