Segment Routing Explained: Why SR-MPLS Is Replacing LDP and RSVP-TE

Segment routing (SR-MPLS) is a source-routing method in which the ingress router encodes a packet's entire path as an ordered list of segment IDs (SIDs) in the MPLS label stack. The IGP — IS-IS or OSPF — distributes the labels, so transit routers just swap labels and hold no per-flow state.

Segment Routing (SR) has become the dominant MPLS evolution path for service providers. It eliminates the operational complexity of LDP and RSVP-TE, enables deterministic traffic engineering without per-flow state, and integrates natively with modern automation tools. This article explains how it works, why it matters, and how to configure it in OcNOS.

Why Segment Routing?

Traditional MPLS networks rely on two signaling protocols to distribute labels and engineer traffic paths:

  • LDP (Label Distribution Protocol) — distributes labels for destination-based forwarding, but creates tight coupling between IGP and label state, causing synchronization issues during convergence
  • RSVP-TE (Resource Reservation Protocol — Traffic Engineering) — enables explicit path control but requires per-flow signaling state on every transit router in the path, creating significant scalability and operational challenges

Segment Routing addresses both problems simultaneously. Labels (called “segments”) are distributed by the IGP itself — no separate signaling protocol required. Traffic engineering is achieved by inserting an ordered list of segments at the ingress router — no per-flow state on transit nodes.

How Segment Routing Works

In an SR network, each router assigns a globally unique numeric identifier called a Node SID (Segment Identifier) to its loopback address. These SIDs are flooded through the IS-IS or OSPF topology, giving every router a complete map of the network’s segment structure.

When a packet enters the network, the ingress router (PE) encodes a “segment stack” — an ordered list of SIDs representing the desired forwarding path — into the packet header. In SR-MPLS, this stack is implemented as a standard MPLS label stack. Transit routers swap labels and forward based on the top segment, requiring no knowledge of the end-to-end path.

Segment Routing SR-MPLS topology: PE1, P1 to P3, PE2 routers with Node SIDs 101 to 105 and adjacency SIDs; ingress PE1 encodes an explicit MPLS label stack, no RSVP.
Segment Routing topology: each node advertises a Node SID via IS-IS. The ingress PE1 encodes an explicit path (P1 → P3 → PE2) as an MPLS label stack. No RSVP signaling is required on transit nodes.

Types of Segments

Prefix Segments (Node SIDs)

A Prefix Segment represents a destination prefix — typically a router’s loopback address — and instructs the network to forward toward that destination using the IGP shortest path. Node SIDs are globally unique within the SR domain and are allocated from the Segment Routing Global Block (SRGB).

Adjacency Segments (Adj SIDs)

An Adjacency Segment represents a specific link between two routers. Using an Adj SID in the segment stack forces the packet to traverse that exact link, regardless of the IGP shortest path. Adj SIDs are locally significant (only meaningful to the router that originates them) and enable precise, link-level traffic steering.

Segment Routing Global Block (SRGB)

The SRGB is the range of MPLS labels reserved for SR-assigned Node SIDs. All routers in an SR domain typically share the same SRGB range, so a Node SID of “index 5” always maps to the same MPLS label value (SRGB base + 5) on every router — greatly simplifying operations and troubleshooting.

OcNOS supports four SRGB configuration scenarios:

! OcNOS -- Scenario 1: Use the default SRGB [16000-23999]
! No manual configuration required. Enable SR under IS-IS:
!
router isis CORE
  segment-routing mpls
  address-family ipv4 unicast
    segment-routing mpls
  exit-address-family
!
! Verify default SRGB allocation:
show running-config segment-routing
show isis database detail | include SRGB
show mpls label-space 0

! OcNOS -- Scenario 2: Custom global SRGB
!
segment-routing
  global-block 30000 33999    ! SRGB range: 30000-33999 (4000 labels)
!
router isis CORE
  segment-routing mpls
  ! IGP inherits global SRGB unless overridden locally
!
! Verify:
show isis database detail | include SRGB
! Expected: SRGB Base: 30000, Range: 4000

! OcNOS -- Scenario 3: Per-IGP SRGB (subset of global)
!
segment-routing
  global-block 16000 23999    ! Global SRGB (default)
!
router isis CORE
  segment-routing mpls
  segment-routing global-block 17000 18999   ! Local override (within global)
!
! Verify local SRGB under IS-IS:
show running-config router isis | include srgb

! OcNOS -- Scenario 4: Global SRGB + per-IGP override
! When both are configured, IGP configuration takes precedence
!
segment-routing
  global-block 30000 33999
!
router isis CORE
  segment-routing mpls
  segment-routing global-block 31000 31999   ! This takes effect for IS-IS
!
! Key SRGB rules in OcNOS:
! - Maximum block size: 262143 labels (25% of label space)
! - Disable SR before changing SRGB range
! - Per-IGP SRGB must be a subset of global SRGB
! - No overlapping ranges across IGP instances

Assigning Node SIDs in OcNOS

! OcNOS -- Assign Node SID to router loopback
!
interface lo
  ip address 10.0.0.1/32
  ip router isis CORE
  isis segment-routing prefix-sid index 1
  ! Label value = SRGB base + index
  ! With default SRGB [16000]: label = 16001
!
! For Flex-Algo (multiple SIDs per node):
interface lo
  isis segment-routing prefix-sid index 1                  ! Default SPF (algo 0)
  isis segment-routing prefix-sid algorithm 128 index 1001 ! Delay algo
  isis segment-routing prefix-sid algorithm 129 index 2001 ! TE-metric algo
!
! Verify SID assignment and distribution:
show isis segment-routing prefix-sids
show isis database detail | include Prefix-SID
show mpls forwarding-table

Key Benefits of SR over LDP and RSVP-TE

Capability LDP RSVP-TE SR-MPLS
Signaling protocol Separate (LDP) Separate (RSVP) None — IGP distributes SIDs
Transit router state Per-destination Per-flow (RSVP state) None — stateless transit
Traffic engineering Not supported Complex RSVP tunnels Simple segment stacks at ingress
Fast reroute LFA only FRR with complex setup TI-LFA (topology-independent)
Network slicing Not supported Limited Flex-Algo (native)
SDN integration Limited Limited Native PCE and gNMI support

SR-MPLS vs SRv6: Choosing a Data Plane

Segment Routing is defined independently of any single forwarding technology. The SR architecture (RFC 8402) can be instantiated over two different data planes, and the segments — Node SIDs, Adjacency SIDs, and the segment stack — work the same way conceptually in both.

  • SR-MPLS — segments are encoded as standard MPLS labels and the segment stack is an ordinary MPLS label stack. It reuses the existing MPLS forwarding plane, so it runs on the hardware most service-provider networks already operate. Everything covered above in this article is SR-MPLS.
  • SRv6 — segments are encoded as 128-bit IPv6 addresses. The segment list is carried in a Segment Routing Header (SRH), an IPv6 routing extension header defined in RFC 8754. Because each SID is a routable IPv6 address that also encodes an instruction (a function), SRv6 enables network programming (RFC 8986) — behaviors such as VPN, traffic engineering, and service chaining are expressed directly in the SID itself, with no separate MPLS label plane.

SRv6 SID lists can be long, which adds packet header overhead. uSID (micro-SID) addresses this by packing several short micro-instructions into a single 128-bit IPv6 address, compressing the SID list and reducing header size while staying within standard IPv6 forwarding.

Characteristic SR-MPLS SRv6
Data plane MPLS Native IPv6
Segment encoding MPLS label 128-bit IPv6 address
Path carried in MPLS label stack Segment Routing Header (SRH)
Hardware requirement Reuses existing MPLS forwarding plane Requires IPv6 data plane with SRv6 (and, for compression, uSID) support
Network programming Not native (labels are opaque) Native — each SID encodes a function (RFC 8986)
Header overhead 4 bytes per label Larger SRH; reduced by uSID compression
Typical use Existing MPLS/service-provider cores evolving off LDP and RSVP-TE IPv6-first and greenfield fabrics wanting end-to-end programmability and VPNs without MPLS

Both data planes share the same IGP control plane (IS-IS or OSPF) and the same traffic-engineering model. OcNOS supports SR-MPLS and SRv6, including uSID; see the Segment Routing technology overview for details.

TI-LFA: Sub-50ms Fast Reroute

Topology-Independent Loop-Free Alternate (TI-LFA) is Segment Routing’s fast-reroute mechanism. It pre-computes a backup path for every protected destination before any failure occurs, so when a link, node, or shared-risk link group (SRLG) fails, traffic is switched to the precomputed path in under 50 milliseconds.

What makes TI-LFA distinct is how the backup is expressed: the router encodes the repair path as a Segment Routing segment stack that steers traffic explicitly to the post-convergence path — the exact path the network will settle on once the IGP reconverges. This delivers 100% coverage in any topology for link, node, and SRLG protection, without the micro-loops or partial coverage that limit classic Loop-Free Alternate (LFA). Because the repair is just another segment stack, no additional signaling or tunnel state is required.

For an IS-IS SR configuration walkthrough with TI-LFA in OcNOS, see IS-IS SR with TI-LFA in OcNOS.

Flexible Algorithm (Flex-Algo): Intent-Based Path Selection

Flexible Algorithm (Flex-Algo) lets operators define custom IGP topologies that compute shortest paths against a chosen optimization metric rather than the single default IGP cost. Instead of every path following the same SPF result, you can define one algorithm that minimizes link delay, another that optimizes a dedicated TE metric, and another that uses standard IGP cost — each producing its own set of paths across the same physical network.

Each Flex-Algo is identified by an algorithm ID in the range 128–255 and advertises its own prefix SIDs, so a single loopback can carry a different SID per algorithm (as shown in the Node SID configuration above). This enables network slicing — multiple intent-based logical topologies over one infrastructure — using only the IGP, with no external controller required.

Deep-dive guides for OcNOS:

Segment Routing: Related Guides

Fundamentals & migration

IS-IS SR & fast reroute

Flexible Algorithm (Flex-Algo)

EVPN over Segment Routing

OcNOS product & platforms


Suraj Kumar Singh is Senior Solution Lead at IP Infusion. Connect on LinkedIn.

Share
FAQ

Frequently asked questions

What is a Node SID versus an Adjacency SID in SR-MPLS?
A Node (prefix) SID is a globally unique identifier tied to a router's loopback, flooded by the IGP and allocated from the SRGB. An Adjacency SID is locally significant and forces traffic across one specific link, regardless of the IGP shortest path.
Does SR-MPLS replace LDP and RSVP-TE?
Yes. The IGP distributes SID labels itself, so no separate label-signaling protocol is needed. This eliminates the operational complexity of running LDP and RSVP-TE.
How does SR-MPLS avoid per-flow state in the core?
The ingress router encodes the full path as a SID list in the label stack. Transit routers simply forward on the labels, so no router holds per-flow or per-LSP state.
Does SR-MPLS keep the existing MPLS data plane?
Yes. SR-MPLS reuses the standard MPLS forwarding plane; only the control-plane label distribution changes, moving from LDP/RSVP-TE to the IGP.
What is the difference between SR-MPLS and SRv6?
Both are data planes for the same Segment Routing architecture (RFC 8402). SR-MPLS encodes each segment as an MPLS label and reuses the existing MPLS forwarding plane, while SRv6 encodes each segment as a 128-bit IPv6 address carried in a Segment Routing Header (SRH). SRv6 also enables network programming (RFC 8986), where each SID encodes a function such as VPN or traffic engineering.
Is segment routing the same as MPLS?
No. Segment Routing is a source-routing architecture that can run over either an MPLS data plane (SR-MPLS) or a native IPv6 data plane (SRv6). SR-MPLS reuses MPLS forwarding but replaces LDP and RSVP-TE signaling by distributing segments through the IGP (IS-IS or OSPF), so there is no separate label-distribution or tunnel-state protocol.
What is Flexible Algorithm (Flex-Algo)?
Flex-Algo lets operators define custom IGP topologies that compute paths against a chosen metric such as link delay, a dedicated TE metric, or standard IGP cost. Each algorithm uses an ID in the range 128 to 255 and advertises its own prefix SIDs, enabling intent-based path selection and network slicing over a single infrastructure without an external controller.
Does SRv6 need new hardware?
SRv6 requires a data plane that can process IPv6 with the Segment Routing Header, and uSID (micro-SID) compression to reduce header size, so platforms must support these functions in hardware. SR-MPLS, by contrast, reuses the existing MPLS forwarding plane already deployed in most service-provider networks. OcNOS supports both SR-MPLS and SRv6 including uSID.