Segment Routing - LAB I - SR without LDP


In this lab, you will learn how to configure Segment Routing with an MPLS data plane and verify that traffic continues to use label-switched paths after LDP is removed from the routers.

The objective is to demonstrate how Segment Routing can use SIDs advertised through the IGP instead of relying on LDP to distribute transport labels.

Table of Contents

Lab Objective

This lab starts with an MPLS-capable network and demonstrates how Segment Routing can provide the transport-label information required for packet forwarding.

After confirming that Segment Routing is operational, LDP is removed from the routers. The final verification confirms whether MPLS forwarding, end-to-end reachability, and the expected label-switched paths remain operational.

The main objectives are:

  • Enable Segment Routing in the IGP.
  • Assign Prefix-SIDs to router loopback prefixes.
  • Verify SID advertisement throughout the topology.
  • Confirm that Segment Routing labels are installed in the forwarding table.
  • Remove LDP from the transport network.
  • Verify that traffic continues to use the SR-MPLS data plane.

Segment Routing Overview

Segment Routing is a source-routing architecture in which a packet is forwarded through an ordered list of instructions called segments.

With the MPLS data plane, each segment is represented by an MPLS label. The ingress router can impose one or more labels that describe the intended forwarding behavior.

Common Segment Routing segment types include:

  • Prefix-SID: Identifies a prefix, commonly a router loopback address.
  • Node-SID: A Prefix-SID associated with a router and normally reached through the IGP shortest path.
  • Adjacency-SID: Represents a specific adjacency or outgoing link.

The IGP advertises the Segment Routing information required by the routers. Depending on the platform and design, Segment Routing can operate with IS-IS or OSPF.

Segment Routing Compared with LDP

Traditional MPLS networks often use LDP to distribute labels for IGP prefixes. LDP forms neighbor relationships and exchanges label mappings between routers.

Segment Routing distributes SID information through IGP extensions. This allows the IGP topology and Segment Routing label information to be synchronized through the same control-plane protocol.

Characteristic LDP Segment Routing
Label distribution LDP protocol IGP extensions
Control-plane relationships LDP neighbors plus the IGP Primarily the IGP for SID advertisement
Path behavior Normally follows the IGP path Can follow the IGP path or an explicit segment list
Prefix identification Locally assigned label binding Prefix-SID or Node-SID
Traffic engineering Requires additional mechanisms Can use ordered segment lists

Removing LDP should only be performed after the Segment Routing control plane and forwarding plane have been fully verified.

Lab Topology

The lab contains multiple IOS XR routers forming an MPLS transport network. Each router has a loopback address that identifies the node in the IGP and Segment Routing domain.

The physical links provide multiple possible paths through the topology. The lab verifies that traffic follows the expected IGP shortest path while using Segment Routing labels.

The topology also includes a transparent firewall path connected to the transport environment.

Configuration Prerequisites

Before enabling Segment Routing, confirm that:

  • The routers and software releases support SR-MPLS.
  • MPLS forwarding is supported on the required interfaces.
  • The IGP is stable across the topology.
  • All router loopback prefixes are advertised in the IGP.
  • The loopback addresses are reachable end to end.
  • The Segment Routing Global Block is consistent where required.
  • There are no unresolved IGP adjacency or MPLS interface problems.
  • A rollback procedure is available before removing LDP.

Always establish a working routing baseline before changing the MPLS label-distribution mechanism.

Enabling Segment Routing

Segment Routing must be enabled under the IGP process used by the transport network.

The general workflow is:

  1. Verify that the IGP is operational.
  2. Enable Segment Routing for the IGP process.
  3. Confirm that the router advertises Segment Routing capability.
  4. Verify the Segment Routing Global Block.
  5. Confirm that Segment Routing information is received from neighboring routers.

The exact configuration syntax depends on the platform, operating system, software release, and whether the network uses IS-IS or OSPF.

Configuring Prefix-SIDs

Each router requires a Prefix-SID for the loopback prefix that represents the node.

The Prefix-SID can be configured as an index relative to the Segment Routing Global Block or as an absolute label where supported.

For example, when the SRGB starts at label 16000 and a Prefix-SID index of 5 is configured, the resulting local label is normally calculated from the SRGB base plus that index.

The Prefix-SID configuration should meet these requirements:

  • Each node must use a unique SID index.
  • The associated loopback prefix must be advertised by the IGP.
  • The SID must be visible throughout the intended SR domain.
  • The SRGB configuration must be compatible across the participating routers.

After configuration, verify that every router can resolve each remote Prefix-SID through the IGP shortest path.

Verifying Segment Routing

Before removing LDP, verify the Segment Routing control plane and forwarding plane.

Verify IGP Adjacencies

Confirm that all expected IS-IS or OSPF neighbor relationships are operational.

show isis adjacency
show ospf neighbor

Use the command appropriate for the IGP deployed in the lab.

Verify Segment Routing Capability

Confirm that each router advertises and receives Segment Routing information.

show segment-routing mpls connected-prefix-sid-map
show segment-routing mpls forwarding
show segment-routing mpls local-block

Available commands can vary by platform and release.

Verify the MPLS Forwarding Table

show mpls forwarding

Confirm that remote node prefixes have Segment Routing labels and valid outgoing interfaces.

Verify the Routing Table

show route <destination-loopback>

The route should point toward the expected IGP next hop.

Test End-to-End Reachability

ping <destination-loopback> source <source-loopback>
traceroute <destination-loopback> source <source-loopback>

Record the results before removing LDP so they can be compared with the post-change behavior.

Removing LDP

After Segment Routing has been verified across the entire forwarding path, remove LDP from the lab routers.

The removal process can include:

  1. Confirm that all required prefixes have Prefix-SIDs.
  2. Verify that SR labels are installed on every transit router.
  3. Record the current LDP neighbors and label bindings.
  4. Remove LDP from the participating interfaces or routing process.
  5. Commit the configuration.
  6. Confirm that the LDP sessions are no longer present.
  7. Verify that Segment Routing forwarding entries remain installed.

Do not remove LDP from a production network until all required routers and services support the planned Segment Routing design.

Verification After Removing LDP

After LDP has been removed, repeat the original verification tests.

Confirm That LDP Is No Longer Active

show mpls ldp neighbor
show mpls ldp bindings

The expected LDP neighbors or bindings should no longer be present on routers from which LDP was removed.

Confirm That SR Labels Remain Installed

show mpls forwarding
show segment-routing mpls forwarding

The MPLS forwarding table should still contain labels associated with Segment Routing Prefix-SIDs.

Verify End-to-End Connectivity

ping <destination-loopback> source <source-loopback>
traceroute <destination-loopback> source <source-loopback>

The test should confirm that the remote loopbacks remain reachable and that traffic follows the expected path.

Inspect the Label Stack

Where supported, use MPLS traceroute, forwarding-table information, or packet capture to verify that traffic uses SR-MPLS labels rather than labels learned through LDP.

Migration Considerations

A production migration from LDP to Segment Routing requires careful planning.

  • Confirm platform and software support.
  • Identify routers that do not support Segment Routing.
  • Review whether LDP and SR must coexist during migration.
  • Validate the SRGB and Prefix-SID plan.
  • Check all transport and service dependencies.
  • Verify MPLS VPN, pseudowire, and traffic-engineering requirements.
  • Monitor the IGP database and MPLS forwarding table.
  • Test failure and convergence scenarios.
  • Maintain a rollback path until validation is complete.

Removing LDP is the final migration phase, not the first. Segment Routing should already be stable and carrying the required traffic before LDP is withdrawn.

Video Demonstration

The following video demonstrates the Segment Routing configuration, removal of LDP, and post-change verification.

Troubleshooting

A Remote Prefix Has No SR Label

  • Confirm that the remote loopback prefix is in the IGP.
  • Verify that a Prefix-SID is assigned to the prefix.
  • Check whether the router receives the SID advertisement.
  • Review SRGB consistency and label allocation.
  • Confirm that Segment Routing is enabled in the correct IGP area or level.

Connectivity Fails After Removing LDP

  • Check whether all transit routers support and run Segment Routing.
  • Verify the MPLS forwarding table on every hop.
  • Confirm that the destination has a valid Prefix-SID.
  • Check MPLS enablement on the forwarding interfaces.
  • Review IGP adjacency and route changes.
  • Restore LDP according to the rollback plan when required.

The Label Resolves to the Wrong Destination

  • Check for duplicate Prefix-SID indexes.
  • Verify the SRGB on each router.
  • Confirm that the SID is attached to the correct loopback prefix.
  • Review the IGP database and received SID advertisements.

Traffic Uses an Unexpected Path

  • Review the IGP metric for each link.
  • Check equal-cost paths.
  • Confirm whether the SID is an anycast, prefix, or adjacency SID.
  • Verify that no explicit SR policy is overriding the IGP path.

Conclusion

Segment Routing can use the MPLS data plane without depending on LDP for label distribution.

In this design, the IGP advertises Prefix-SIDs and provides the topology information required to calculate the path. The routers install the associated Segment Routing labels in the MPLS forwarding table.

After LDP is removed, successful verification should show that IGP adjacencies remain stable, SR labels remain installed, remote prefixes remain reachable, and traffic continues to follow the expected label-switched path.

In production environments, LDP should be removed only after platform support, SID allocation, forwarding behavior, service dependencies, failure scenarios, and rollback procedures have been fully validated.