The tracert lsp command enables the system to trace the gateways along the LSP from the source to the destination.
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -r reply-mode | -t time-out | -s packet-size | -g ] * ip destination-iphost mask-length [ ip-address ] [ nexthop nexthopAddr ] [ detail ] [ ddmap ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -r reply-mode | -t time-out | -s packet-size | -g ] * te { tunnelName | ifType ifNum } [ hot-standby | primary ] [ compatible-mode ] [ detail ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -t time-out | -s packet-size | -g | -r reply-mode ] * segment-routing { { auto-tunnel srAutoTunnelName [ version { draft2 | draft4 | rfc8287 } ] } | te { tunnelName | ifType ifNum } [ draft2 | rfc8287 ] } [ hot-standby | primary ] [ detail ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -t time-out | -g ] * te { auto-tunnel auto-tunnelname } [ detail ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -s packet-size | -t time-out | -g ] * general labels [ mplsLabel1 [ mplsLabel2 [ mplsLabel3 [ mplsLabel4 [ mplsLabel5 [ mplsLabel6 [ mplsLabel7 [ mplsLabel8 [ mplsLabel9 [ mplsLabel10 [ mplsLabel11 [ mplsLabel12 [ mplsLabel13 ] ] ] ] ] ] ] ] ] ] ] ] ] -i { outIfName | outIfType outIfNum } nexthop nexthopAddr
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -r reply-mode | -t time-out | -s packet-size | -g ] * ip destination-iphost mask-length multi-loopback-address [ begin-address to end-address ] [ nexthop nexthopAddr ] [ ddmap ]
Parameter | Description | Value |
---|---|---|
-a source-ip |
Specifies the source address of MPLS Echo Request packets to be sent. If no source address is specified, the MPLS LSR ID is used as the source address of the MPLS Echo Request packet. |
The value is in dotted decimal notation. |
-exp exp-value |
Specifies the number of MPLS Echo Request packets to be sent. When the network quality is poor, you can increase the number of sent packets to detect the network quality based on the packet loss rate. |
The value is an integer ranging from 1 to 4294967295. |
-h ttl-value |
Specifies the TTL value. If the TTL value in a packet is reduced to 0 during forwarding, the router that the packet reaches sends an ICMP timeout packet to the source, indicating that the destination is unreachable. |
The value is an integer that ranges from 1 to 255. |
-r reply-mode |
Specifies the mode in which the peer returns MPLS Echo Reply packets. |
The value is a decimal integer ranging from 1 to 4. The default value is 2.
|
-t time-out |
Specifies the timeout period for waiting for an MPLS Echo Reply packet after an MPLS Echo Request packet is sent. |
The value is an integer ranging from 0 to 65535, in milliseconds. |
-s packet-size |
Indicates the length of the sent payload packet, that is, the length of the packet excluding the IP header and UDP header. |
The value is an integer that ranges from 84 to 9600, in bytes. |
-g |
Indicates MPLS packet fragmentation. |
- |
ip destination-iphost |
Specifies the IPv4 address or host name of the peer. |
If the value is an IP address, it is in dotted decimal notation. If the value is a hostname, it is a string of 1 to 255 case-sensitive characters, spaces not supported. |
mask-length |
Specifies the mask length of the destination address. |
The value is an integer ranging from 0 to 32. |
ip-address |
Specifies the destination address in the IP header of an MPLS tracert packet with the prefix being 127.0.0.0/8. The destination address in the IP header can be changed to trace a test packet. |
By default, the destination IP address in the IP header of an MPLS tracert packet is 127.0.0.1. |
nexthop nexthopAddr |
Specifies an IP address for the next hop. This parameter is used when the ingress node has one or more next hops. You can specify this parameter to select one tunnel for connectivity check. |
The value is in dotted decimal notation. |
detail |
Displays detailed information. |
- |
ddmap |
Specifies the packet fragmentation flag. |
- |
te tunnelName |
Specifies the name of a TE tunnel interface. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
ifType |
Specifies an interface type. |
- |
ifNum |
Specifies the number of an interface. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
hot-standby |
Indicates that the bypass LSP of the tunnel is detected. |
- |
primary |
Indicates that the primary LSP of a tunnel is monitored. |
- |
compatible-mode |
Specifies the interworking compatibility mode. |
- |
segment-routing |
Segment routing. |
- |
auto-tunnel auto-tunnelname |
Specifies the name of a dynamic tunnel interface. |
The value is a string of 1 to 31 case-sensitive characters. It cannot contain spaces. |
srAutoTunnelName |
Specifies the name of an automatically generated TE tunnel interface. |
The value is a string of 1 to 255 case-sensitive characters. It cannot contain spaces. |
version |
Specifies the command application version. |
- |
draft2 |
Indicates that the command application version is draft2. In the SR MPLS scenario, to check LSP connectivity in compliance with the Draft-ietf-mpls-spring-lsp-ping-02 protocol draft, specify this parameter. |
- |
draft4 |
Indicates that the command application version is draft4. In the SR MPLS scenario, to check LSP connectivity in compliance with the Draft-kumarkini-mpls-spring-lsp-ping-04 protocol draft, specify this parameter. |
- |
rfc8287 |
Indicates that the RFC8287 protocol is used. |
- |
general |
Indicates general ping detection. |
- |
labels mplsLabel1 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel2 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel3 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel4 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel5 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel6 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel7 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel8 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel9 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel10 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel11 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel12 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel13 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
-i outIfName |
Specifies an interface name. |
The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces. |
outIfType |
Specifies an interface type. |
- |
outIfNum |
Specifies the number of an interface. |
The value is a string of 1 to 63 case-insensitive characters. It cannot contain spaces. |
multi-loopback-address |
Specifies the multi-path loopback address to be checked. |
- |
begin-address |
Specifies the start destination address in the IP header of an MPLS tracert packet. |
The value ranges from 127.0.0.0 to 127.255.255.255, in dotted decimal notation. The default value is 127.0.0.0. |
to end-address |
Specifies the end destination address in the IP header of an MPLS tracert packet. |
The value ranges from 127.0.0.0 to 127.255.255.255, in dotted decimal notation. The default value is 127.0.0.31. |
Usage Scenario
The ping lsp command can be used to check the connectivity of LSPs on an MPLS network, and the tracert lsp command can be used to locate the faulty node.
LSP tracert uses MPLS Echo Request and MPLS Echo Reply messages to detect LSP faults. Both Echo Request and Echo Reply packets are transmitted in the format of UDP packets with the port number being 3503. The receive end uses the UDP port number to identify MPLS Echo Request and Reply messages. An MPLS Echo Request packet carries FEC information to be detected, and is sent along the same LSP as other packets with the same FEC information. In this manner, the connectivity of the LSP is checked. MPLS Echo Request packets are forwarded to the destination using MPLS, whereas MPLS Echo Reply packets are forwarded to the source using IP. For the types of links that can be detected by LSP tracert, see Configuration > System Monitoring > Ping and Tracert Configuration > Using Ping/Tracert to Check an MPLS Network > Using Tracert to Check Path Information on an MPLS Network.Prerequisites
Implementation Procedure
The execution process of the tracert lsp command is as follows:
Configuration Impact
To prevent the egress node from forwarding the received MPLS Echo Request message to other nodes, set the destination address in the IP header of the message to a loopback address with the prefix being 127.0.0.0/8.
Precautions
If LDP is not enabled on the transit node, the transit node returns an unreachable packet when the tracert lsp te Tunnel interface-number command is run to detect the tunnel.
<HUAWEI> tracert lsp ip 4.4.4.9 32
LSP Trace Route FEC: LDP IPV4 PREFIX 4.4.4.9/32 , press CTRL_C to break.
TTL Replier Time Type Downstream
0 Ingress 10.1.2.2/[1028 ]
1 10.1.2.2 94 ms Transit 10.1.5.2/[3 ]
2 10.1.5.2 94 ms Egress
Item | Description |
---|---|
press CTRL_C to break | You can press CTRL+C to stop the ongoing tracert test. |
TTL | Number of gateways through which the packet passes. |
Replier | IP address of the transit node sending an MPLS Echo Response packet. |
Time | Round-Trip Time (RTT) value, in milliseconds. |
Type | Type of a node. The value can be:
|
Downstream | Next-hop address and pushed label value. |