Migrate LDP to SR (ISIS)

Load basic.isis.ldp.enabled.cfg

configure
load bootflash:basic.isis.ldp.enabled.cfg
commit replace
y

Currently the core is using LDP only. Convert the core to SR only without any traffic disruption.

Answer

Step 1) We add SR to all nodes. By default, the LDP label will still be preferred, so this doesn’t result in any change in the data plane. Only R1 is shown for brevity:

#R1
router isis 1
 add ipv4
  segment-routing mpls
 int lo1
  add ipv4
   prefix-sid index 1

We can see that the SR label table is now populated:

SR to SR label swap entries have been added to the LFIB:

However, none of these will be used right now, because all routers are still imposing LDP labels on IP packets. We can verify this by checking the FIB for any prefix:

Step 2) We change the label imposition to SR labels rather than LDP labels. This can be done on a router-by-router basis. Only R1 is shown for brevity:

#R1
router isis 1
 add ipv4
  segment-routing mpls sr-prefer

The label imposed is now the SR label:

This can be done router-by-router with no issues. Only the ingress LER controls whether the LDP or SR label path is used. LSRs will switch SR labels to SR labels and LDP labels to LDP labels.

Step 3) Once all routers are imposing SR labels via the sr-prefer command, we can begin removing LDP. First we’ll remove LDP/IGP sync from the ISIS apply group. (If you remove LDP first, the IGP will be affected as the IGP costs will change).

#R1
group ISIS
 router isis '1'
  interface 'GigabitEthernet.*'
   address-family ipv4 unicast
    no mpls ldp sync
end-group

Step 4) Now we remove LDP from all routers one by one.

#R1
router isis 1
 add ipv4
  no mpls ldp auto-config
!
no mpls ldp

Summary

Cisco’s default preference for LDP label imposition gives us a graceful way to migrate to SR. First, SR is enabled everywhere, but is not actually “in use” yet because LDP labels are still being imposed. This allows us to first verify SR and perhaps use OAM to verify SR LSPs before SR is actually used.

Next, we use sr-prefer to start enabling SR. This can be done on a router-by-router basis. The ingress LER controls whether an LDP or SR label is imposed. Make sure you have enabled SR everywhere before doing this.

Finally, we can remove LDP. We first removed LDP/IGP sync to prevent max-metrics on interfaces, and then removed LDP altogether.

Last updated