Verifying Packet Labels

Table of contents:

Problem

After configuring an RSVP-signaled LSP, you want to verify which labels are being used when packets are forwarded along the LSP.

Solution

The easiest way to see all the labels being used as a packet traverses an LSP is to run the traceroute command on the ingress router:

	aviva@R1> traceroute 100.100.6.0
	traceroute to 100.100.6.0 (100.100.6.0), 30 hops max, 40 byte packets
	 1 10.1.13.2 (10.1.13.2) 0.858 ms 0.751 ms 0.701 ms
	 MPLS Label=103536 CoS=0 TTL=1 S=1
	 2 10.1.36.2 (10.1.36.2) 0.598 ms !N 0.591 ms !N 0.554 ms !N

Discussion

There are several ways to find out which labels packets carry as they pass through the routers in an LSP. To see all the labels used by all the routers along the LSP with a single command, issue a traceroute command on the ingress router. Traceroute works when the inet.0 routing table has a route to the destination that has the LSP as the next hop. This recipe shows the output of this command. For the first hop (line 1), the second line shows the MPLS label value of 103536. It also shows the other value in the MPLS header. The CoS (experimental) bits are not set (they are 0), and the Stack bit is 1 because this is the last label in the stack.

The LSP in this recipe is short, so the TRaceroute output shows only the one label. Heres what the output looks like for a longer LSP:

	aviva@R1> traceroute 100.100.6.1
	traceroute to 100.100.6.1 (100.100.6.1), 30 hops max, 40 byte packets
	1 10.1.12.2 (10.1.12.2) 0.861 ms 0.718 ms 0.679 ms
	 MPLS Label=100048 CoS=0 TTL=1 S=1
	2 10.1.24.2 (10.1.24.2) 0.822 ms 0.731 ms 0.708 ms
	 MPLS Label=100016 CoS=0 TTL=1 S=1
	3 10.1.46.2 (10.1.46.2) 0.571 ms !N 0.547 ms !N 0.532 ms !N

The ingress router uses the label 100048 to reach the next hop in the LSP, and the first transit router replaces that label with 100016.

Other JUNOS commands show the labels used on individual routers or on adjacent routers; however, you need to log in to each router to use these commands. The show mpls lsp command on any router in an LSP shows the labels the router is receiving on incoming packets and using on outgoing packets. Heres an example from a transit router:

	aviva@R3> show mpls lsp
	Transit LSP: 2 sessions
	To From State Rt Style Labelin Labelout LSPname
	10.0.0.1 10.0.0.6 Up 1 1 FF 100048 3 R6-to-R1
	10.0.0.6 10.0.0.1 Up 1 1 FF 100064 3 R1-to-R6
	Total 2 displayed, Up 2, Down 0

To verify that the LSP label operations are working properly, check the transit routers labels against those on the ingress and egress routers:

	aviva@R1> show rsvp session
	Ingress RSVP: 1 sessions
	To From State Rt Style Labelin Labelout LSPname
	10.0.0.6 10.0.0.1 Up 1 1 FF - 100064 R1-to-R6
	Total 1 displayed, Up 1, Down 0

	aviva@R6> show rsvp session
	Ingress RSVP: 1 sessions
	To From State Rt Style Labelin Labelout LSPname
	10.0.0.1 10.0.0.6 Up 1 1 FF - 100048 R6-to-R1
	Total 1 displayed, Up 1, Down 0

On R1, the routers outgoing label on LSP R1-to-R6 is 100064, which matches what the transit router is receiving. On R6, the outgoing label on the R6-to-R1 LSP is 100048, which matches the incoming label on the transit router.

The show mpls lsp detail command also lists the labels. The mpls.0 routing table on the transit routers also lists the labels for the LSPs:

	aviva@R3> show route table mpls.0
	mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both
	0 *[MPLS/0] 00:48:54, metric 1
	 Receive
	1 *[MPLS/0] 00:48:54, metric 1
	 Receive
	2 *[MPLS/0] 00:48:54, metric 1
	 Receive
	100032 *[RSVP/7] 00:16:43, metric 1
	 > via so-0/0/3.0, label-switched-path R1-to-R6
	100032(S=0) *[RSVP/7] 00:16:43, metric 1
	 > via so-0/0/3.0, label-switched-path R1-to-R6
	100048 *[RSVP/7] 00:16:08, metric 1
	 > via so-0/0/2.0, label-switched-path R6-to-R1
	100048(S=0) *[RSVP/7] 00:16:08, metric 1
	 > via so-0/0/2.0, label-switched-path R6-to-R1

To verify correct forwarding along the LSP, ping the egress router from the ingress router. For this to work, you need to configure a loopback address of 127.0.0.1 on the egress router:

	[edit]
	aviva@R6# set interfaces lo0 unit 0 family inet address 127.0.0.1/32

The egress router uses this address to send echo replies to echo requests sent by the ping command. You then send an MPLS ping request from the ingress router along the LSP:

	aviva@R1> ping mpls rsvp R1-to-R6
	!!!!!
	--- lsping statistics ---
	5 
packets transmitted, 5 packets received, 0% packet loss

The ping echo replies include the label that the ingress router added to the packet when putting it into the LSP. The ping mpls command uses port 3503 for MPLS echo requests instead of UDP port 7, which is used by the standard ping command.


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