LABS · PROTOCOLS · ONE STEP FURTHER

Segment Routing: labels that hold across the whole domain

The evolution of MPLS at providers, message by message: the SRGB and Prefix-SIDs inside IS-IS LSPs, a label that means the same on every router and an L3VPN that works without LDP.

Level: advanced · 20 minutes

Interactive simulation

The animation needs JavaScript. The full lesson is written out below.

Download the capture and open it in Wireshark to keep exploring.

What Segment Routing is

Segment Routing (SR, RFC 8402) is a form of source routing: the ingress router puts in the packet the list of segments (instructions) it must follow, and the rest of the network just executes it. Over MPLS (SR-MPLS, RFC 8660), each segment is a label; over IPv6 (SRv6), an IPv6 address.

The IGP itself (IS-IS or OSPF) distributes it with a few new TLVs, so neither LDP nor RSVP-TE is needed. And since node labels are global (SRGB base + index), the network is simpler to operate: a label identifies a router across the whole domain.

The SID types

SIDWhat it identifiesScopeHow IS-IS advertises it
Prefix-SIDA prefix; if it's a router's Loopback, it's a node SID (N bit)Global: SRGB base + indexSub-TLV 3 of TLV 135
Adj-SIDA link toward a neighborLocal: only on that routerSub-TLV 31 of TLV 22
Binding SIDA whole path, for example an SR-TE policyLocalIts own sub-TLVs or TLVs

With a SID stack, the ingress router can force a path: «go to P1 (16002), then out this link (Adj-SID), then to PE2 (16003)». That's SR-TE, Segment Routing traffic engineering, with no state in the core.

How it works: from the LSP to the label

Five steps: PE1's LSP with its SRGB and Prefix-SID, PE2's LSP, a round-trip ping, and the L3VPN over Segment Routing.

  1. PE1 advertises its SRGB and Prefix-SID

    With segment-routing mpls under router isis, PE1's LSP carries three new things. In TLV 242 (Router Capability), its SRGB: 8000 labels starting at 16000, plus the algorithm (0, SPF) and the SRLB local block. In TLV 135, next to its Loopback 10.255.0.1/32, a Prefix-SID with index 1 and the N bit (it's a node SID). And in TLV 22, next to neighbor P1, an Adj-SID: local label 16, meaning «go out this link».

  2. PE2's LSP: label 16003

    P1 forwards PE2's LSP to PE1, advertising index 3 for 10.255.0.3/32. PE1 acknowledges it with a PSNP. That's all it needs: the path to PE2 goes through P1, P1's SRGB starts at 16000, so the outgoing label is 16000 + 3 = 16003. There is no Label Mapping and no LDP session: the label comes from the same LSP that already carries the topology. And since everyone uses the same SRGB, 16003 means «toward PE2» on any router in the domain.

  3. Ping to PE2 with label 16003

    PE1 pings 10.255.0.3 from its Loopback: the packet leaves with label 16003. With LDP, each hop swapped the label for another arbitrary one; with Segment Routing, if the path were longer, every P would swap 16003 for 16003. P1 is the penultimate hop and PE2's Prefix-SID doesn't have the P bit, so it removes the label (PHP): PE2 receives a normal IP packet with TTL 254.

  4. Return with label 16001

    PE2 replies with label 16001: PE1's index 1 plus the SRGB base. It's the same label P1 or any other router would use to reach PE1. P1 removes it and PE1 receives the reply. Since everyone has the same SRGB, a global label reads like an address: 16001 is PE1, 16002 is P1 and 16003 is PE2.

  5. The L3VPN, now over Segment Routing

    Canadá Logística's VPN from the L3VPN lab needs no changes: MP-BGP still advertises VPN label 24 with next hop 10.255.0.3. The only difference is how that next hop is reached: instead of LDP label 21, PE1 pushes Segment Routing label 16003. P1 removes it and PE2 receives only 24. That's how a provider can migrate from LDP to Segment Routing without touching the services.

Segment Routing versus LDP

LDPSegment Routing
Who distributes the labelsA separate protocol (LDP), with TCP sessionsThe IGP (IS-IS or OSPF), inside the LSPs
Label to reach PE2Different on each router16003 across the domain
IGP-label synchronizationThere can be gaps after a changeThey travel together in the same LSP
Forced pathsRequires RSVP-TE, with state on every routerSID stack, no state in the core
Fast protectionLFA, with gaps depending on the topologyTI-LFA: covers any link or node failure

And SRv6

SRv6 uses IPv6 addresses as SIDs, in an extension header (SRH, RFC 8754) or in the destination address itself. It doesn't need MPLS: the core only routes IPv6. Each SID has a locator part (which router it goes to) and a function part (what to do there, for example deliver to a VRF). It's the foundation of the newest provider networks and of 5G services.

The commands in Cisco IOS XE

CommandWhat it does or shows
segment-routing mplsEnables Segment Routing over MPLS (default SRGB 16000-23999).
connected-prefix-sid-map · 10.255.0.1/32 index 1 range 1Gives the Loopback a Prefix-SID.
router isis · segment-routing mplsIS-IS advertises the SRGB, Prefix-SIDs and Adj-SIDs.
show segment-routing mpls gbThe global label block.
show isis database verboseThe LSPs with their Segment Routing TLVs.
show mpls forwarding-tableThe labels: 16002 and 16003 toward the other routers, and the Adj-SIDs.

Segment Routing isn't in the CCNA v2.0 exam topics: it's one step further toward CCNP Service Provider (SPCOR 350-501), where SR-MPLS, SRv6, SR-TE and TI-LFA are central to the provider core.

Frequently asked questions

Why should the SRGB be the same on every router?

It's not mandatory, but it's recommended. If a router used a different base, the label toward PE2 would change at that hop, as with LDP. With the same SRGB, 16003 is PE2 across the network.

Can it coexist with LDP?

Yes. During a migration both can run at the same time; by default Cisco prefers LDP labels, and it can be configured to prefer Segment Routing ones. With a mapping server, routers without SR also get SIDs.

What is the N bit?

It indicates the Prefix-SID is a node SID: it identifies a router (usually its Loopback), not just any prefix.

What about Adj-SIDs?

They're local labels for each link. They aren't used for normal forwarding, but to force a specific path in SR-TE or for TI-LFA protection.

What if I want the last hop to receive the label?

The egress PE advertises its Prefix-SID with the P bit (no PHP), and optionally with the E bit (explicit null) to keep the label's quality of service.

What you take away

  • Segment Routing distributes labels with the IGP: no LDP.
  • Each router reserves the SRGB (16000-23999 on Cisco) and gives its Loopback an index.
  • The label to reach a router is base + index, the same across the domain.
  • The SRGB goes in IS-IS TLV 242 and the Prefix-SID in TLV 135.
  • Adj-SIDs are local and are used to force paths.
  • Services like L3VPN work the same: only the transport label changes.

NEXT STEP

From the provider core to the Career Plan

With IS-IS, BGP, LDP, L3VPN, VPLS and Segment Routing you've now walked through a provider core. You'll see it in detail, with SR-TE, TI-LFA and SRv6, in The House of Routing master classes. We'll let you know when there's news.

Upcoming protocol lessons

Sources

Lesson prepared with AI assistance and checked against the sources cited. The bytes of every packet are generated according to the standard and verified with an independent tool.