Specifications

Table Of Contents
mpls ldp advertise-labels
MP-200
Cisco IOS Multiprotocol Label Switching Command Reference
January 2010
Normally, LDP advertises labels only for IP prefixes that are in the routing table. You can use the mpls
ldp advertise-labels interface command to force LDP to advertise a label for a prefix constructed from
an interface address and a 32-bit mask. Such a prefix is not usually in the routing table.
Examples In the following example, the router is configured to advertise no locally assigned labels to any LDP
neighbors:
Router(config)# no mpls ldp advertise-labels
In the following example, the router is configured to advertise to all LDP neighbors only the labels for
networks 10.101.0.0 and 10.221.0.0:
Router(config)# ip access-list standard pfx-filter
Router(config-std-nacl)# permit 10.101.0.0 0.0.255.255
Router(config-std-nacl)# permit 10.221.0.0 0.0.255.255
Router(config-std-nacl)# exit
Router(config)# mpl
s ldp advertise-labels for pfx-filter
Router(config)# no mpl
s ldp advertise-labels
In the following example, the router is configured to advertise the label for network 10.165.200.0 only
to LSR 10.200.110.55, the label for network 10.35.35.55 only to LSR 10.150.25.25, and the labels for
all other prefixes to all LSRs:
Router(config)# ip access-list standard pfx-filter1
Router(config-std-nacl)# permit 10.165.200.0
Router(config-std-nacl)# exit
Router(config)# ip access-list standard lsr-filter1
Router(config-std-nacl)# permit 10.200.110.55
Router(config-std-nacl)# exit
Router(config)# ip access-list standard pfx-filter2
Router(config-std-nacl)# permit 10.35.35.55
Router(config-std-nacl)# exit
Router(config)# ip access-list standard lsr-filter2
Router(config-std-nacl)# permit 10.150.25.25
Router(config-std-nacl)# exit
Router(config)# mpls ldp advertise-labels for pfx-filter1 to lsr
-filter1
Router(config)# mpls ldp advertise-labels for pfx-filter2 to lsr
-filter2
The output of the show mpls ip binding detail command includes the (prefix acl, peer acl) pairs that
apply to each prefix. For this example, the applicable pairs are as follows:
Router# show mpls ip binding detail
Advertisement spec:
Prefix acl = pfx-filter1; Peer acl = lsr-filter1
Prefix acl = pfx-filter2; Peer acl = lsr-filter2
10.35.35.55/8, rev 109
in label: 16
Advertised to:
10.150.25.25:0
out label: imp-null lsr: 10.200.110.55:0 inuse
out label: imp-null lsr: 10.150.25.25:0
Advert acl(s): Prefix acl pfx-filter2, Peer acl lsr-filter2
10.165.200.0/8, rev 108