MPLS LDP Conditional Label Advertisement enables the ability to advertise labels for a certain FECs to a selected group of LDP peers. For instance, if all you need are LSPs for M-BGP peering sessions, the PE router can be configured to only advertise these loopback labels to a specific (or all) LDP neighbors.

In this topology I will configure PE_WEST to only advertise the label for its local loopback to P1 and not P2.

First, I’ll create ACL 50 to match P1 and 51 to match the loopback.

PE_WEST(config)#access-list 50 permit 1.1.1.1
PE_WEST(config)#access-list 51 permit 100.100.100.100

Before we apply conditional advertisement, let’s looks at P2 and look at the LIB and LFIB for 10.10.11.0/24. This is the connected subnet between PE_WEST and P1.

P2#show mpls ldp bindings 10.10.11.0 24
lib entry: 10.10.11.0/24, rev 10
local binding:  label: 19
remote binding: lsr: 4.4.4.4:0, label: 19
remote binding: lsr: 100.100.100.100:0, label: imp-null
remote binding: lsr: 1.1.1.1:0, label: imp-null

P2#show mpls forwarding-table 10.10.11.0 24
Local  Outgoing      Prefix            Bytes Label   Outgoing   Next Hop
Label  Label or VC   or Tunnel Id      Switched      interface
19     Pop Label     10.10.11.0/24     0             Fa2/0      10.12.12.1
Pop Label     10.10.11.0/24     0             Fa1/0      10.20.22.10

I can see PE_WEST its it sending the binding for this FEC for a imp-null (label 3). Once we enable conditional advertise for only the loopback address, I expect this entry to be removed from the LIB.

PE_WEST(config)#no mpls ldp advertise-labels
PE_WEST(config)#mpls ldp advertise-labels for 51 to 50

Now check P2 again.

P2#show mpls ldp bindings 10.10.11.0 24
lib entry: 10.10.11.0/24, rev 10
local binding:  label: 19
remote binding: lsr: 4.4.4.4:0, label: 19
remote binding: lsr: 1.1.1.1:0, label: imp-null

P2#show mpls forwarding-table 10.10.11.0 24
Local  Outgoing      Prefix            Bytes Label   Outgoing   Next Hop
Label  Label or VC   or Tunnel Id      Switched      interface
19     Pop Label     10.10.11.0/24     0             Fa2/0      10.12.12.1
No Label      10.10.11.0/24     0             Fa1/0      10.20.22.10

Excellent. P2 no longer gets this binging from PE_WEST. If you look in the LIB in PE_WEST, the labels are still applied, just not advertised to P2.