[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Verify MPLS Labels

You can use the traceroute command or the ping mpls command to verify that packets are being sent over the LSP.

To verify MPLS labels and that packets are sent over the LSP, follow these steps:

  1. Use the traceroute Command to Verify MPLS Labels
  2. Use the ping Command to Verify MPLS Labels

Use the traceroute Command to Verify MPLS Labels

Purpose

You can use the traceroute command to verify that packets are being sent over the LSP.

Action

To verify MPLS labels, enter the following JUNOS CLI operational mode command, where host-name is the IP address or the name of the remote host:

user@host> traceroute host-name

Sample Output 1

user@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

Sample Output 2

user@R1> traceroute 10.0.0.6 
traceroute to 10.0.0.6 (10.0.0.6), 30 hops max, 40 byte packets
 1  10.1.13.2 (10.1.13.2)  0.605 ms  0.548 ms  0.503 ms
 2  10.0.0.6 (10.0.0.6)  0.761 ms  0.676 ms  0.675 ms

Meaning

Sample Output 1 shows that MPLS labels are used to forward packets through the network. Included in the output is a label value (MPLS Label=100048), the time-to-live value (TTL=1), and the stack bit value (S=1).

The MPLS Label field is used to identify the packet to a particular LSP. It is a 20-bit field, with a maximum value of (2^^20-1), or approximately 1,000,000.

The TTL value contains a limit on the number of hops that this MPLS packet can travel through the network (1). It is decremented at each hop, and if the TTL value drops below one, the packet is discarded.

The bottom of the stack bit value (S=1) indicates that is the last label in the stack and that this MPLS packet has one label associated with it. The MPLS implementation in the JUNOS software supports a stacking depth of 3 on the M-series routers and up to 5 on the T-series platforms. For more information on MPLS label stacking, see RFC 3032, MPLS Label Stack Encoding.

MPLS labels appear in Sample Output 1 because the traceroute command is issued to a BGP destination where the BGP next hop for that route is the LSP egress address. The JUNOS software default behavior uses LSPs for BGP traffic when the BGP next hop equals the LSP egress address.

Sample Output 2 shows that MPLS labels do not appear in the output for the traceroute command. If the BGP next hop does not equal the LSP egress address or the destination is an IGP route, the BGP traffic does not use the LSP. Instead of using the LSP, the BGP traffic is using the IGP (IS-IS, in this case) to reach the egress address (R6).


Use the ping Command to Verify MPLS Labels

Purpose

On the egress router (the router receiving the MPLS echo packets), you must configure the address 127.0.0.1/32 on its loopback (lo0) interface, resulting in echo requests being sent as MPLS packets destined for the address 127.0.0.1 and the well-known port 3503. When the echo request arrives at the egress router, the receiver checks the contents of the packet and sends a reply containing the correct return value. The sender of the echo request waits 2 seconds for the echo reply, then times out. In the example network shown in Figure 5, the egress router is R6. If address 127.0.0.1/32 is not configured, the egress router does not have this forwarding entry and therefore simply drops the incoming MPLS pings and replies with "ICMP host unreachable" messages.

Action

To verify MPLS labels, follow these steps:

  1. On the egress router, in configuration mode, go to the following hierarchy level:
    [edit]
    user@egress-router# edit interfaces lo0 unit number
  2. Configure the loopback (lo0) interface with the following IP address:
    [edit interfaces lo0 unit number]
    user@egress-router# set family inet address 127.0.0.1/32
  3. Verify the configuration:
    user@egress-router# show
    user@egress-router# commit
  4. On the ingress router, in operational mode, enter the following command to ping the egress router:
    user@ingress-router> ping mpls rsvp lsp-name detail

Sample Output 1

user@R6> edit
Entering configuration mode

[edit]
user@R6# edit interfaces lo0 unit 0

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

[edit interfaces lo0 unit 0]
user@R6# show 
family inet {
    address 10.0.0.6/32;
    address 127.0.0.1/32;
}
family iso {
    address 49.0004.1000.0000.0006.00;
}

[edit interfaces lo0 unit 0]
user@R6# commit
commit complete

Sample Output 2

user@R1> ping mpls rsvp R1-to-R6 detail
Request for seq 1, to interface 69,  label 100064
Reply for seq 1, return code: Egress-ok
Request for seq 2, to interface 69, label 100064
Reply for seq 2, return code: Egress-ok
Request for seq 3, to interface 69, label 100064
Reply for seq 3, return code: Egress-ok
Request for seq 4, to interface 69, label 100064
Reply for seq 4, return code: Egress-ok
Request for seq 5, to interface 69, label 100064
Reply for seq 5, return code: Egress-ok

--- lsping statistics ---
5  packets transmitted, 5 packets received, 0% packet loss

Meaning

Sample Output 1 from egress router R6 shows that the IP address 127.0.0.1/32 is configured.

Sample Output 2 from ingress router R1 shows that an echo request is sent with a label (100064), indicating that the echo requests were sent over the LSP R1-to-R6.


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]