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.

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
| 能力 | 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 标签 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 了解详情。
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:
- Flex-Algo in OcNOS: Fundamentals of Customized Path Selection
- Flex-Algo in OcNOS: Optimizing Network Paths Using Link Delay
- Flex-Algo in OcNOS: Optimizing Network Paths Using TE Metric
Segment Routing: Related Guides
Fundamentals & migration
- Segment Routing Explained (this article) — SR fundamentals, SRGB, Node/Adjacency SIDs
- LDP to SR Migration in MPLS Networks with OcNOS
IS-IS SR & fast reroute
Flexible Algorithm (Flex-Algo)
- Flex-Algo in OcNOS: Fundamentals of Customized Path Selection
- Flex-Algo in OcNOS: Optimizing Network Paths Using Link Delay
- Flex-Algo in OcNOS: Optimizing Network Paths Using TE Metric
EVPN over Segment Routing
- EVPN L3VPN over IS-IS SR and TI-LFA
- Multi-Domain IS-IS SR with BGP-LU Underlay and EVPN-Based L2VPN and L3VPN Overlay
OcNOS product & platforms
- Segment Routing (SR) technology overview
- OcNOS-SP 产品页面
- OcNOS 功能矩阵 — check SR-MPLS, SRv6, TI-LFA, and Flex-Algo feature support
Suraj Kumar Singh is Senior Solution Lead at IP Infusion. Connect on LinkedIn.
使用 OcNOS 升级到 SR-MPLS
简短表单:提交后 PDF 将立即开始下载。