LDP Static Labels

Load isis.cfg

#IOS-XE
config replace flash:isis.cfg

#IOS-XR
configure
load bootflash:isis.cfg
commit replace
y

  • Configure LDP using IGP autoconfig on routers R2-R6

  • Do not configure LDP on the XR routers

  • Using static labeling, allocate label 201 to 20.20.20.20/32 on R2, and always forward this out to R3

  • Using static labeling, configure label 1901 for 20.20.20.20/32 on XR1. Ensure XR1 pops this label and forwards traffic to XR2.

Answer

#R2-R6
router isis
 mpls ldp autoconfig

#R2
ip route 20.20.20.20 255.255.255.255 20.2.3.3
mpls label range 2000 2999 static 200 299
mpls static binding ipv4 20.20.20.20 255.255.255.255 201

#XR1
mpls label range table 0 19000 19999
!
mpls static
 interface GigabitEthernet0/0/0/0.519
 interface GigabitEthernet0/0/0/0.619
 interface GigabitEthernet0/0/0/0.1920
 address-family ipv4 unicast
  local-label 19001 allocate per-prefix 20.20.20.20/32
   forward
    path 1 nexthop 10.19.20.20 out-label pop

#R5
mpls label range 5000 5999 static 500 599
mpls static binding ipv4 20.20.20.20 255.255.255.255 501
mpls static binding ipv4 20.20.20.20 255.255.255.255 output 20.5.19.19 19001

#R6
mpls label range 6000 6999 static 600 699
mpls static binding ipv4 20.20.20.20 255.255.255.255 601
mpls static binding ipv4 20.20.20.20 255.255.255.255 output 20.6.19.19 19001

Explanation

Static MPLS label bindings, although not very useful in the real world, are worth knowing how to configure. On IOS-XE, we have to define a label range and a static label range. Then we can configure a local binding and a forwarding action.

#IOS-XE
mpls label range 5000 5999 static 500 599
mpls static binding ipv4 20.20.20.20 255.255.255.255 501
mpls static binding ipv4 20.20.20.20 255.255.255.255 output 20.5.19.19 19001

On IOS-XE, we still must be running LDP. Note that any label bindings learned over LDP will always be preferred over a static binding. IOS-XE warns us of this when we configure the binding on R2 for example. R2 already has an LDP binding from R3:

On IOS-XR, we can configure this under mpls static. The command to configure a local label and forwarding action is a little wordy. We also must configure the label range globally. Note that forwarding does not work on IOS-XR. I believe this is a limitation of the XRv platform, not that the configuration is wrong. (But it could be).

#XR1
mpls label range table 0 19000 19999
!
mpls static
 interface GigabitEthernet0/0/0/0.519
 interface GigabitEthernet0/0/0/0.619
 interface GigabitEthernet0/0/0/0.1920
 address-family ipv4 unicast
  local-label 19001 allocate per-prefix 20.20.20.20/32
   forward
    path 1 nexthop 10.19.20.20 out-label pop

Verification

On R2, we can see that the local label is indeed 201. Although, this doesn’t really matter, because R1 is not running MPLS anyways. So this local label will not actually be used.

On R5 and R6, we had to configure a static label binding so that we could program the forwarding action of swap to 19001. We can confirm this on each router:

On R3 and R4, we should see R5 and R6’s local static binding for this prefix now:

On XR1, even though traffic is not being forwarded, we can still confirm via the LFIB that the local label allocation is there:

We can also see that the interfaces are enabled for static MPLS:

Last updated