How segment routing replaces a protocol with arithmetic
Segment routing puts the path in the packet and removes the protocol that used to distribute labels.
Traditional MPLS needs a protocol to hand out labels — LDP for plain transport, RSVP-TE for engineered paths. Both hold state in every router along every path, and that state is what makes them awkward at scale.
Segment routing removes it. The IGP already floods enough information for every router to work out the labels itself, so there is no separate label distribution protocol and no per-path state in the core.
The label is calculated
Label = SRGB base + prefix SID index. Each router advertises a block of labels it has reserved — the Segment Routing Global Block — and each destination gets an index within it. A router with SRGB 16000–23999 and prefix SID 5 is reached with label 16005.
Whose SRGB — the detail that catches people
The SRGB used is that of the router being reached, not the one imposing the label.
If every router uses 16000–23999, the label for a destination is the same everywhere and a packet trace reads sensibly. If the SRGBs differ, each router imposes a different label for the same destination. It works perfectly and it makes troubleshooting considerably harder.
That is why one SRGB across the domain is the near-universal convention. It is a convention rather than a requirement, and legibility is the entire reason for it.
Prefix SIDs are global
Unlike an MPLS label, a prefix SID identifies one destination across the whole domain. Two routers sharing one is a real fault, not a style issue — traffic for both follows whichever the routing prefers.
Steering with a segment list
To send traffic along a specific path, impose a stack of labels — one per waypoint. Each is popped as its segment completes, so the stack shrinks along the path rather than being carried whole.
This is how traffic engineering works without RSVP-TE. The path lives in the packet, so no router in the middle holds state about it.
Migrating from LDP
The order matters, because a router speaking only LDP cannot exchange labels with one speaking only SR.
- Enable SR everywhere alongside LDP. Both run; LDP still carries traffic. This stage should be invisible.
- Shift preference to SR, with LDP still present to fall back to.
- Remove LDP once nothing depends on it.
The mistake is removing LDP from a middle router before its neighbours run SR. That adjacency then has no shared way to exchange labels, and transport breaks across it.
Frequently asked questions
How is an SR-MPLS label calculated?
SRGB base plus prefix SID index. A router with SRGB 16000–23999 and prefix SID 5 is reached with label 16005.
Whose SRGB decides the label?
The destination's, not the sender's. Differing SRGBs mean the same destination carries a different label at each hop — which works and makes traces hard to read.
Do all routers need the same SRGB?
No, and nearly everyone uses one anyway, because it makes the label for a destination identical everywhere and troubleshooting far easier.
What replaces RSVP-TE for traffic engineering?
A segment list — a stack of labels naming the waypoints. The path travels in the packet, so no router in the middle holds state about it.
In what order should I migrate from LDP?
Enable SR alongside LDP everywhere, shift preference to SR, then remove LDP. Removing LDP from a middle router before its neighbours run SR breaks transport across that adjacency.
Open the SRGB planner →