It is only possible to see both labels with "show ip cef ..." in one command, if there is no load sharing to the BGP next hop. If there is more than one equal cost path to the BGP next hop, you need two commands to see all involved labels, just as you have observed it.

In a 6500 your "show mls ... " command is the only way I know to see both labels in one output of a show commands.

In your case, "sh ip cef 172.17.0.213 255.255.255.255 detail" will only provide you with information about the LDP labels used to reach 172.17.0.213/32. The VPN labels have nothing to do with that.

In brief:

1) IF there is only one IGP path to the BGP next hop, then "show ip cef vrf ... " will show both labels, the LDP label and the VPN label.

2) IF there is more than one equal cost path to the BGP next hop, then "show ip cef vrf ... " will show the VPN label and point you to the BGP next hop: "recursive ...". In this case you need a second command "show ip cef detail" to see the LDP labels used.

As a quick check you could also use "traceroute vrf ... ", which should reveal the label stack used to forward packets towards the prefix.

Replies

The observed output is due to load balancing in the MPLS core, i.e. there are several pathes to the BGP next hop known to CEF.

Have a look at the respective output statement:

--------

Recursive rewrite via 172.17.0.213/32, tags imposed {339}

Recursive load sharing using 172.17.0.213/32.

--------

To get the full label stack you need to check the CEF/LFIB entries for 172.17.0.213/32 with "show ip cef 172.17.0.213 255.255.255.255 detail" or with "show mpls forwarding-table", which will give you the values obtained by the output of your second command available on the 6500:

172.212.0.0/16

Te2/5 339(+),224(+) (Hash: 0001)

Te1/5 339(+),20(+) (Hash: 0002)

You should be able to see outgoing labels 20 and 224 for 172.17.0.213/32.

It is only possible to see both labels with "show ip cef ..." in one command, if there is no load sharing to the BGP next hop. If there is more than one equal cost path to the BGP next hop, you need two commands to see all involved labels, just as you have observed it.

In a 6500 your "show mls ... " command is the only way I know to see both labels in one output of a show commands.

In your case, "sh ip cef 172.17.0.213 255.255.255.255 detail" will only provide you with information about the LDP labels used to reach 172.17.0.213/32. The VPN labels have nothing to do with that.

In brief:

1) IF there is only one IGP path to the BGP next hop, then "show ip cef vrf ... " will show both labels, the LDP label and the VPN label.

2) IF there is more than one equal cost path to the BGP next hop, then "show ip cef vrf ... " will show the VPN label and point you to the BGP next hop: "recursive ...". In this case you need a second command "show ip cef detail" to see the LDP labels used.

As a quick check you could also use "traceroute vrf ... ", which should reveal the label stack used to forward packets towards the prefix.