Viewing Information and LDP-Signaled LSPs in the Routing Tables

Problem

After you have configured MPLS and LDP on your router, you want to look at the information in the routers routing tables.

Solution

Look in the inet.3 routing table to view the LDP routes:

	aviva@RouterG> show route table inet.3
	inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	192.168.16.1/32 *[LDP/9] 1d 23:02:21, metric 1
	 > via t1-4/0/0.0, Push 100000
	192.168.17.1/32 *[LDP/9] 1d 23:02:21, metric 1
	 > via t1-4/0/0.0

Look in the mpls.0 table to see the routers label information:

	aviva@RouterG> show route table mpls.0
	mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both

	0 *[MPLS/0] 2d 01:59:47, metric 1
	 Receive
	1 *[MPLS/0] 2d 01:59:47, metric 1
	 Receive
	2 *[MPLS/0] 2d 01:59:47, metric 1
	 Receive
	100064 *[ 
 
LDP/9] 1d 23:02:36, metric 1
	 > via t1-4/0/0.0, Pop
	100064(S=0) *[LDP/9] 1d 23:02:36, metric 1
	 > via t1-4/0/0.0, Pop
	100080 *[LDP/9] 1d 23:02:36, metric 1
	 > via t1-4/0/0.0, Swap 100000

Discussion

After configuring MPLS and LDP, if you look in the default JUNOS routing table, inet.0, you don see any of the MPLS or LSP routes and you don see any routers learned from LDP:

	aviva@RouterG> show route table inet.0
	inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	0.0.0.0/0 *[Static/5] 2d 19:44:09
	 > to 172.19.121.1 via fe-0/0/0.0
	10.0.0.0/24 *[Direct/0] 1d 23:01:58
	 > via t1-4/0/0.0
	 [OSPF/10] 1d 23:01:57, metric 65
	 > via t1-4/0/0.0
	10.0.0.1/32 *[Local/0] 3d 02:43:04
	 Local via t1-4/0/0.0
	10.0.8.0/24 *[OSPF/10] 1d 23:01:49, metric 66
	 > via t1-4/0/0.0
	10.0.13.0/24 *[OSPF/10] 1d 23:01:49, metric 131
	 > via t1-4/0/0.0
	172.19.121.0/24 *[Direct/0] 1w3d 21:48:23
	 > via fe-0/0/0.0
	172.19.121.119/32 *[Local/0] 1w3d 21:48:26
	 Local via fe-0/0/0.0
	192.168.15.1/32 *[OSPF/10] 1d 23:01:49, metric 131
	 > via t1-4/0/0.0
	192.168.16.1/32 *[OSPF/10] 1d 23:01:49, metric 66
	 > via t1-4/0/0.0
	192.168.17.1/32 *[OSPF/10] 1d 23:01:49, metric 65
	 > via t1-4/0/0.0
	192.168.19.1/32 *[Direct/0] 3d 02:18:53
	 > via lo0.0
	224.0.0.5/32 *[OSPF/10] 2d 02:31:29, metric 1
	 MultiRecv

This routing table shows only the unicast routes, listing the routes learned from OSPF, which is the IGP we configured in the previous recipe, and the directly connected routes. In the JUNOS software, MPLS and LDP store their routing and forwarding information in two other routing tables, inet.3 and mpls.0. The inet.3 table contains the LDP FECs:

	aviva@RouterG> show route table inet.3
	inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	192.168.16.1/32 *[LDP/9] 5d 00:51:17, metric 1
	 > via t1-4/0/0.0, Push 100000
	192.168.17.1/32 *[ 
LDP/9] 5d 00:51:17, metric 1
	 > via t1-4/0/0.0

This output shows two LDP FECs (routes) to the two LDP neighbors. The first FEC is to the LSPs egress router, 192.168.16.1/32 (RouterF), and the second is to the transit router. Both FECs have a route preference of 9 and a metric of 1, which are the default JUNOS values for LDP. Both routes use the t1-4/0/0 interface, which is what you expect. The end of the second line of the FEC for 192.168.16.1/32 shows a push operation and a label value. When forwarding packets, LDP pushes a label of 100000 onto the packet. LDP stores all the labels being used in LDP-signaled LSPs, which you can display with the following command:

	aviva@RouterF>  
show ldp database
	Input label database, 192.168.16.1:0--192.168.17.1:0
	 Label Prefix
	 100000 192.168.16.1/32
	 3 192.168.17.1/32
	 100032 192.168.19.1/32
	Output label database, 192.168.16.1:0--192.168.17.1:0
	 Label Prefix
	 3 192.168.16.1/32
	 100000 192.168.17.1/32
	 100032 192.168.19.1/32

The inet.3 table on RouterF shows similar FECs:

	aviva@RouterF> show route table inet.3

	inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both

	192.168.17.1/32 *[LDP/9] 5d 03:33:23, metric 1
	 > to 10.0.8.1 via fe-0/0/1.0
	192.168.19.1/32 *[LDP/9] 5d 00:57:15, metric 1
	 > to 10.0.8.1 via fe-0/0/1.0, Push 100032

When the router is forwarding packets on this LSP, LDP pushes a label value, this time 100032, onto all packets entering the LSP.

The second JUNOS routing table, mpls.0, stores label values for MPLS and for LDP. Heres the mpls.0 table on RouterG:

	aviva@RouterG> show route table mpls.0
	mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both

	0 *[MPLS/0] 5d 03:58:02, metric 1
	 Receive
	1 *[MPLS/0] 5d 03:58:02, metric 1
	 Receive
	2 *[MPLS/0] 5d 03:58:02, metric 1
	 Receive
	100064 *[ 
 
LDP/9] 5d 01:00:51, metric 1
	 > via t1-4/0/0.0, Pop
	100064(S=0) *[LDP/9] 5d 01:00:51, metric 1
	 > via t1-4/0/0.0, Pop
	100080 *[LDP/9] 5d 01:00:51, metric 1
	 > via t1-4/0/0.0, Swap 100000

This table is the MPLS label-swapping table and is actually a switching table rather than a routing table. Instead of a prefix in the first column, you see a label value. In this output, the first three entries correspond to reserved labels, defined in RFC 3032. These three entries are learned from MPLS (as indicated by [MPLS/0] in the second column) and are always in the mpls.0 routing table. The remaining three entries are for incoming labels that MPLS assigns to each upstream neighbor. Label 100064 has two entries because the stack value in the MPLS header can be different in different packets. In the first entry label, 100064, the S (stack) bit is 1, so this label matches packets that have only one label on their stacks. The second entry, 100064(S=0), has the stack bit set to 0 and is used when the stack depth is not 1. That is, it is used when the packet is carrying more than one label. For both labels, the operation pops the top label off the stack. The third label, 100080, has a swap operation associated with it.

You can quickly check all the routes learned from LDP with the show route protocol ldp command:

	aviva@RouterG> show route protocol ldp
	inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)
	inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	192.168.16.1/32 *[LDP/9] 1d 23:03:35, metric 1
	 > via t1-4/0/0.0, Push 100000
	192.168.17.1/32 *[LDP/9] 1d 23:03:35, metric 1
	 > via t1-4/0/0.0

	__juniper_private1__.inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0
	hidden)

	mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	100064 *[LDP/9] 1d 23:03:35, metric 1
	 > via t1-4/0/0.0, Pop
	100064(S=0) *[LDP/9] 1d 23:03:35, metric 1
	 > via t1-4/0/0.0, Pop
	100080 *[LDP/9] 1d 23:03:35, metric 1
	 > via t1-4/0/0.0, Swap 100000

This output displays the routes for the LDP FECs, stored in inet.3, and the labelswitching state stored in mpls.0.

Use the show route forwarding-table mpls command to see the active MPLS routes in the Routing Engines forwarding table:

	
	aviva@RouterG> 
show route forwarding-table family mpls
	 
Routing table: mpls
	MPLS:
	Destination Type RtRef Next hop Type Index NhRef Netif
	default perm 0 dscd 28 1 
	0 user 0 recv 27 3
	1 user 0 recv 27 3
	2 user 0 recv 27 3
	100064 user 0 Pop t1-4/0/0.0
	100064(S=0) user 0 Pop t1-4/0/0.0
	100080 user 0 Swap 100000 t1-4/0/0.0

The Destination column lists labels that the router is using to forward traffic, and the last column, Netif, shows the interfaces that are being used to send the labeled traffic. For the nonreserved labels, the second Type column shows the operation performed on matching packets. For packets with label 100064, the label is popped, and packets with label 100080 have their label swapped for 100000.

To see the forwarding entries used by the Packet Forwarding Engine to forward MPLS packets, use the following version of the show pfe route command:

	aviva@RouterG> show pfe route mpls
	MPLS Route Table 0, MPLS.0, 0x0:
	Destination Type ID NhRef
	----------------------- -------- ----- -----
	default Discard 28 1
	0 Receive 27 3
	1 Receive 27 3
	2 Receive 27 3
	100064 Unicast 330 1 t1-4/0/0.0
	100064(S=0) Unicast 332 1 t1-4/0/0.0
	100080 Unicast 333 1 t1-4/0/0.0

Looking at this output, you can see that it shows pretty much the same information as the Routing Engines forwarding table.

See Also

Recipe 8.1


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net