LDP/IGP Sync (ISIS)
Load isis.cfg
#IOS-XE
config replace flash:isis.cfg
#IOS-XR
configure
load bootflash:isis.cfg
commit replace
y
Configure LDP authentication for XR2 on XR1, using pass LDP1920. Do not configure XR2.
Configure LDP authentication for R6 on XR1, using pass LDP619. Do not configure R6.
Configure LDP for all routers using autoconfig under ISIS
Configure LDP sync so that all traffic from R1 to XR2 is always sent over R5-XR1 instead of R6-XR1 when LDP is not between R6-XR1.
Configure the XR1-R6 link so that the IGP waits for LDP to be up for 20 seconds before reducing the metric.
Configure ISIS for wide-style metrics on all routers.
Answer
#R1-R6
router isis
mpls ldp autoconfig
mpls ldp sync
metric-style wide
#R6
int Gi2.619
mpls ldp igp sync delay 20
#XR1
router isis 1
add ipv4
mpls ldp auto-config
metric-style wide
int gi0/0/0/0.519
add ipv4
mpls ldp sync
int gi0/0/0/0.619
add ipv4
mpls ldp sync
int gi0/0/0/0.1920
add ipv4
mpls ldp sync
!
mpls ldp
neighbor 6.6.6.6:0 password clear LDP619
neighbor 20.20.20.20:0 password clear LDP1920
int gi0/0/0/0.619
igp sync delay on-session-up 20
#XR2
router isis 1
add ipv4
mpls ldp auto-config
metric-style wide
int gi0/0/0/0.1920
add ipv4
mpls ldp sync
!
mpls ldp
Explanation
MPLS LDP/IGP sync for ISIS works very much the same as OSPF. The one small difference is that the max link metric for wide metrics is not (max-1), instead it is (max-2). This is because 16777215 has a special meaning in ISIS, which is that the link should be completely excluded from the graph. So instead, 16777214 is used as the “max metric.”
Also, note that when enabling LDP sync for ISIS on IOS-XR, we must apply this to each interface individually. This is a bit cumbersome. You could use an apply-group instead.
#XR1
group ISIS
router isis '1'
interface 'GigabitEthernet.*'
address-family ipv4 unicast
mpls ldp sync
!
router isis 1
apply-group ISIS
Verification
Currently, XR1 is not in sync with R6 or XR20 due to the LDP auth mismatch. We can verify this on XR1 using show mpls ldp igp sync.

There are alternative routes to all prefixes, except for XR2’s loopback. XR2 is essentially a stub router. Notice that the metric is (max-2), not (max-1). The LDP/IGP sync feature will never make prefixes unreachable, it just discourages the use of links by setting the metric value as high as possible.

16777215 (max-1) has a special meaning in ISIS, which is that the link should be considered unusable. IOS-XR allows us to set this metric manually using “maximum” and warns us that all routers will exclude this link from their SPF.

If we set this, the metric will still be 16777214 since LDP is not sync’ed yet. (Essentially, the rule is: If LDP is not synced, metric=(max-2)). If we bring up LDP on XR2, we can cause XR2 to become unreachable due to this (max-1) metric value on the link.
#XR1
mpls ldp
neighbor
no 20.20.20.20:0 password

Now the prefix to 20.20.20.20/32 is not even present in the RIB:

Moving on to R6-XR1. Just like with OSPF, the ISIS interface metric for R6-XR1 is still configured as 10, so that is the value shown in the ISIS show output on XR1:

However, if we inspect the database, we see that the metric is actually (max-2) right now. Note that the link type is broadcast, and XR1 is the DIS.

Let’s bring up the R6-XR1 LDP session and verify that the sync delay works on IOS-XR.
#R6
mpls ldp nei 19.19.19.19 password LDP619

Last updated