Segment Routing explained: SR-MPLS, SRv6, prefix SIDs and TI-LFA
In short: Segment Routing lets the source router write a path into the packet as a list of instructions called segments. In SR-MPLS these are MPLS labels distributed by OSPF or IS-IS, so LDP is no longer needed; in SRv6 they are IPv6 addresses. The core keeps no per-tunnel state, and TI-LFA gives fast reroute along the post-failure path.
The idea
Classic MPLS needs a separate protocol (LDP) to hand out labels, and another (RSVP-TE) to build engineered paths, with state on every router for every tunnel. Segment Routing (SR) simplifies this. Each router and link gets an identifier called a segment ID (SID), advertised by the existing IGP. To send traffic along a chosen path, the ingress router puts a list of SIDs on the packet. Each router processes the top one and passes the packet on.
Types of segment
- Prefix SID / node SID: identifies a router's loopback. It is global: every router knows that label 16005 means "the shortest path to router 5". The value comes from the SR global block (SRGB), by default labels 16000 to 23999 on Cisco, plus an index you assign (index 5 gives label 16005).
- Adjacency SID: identifies one specific link out of a router. It is local and allocated automatically, and forces traffic over that link.
- Binding SID: stands for a whole SR policy, so a long path can be referred to by one label.
SR-MPLS configuration (IOS XE with IS-IS)
segment-routing mpls
connected-prefix-sid-map
address-family ipv4
10.255.0.5/32 index 5 range 1
!
router isis CORE
net 49.0001.0102.5500.0005.00
metric-style wide
segment-routing mpls
fast-reroute per-prefix level-2 all
fast-reroute ti-lfa level-2
Once enabled, plain shortest-path traffic simply uses the node SIDs, replacing LDP. Many networks run SR and LDP together during migration, with segment-routing mpls sr-prefer deciding which to use.
TI-LFA fast reroute
Topology-independent loop-free alternate (TI-LFA) pre-computes, for every destination, the path traffic would take after a link or node failure, and encodes it as a short SID list. When the failure happens, the router switches to that backup in about 50 milliseconds, and the backup matches the path the network will settle on after it converges. It works in any topology, unlike older LFA methods.
SR policies and traffic engineering
An SR policy is an engineered path defined by a colour, an endpoint and a list of segments, either written by hand or computed by a controller (PCE). BGP routes can carry a colour community, and traffic for those routes automatically uses the matching policy. This replaces RSVP-TE tunnels without per-tunnel state in the core.
SRv6
SRv6 uses IPv6 addresses as segments instead of MPLS labels, carried in a routing extension header. It removes MPLS entirely and lets one IPv6 address represent both a location and a function, such as "decapsulate into VRF CUSTOMER-A". Compressed SIDs (uSID) keep headers small. Large providers and some cloud networks are deploying it.
Real-world example: removing LDP
A provider had occasional black holes after link failures when LDP and the IGP were briefly out of sync. Migrating the core to SR-MPLS with TI-LFA removed LDP entirely. Labels now came from IS-IS itself, failover times became predictable at around 50 ms, and the team retired hundreds of RSVP-TE tunnels in favour of a few SR policies.
Practice
What is the difference between a prefix SID and an adjacency SID?
Which protocol distributes SR-MPLS labels instead of LDP?
What does TI-LFA provide?
Key takeaways
- Segment Routing encodes the path in the packet as a list of segments.
- SR-MPLS uses labels from OSPF or IS-IS and can replace LDP.
- TI-LFA gives fast, predictable reroute in any topology.
- SR policies replace RSVP-TE tunnels; SRv6 uses IPv6 addresses as segments.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.