The tracert lsp command enables the system to trace the gateways along the BGP LSP from the source to the destination.
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -t time-out | -s size | -g ] * segment-routing ip ip-address mask-length [ flex-algo flex-algo-id ] [ version draft2 ] [ bypass ] [ remote remote-ip ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -t time-out | -s size | -g ] * segment-routing ip ip-address mask-length [ flex-algo flex-algo-id ] [ version draft2 ] [ bypass ] [ remote-fec ldp remoteipaddr remotemasklen ]
tracert lsp [ -a source-ip | -exp exp-value | -h ttl-value | -t time-out | -s size | -g ] * sr-te policy { policy-name policyname | endpoint-ip endpoint-ip color colorid | binding-sid bsid }
Parameter | Description | Value |
---|---|---|
-a source-ip |
Specifies a source IP address of the MPLS Echo Request packet to be sent. If no source IP address is specified, the IP address of the outbound interface is used as the source IP address of Echo Request messages to be sent. |
The value is in dotted decimal notation. |
-exp exp-value |
Specifies the EXP value of an Echo Request packet to be sent. |
The value is an integer that ranges from 0 to 7. The default value is 0. |
-h ttl-value |
Specifies the TTL value of MPLS Echo Request packets to be sent. The TTL field in the IP packet header specifies the lifetime of the packet and specifies the maximum number of routers that the packet can pass through. The TTL field is set by the source host that sends the packet. The value of the TTL field decreases by 1 each time the packet passes through a router. When the value of the TTL field is 0, the packet is discarded and a timeout packet is sent to notify the source host. |
The value is an integer ranging from 1 to 255. The default value is 30. |
-t time-out |
Specifies the period of time for waiting for an MPLS Echo Reply packet. |
The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 2000 milliseconds. |
-s size |
Specifies a 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 100 to 9600. |
-g |
Performs the test using MPLS fragments. |
- |
segment-routing |
Specifies a segment routing scenario. |
- |
ip ip-address |
Specifies the destination IPv4 address or host name of a BGP LSP. |
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. It cannot contain spaces. |
mask-length |
Specifies the mask length of the destination address. |
The value is an integer ranging from 0 to 32. |
flex-algo flex-algo-id |
Flex-Algo ID. If a Flex-Algo SR-MPLS BE LSP is used, you need to specify flex-algo-id to initiate a test. |
The value is an integer that ranges from 128 to 255. |
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. |
- |
bypass |
Sets the flag of the backup path. |
- |
remote remote-ip |
Specifies a remote IP address. It is mainly used in the SR-MPLS and LDP tunnel interworking scenario. |
The value is in dotted decimal notation. |
remote-fec |
Indicates the remote FEC type. This parameter is used in scenarios where a device running an earlier version interworks with a device running a later version. This parameter specifies the FEC that can be identified by a device running an earlier version to implement interworking with a device running a later version. |
- |
ldp remoteipaddr |
Specifies the IP address of a remote LDP FEC. |
The value is in dotted decimal notation. |
remotemasklen |
Specifies the mask length of the remote LDP FEC. |
The value is an integer ranging from 0 to 32. |
sr-te |
Specifies the LSP ping type as SR-MPLS TE Policy. |
- |
policy |
Specifies the LSP ping type as SR-MPLS TE Policy. |
- |
policy-name policyname |
Specifies the name of a policy. |
The value is a string of 1 to 31 characters. |
endpoint-ip endpoint-ip |
Specifies the destination IPv4 address of an SR-MPLS TE Policy. |
The value is in dotted decimal notation. |
color colorid |
Specifies the color value of an SR-MPLS TE Policy. |
The value is an integer ranging from 0 to 4294967295. |
binding-sid bsid |
Specifies the ID of a segment to be bound. |
The value is an integer that ranges from 16 to 1048575. |
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.
The tracert lsp command uses MPLS Echo Request packets and MPLS Echo Reply packets to detect the connectivity of LSPs. Both Echo Request and Echo Reply packets are transmitted in the format of UDP packets through port 3503. The receiver distinguishes these two types of packets based on the port number. An MPLS Echo Request packet carries FEC information to be detected, and is sent along the same LSP as other packets carrying the same FEC information. In this manner, the connectivity of the LSP is checked. Echo Request packets are transmitted to the destination using MPLS, whereas MPLS Echo Reply packets are transmitted to the source using IP. The tracert lsp command can be used to check links of the following types:Prerequisites
Implementation Procedure
The process of the tracert lsp command is as follows:
Configuration Impact
To prevent the egress from forwarding a received MPLS Echo Request packet to another node, you can set the destination address in the IP header of the packet to a loopback address with the prefix being 127.0.0.0/8.
<HUAWEI> tracert lsp segment-routing ip 10.4.4.4 32 flex-algo 128
LSP Trace Route FEC: SEGMENT ROUTING IPV4 PREFIX 10.4.4.4/32 FLEX-ALGO: 128 , press CTRL_C to break.
TTL Replier Time Type Downstream
0 Ingress 10.0.0.4/[20099 ]
1 10.4.4.4 10 ms Egress
<HUAWEI> tracert lsp sr-te policy policy-name test
LSP Trace Route FEC: Nil FEC, press CTRL_C to break.
sr-te policy's segment list:
Preference : 300; Path Type: main; Protocol-Origin : local; Originator: 0, 0.0.0.0; Discriminator: 300; Segment-List ID : 1; Xcindex : 1
TTL Replier Time Type Downstream
0 Ingress 10.1.2.1/[13312 12]
1 10.1.2.2 63 ms Transit 10.1.2.2/[12 ]
2 6.6.6.6 93 ms Egress
sr-te policy's segment list:
Preference : 400; Path Type: backup; Protocol-Origin : local; Originator: 0, 0.0.0.0; Discriminator: 400; Segment-List ID : 1; Xcindex : 1
TTL Replier Time Type Downstream
0 Ingress 10.1.2.1/[13312 12]
1 10.1.2.2 63 ms Transit 10.1.2.2/[12 ]
2 6.6.6.6 93 ms Egress
<HUAWEI> tracert lsp segment-routing ip 2.2.2.2 32 version draft2
LSP Trace Route FEC: SEGMENT ROUTING IPV4 PREFIX 2.2.2.2/32 , press CTRL_C to break.
TTL Replier Time Type Downstream
0 Ingress 192.168.1.2/[1001 ]
1 192.168.1.2 6 ms Transit 192.168.2.2/[3 ]
2 192.168.2.2 6 ms Egress
Item | Description |
---|---|
TTL | TTL in an MPLS echo request packet. It indicates the number of hops of the tunnel, through which an echo request packet passes. |
Replier | Specifies the IP address of the node sending an MPLS echo reply packet. |
Time | Specifies the Round-Trip-Time (RTT), in milliseconds. |
Type | Specifies the type of a node. The value can be:
|
Downstream | Specifies the address and label of a downstream device. |
Preference | The preference of path. |
Path Type | The types of path: main path / slave path. |
Protocol-Origin | Protocol source:
|
Segment-List ID | Segment list ID. |
Originator | Indicates the IP address of the end. |
Discriminator | Identifier. |
XcIndex | Index of Xc. |