LDP Label Advertisement Filtering Challenge
Last updated
Last updated
Load isis.cfg
Configure LDP using IGP autoconfig on routers R2-R6 and XR1.
Configure all routers to only allocate labels for /32s.
In this topology, only R2 and XR1 are PEs. Configure R3 to obtain this output using inbound filtering:
Configure the network so that R5 has this in its LFIB. Do this without configuring R5 itself:
Enable LDP and allocate only for /32s:
Verify that all routers only have /32 prefixes in their LFIB:
Configure R3 to filter all prefixes except for R2 and XR1’s loopback:
Note that you may need to clear LDP neighbors. R3 should now only have remote labels for 2.2.2.2/32 and 19.19.19.19/32
Configure all of R5’s neighbors to only advertise labels for R2 and XR1’s loopback to R5:
R5 should now only have remote labels for 2.2.2.2/32 and 19.19.19.19/32
NOTE: Upon doing this lab again, I noticed that R4, R6, and XR1 are no longer advertising labels to any other peers besides R5! Instead I used a “to” ACL of any so that these routers advertise the PE loopbacks to all LDP peers, not just R5. We can also just omit the “to” portion and apply the advertisement filter to all peers by default.
Before label allocation filtering was available, label control was achieved using inbound and outbound label filtering. As you can see, this is quite tedious, as you have to apply inbound filtering to every peer individually, or apply outbound filtering to a group of peers indentified in an ACL. Further, you are still left with several prefixes with no labels, because the router is still locally allocating labels. For example, on R5 we see local labels for 3.3.3.3/32, 4.4.4.4/32, etc., because it is allocating these locally, although it is not receiving any remote bindings for them.
Also remember that when using outbound label filtering, you must also turn off the default advertisement using no mpls ldp advertise-labels on IOS-XE and mpls ldp label local advertise disable on IOS-XR.
These days it is better to just use local label allocation. In this lab you allocated labels for host-routes, but you can also allocate based on a prefix-list (IOS-XE) or ACL (IOS-XR) using: