Examples
Enabling explicit-null on an egress LSR causes that LSR to advertise the explicit-null label to all adjacent MPLS devices.
Device# configure terminal
Device(config)# mpls ldp explicit-null
If you issue the
show mpls forwarding-table command on an adjacent device, the output shows that MPLS packets are forwarded with an explicit-null label (value of 0). In the following example, the second column shows that entries have outgoing labels of 0, where once they were marked “Pop label”.
Device# show mpls forwarding-table
Local Outgoing Prefix Bytes label Outgoing Next Hop
label label or VC or Tunnel Id switched interface
19 Pop tag 10.12.12.12/32 0 Fa2/1/0 172.16.0.1
22 0 10.14.14.14/32 0 Fa2/0/0 192.168.0.2
23 0 172.24.24.24/32 0 Fa2/0/0 192.168.0.2
24 0 192.168.0.0/8 0 Fa2/0/0 192.168.0.2
25 0 10.15.15.15/32 0 Fa2/0/0 192.168.0.2
26 0 172.16.0.0/8 0 Fa2/0/0 192.168.0.2
27 25 10.16.16.16/32 0 Fa2/0/0 192.168.0.22
28 0 10.34.34.34/32 0 Fa2/0/0 192.168.0.2
Enabling explicit-null and specifying the
for keyword with a standard access control list (ACL) changes all adjacent MPLS devices' tables to swap an explicit-null label for only those entries specified in the access-list. In the following example, an access-list is created that contains the 10.24.24.24/32 entry. Explicit null is configured and the access list is specified.
Device# configure terminal
Device(config)# mpls label protocol ldp
Device(config)# access-list 24 permit host 10.24.24.24
Device(config)# mpls ldp explicit-null for 24
If you issue the
show mpls forwarding-table command on an adjacent device, the output shows that the only the outgoing labels for the addresses specified (172.24.24.24/32) change from Pop label to 0. All other Pop label outgoing labels remain the same.
Device# show mpls forwarding-table
Local Outgoing Prefix Bytes label Outgoing Next Hop
label label or VC or Tunnel Id switched interface
19 Pop tag 10.12.12.12/32 0 Fa2/1/0 172.16.0.1
22 0 10.14.14.14/32 0 Fa2/0/0 192.168.0.2
23 0 172.24.24.24/32 0 Fa2/0/0 192.168.0.2
24 0 192.168.0.0/8 0 Fa2/0/0 192.168.0.2
25 0 10.15.15.15/32 0 Fa2/0/0 192.168.0.2
26 0 172.16.0.0/8 0 Fa2/0/0 192.168.0.2
27 25 10.16.16.16/32 0 Fa2/0/0 192.168.0.22
28 0 10.34.34.34/32 0 Fa2/0/0 192.168.0.2
Enabling explicit null and adding theto keyword and an access list enables you to advertise explicit-null labels to only those adjacent devices specified in the access-list. To advertise explicit-null to a particular device, you must specify the device's LDP ID in the access-list.
In the following example, an access-list contains the 10.15.15.15/32 entry, which is the LDP ID of an adjacent MPLS device. The device that is configured with explicit null advertises explicit-null labels only to that adjacent device.
Device# show mpls ldp discovery
Local LDP Identifier:
10.15.15.15:0
Discovery Sources:
Interfaces:
FastEthernet2/0/0(ldp): xmit/recv
TDP Id: 10.14.14.14:0
Device# configure terminal
Device(config)# mpls label protocol ldp
Device(config)# access-list 15 permit host 10.15.15.15
Device(config)# mpls ldp explicit-null to 15
If you issue the
show mpls forwarding-table command, the output shows that explicit null labels are going only to the device specified in the access list.
Device# show mpls forwarding-table
Local Outgoing Prefix Bytes label Outgoing Next Hop
label label or VC or Tunnel Id switched interface
19 Pop tag 10.12.12.12/32 0 Fa2/1/0 172.16.0.1
22 0 10.14.14.14/32 0 Fa2/0/0 192.168.0.2
23 0 172.24.24.24/32 0 Fa2/0/0 192.168.0.2
24 0 192.168.0.0/8 0 Fa2/0/0 192.168.0.2
25 0 10.15.15.15/32 0 Fa2/0/0 192.168.0.2
26 0 172.16.0.0/8 0 Fa2/0/0 192.168.0.2
27 25 10.16.16.16/32 0 Fa2/0/0 192.168.0.22
28 0 10.34.34.34/32 0 Fa2/0/0 192.168.0.2
Enabling explicit-null with both the
for and
to keywords enables you to specify which routes to advertise with explicit-null labels and to which adjacent devices to advertise these explicit-null labels.
Device# show access 15
Standard IP access list 15
permit 10.15.15.15 (7 matches)
Device# show access 24
Standard IP access list 24
permit 10.24.24.24 (11 matches)
Device# configure terminal
Device(config)# mpls label protocol ldp
Device(config)# mpls ldp explicit-null for 24 to 15
If you issue the
show mpls forwarding-table command, the output shows that it receives explicit null labels for 10.24.24.24/32.
Device# show mpls forwarding-table
Local Outgoing Prefix Bytes label Outgoing Next Hop
label label or VC or Tunnel Id switched interface
17 0 <--- 10.24.24.24/32 0 Fe2/0/0 172.16.0.1
20 Pop tag 172.16.0.0/8 0 Fe2/0/0 172.16.0.1
21 20 10.12.12.12/32 0 Fe2/0/0 172.16.0.1
22 16 10.0.0.0/8 0 Fe2/0/0 172.16.0.1
23 21 10.13.13.13/32 0 Fe2/0/0 172.16.0.1
25 Pop tag 10.14.14.14/32 0 Fe2/0/0 172.16.0.1
27 Pop tag 192.168.0.0/8 0 Fe2/0/0 172.16.0.1
28 25 10.16.16.16/32 0 Fe2/0/0 172.16.0.1
29 Pop tag 192.168.34.34/32 0 Fe2/0/0 172.16.0.1