No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fit AP V200R010C00 Command Reference

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
tracert

tracert

Function

The tracert command checks the path of packets from the source to the destination, checks network connectivity, and locates a network fault.

Format

tracert [ -a source-ip-address | -f first-ttl | -m max-ttl | -name | -p port | -q nqueries | -s packetsize | -w timeout ] * host

Parameters

Parameter Description Value
-a source-ip-address Specifies the source address of a probe packet.

If this parameter is not specified, the IP address of the outbound interface is used as the source IP address for sending tracert packets.

The value is in dotted decimal notation.
-f first-ttl Specifies the initial TTL. The TTL field is carried in the IP header. It indicates the lifetime of packets and specifies the maximum hops that packets can pass through. The TTL value is set on the source and reduced by 1 each time the packet passes through a hop. When the TTL value is reduced to 0, the packet is discarded. At the same time, an ICMP Timeout message is sent to notify the source host. If first-ttl is specified and the number of hops is smaller than the value of first-ttl, no ICMP Timeout packet is sent to the source host when the packet passes through these hops. If max-ttl is specified, the value of first-ttl must be smaller than the value of max-ttl. The value is an integer that ranges from 1 to 255. The default value is 1.
-m max-ttl Specifies the maximum TTL. Usually, the maximum TTL is set to the number of hops the packet passes through. You need to use this parameter to change the TTL. If first-ttl is specified, the value of max-ttl must be greater than the value of first-ttl. The value is an integer that ranges from 1 to 255. The default value is 30.
-name Displays the host name of each hop. -
-p port Specifies the UDP port number of the destination.
  • If no UDP port number is specified for the destination, when you run the tracert command, a port with the port number greater than 32768 is randomly chosen for the destination to receive tracert packets.
  • Before specifying the UDP port number for the destination, ensure that the port is not in use; otherwise, the tracert fails.
The value is an integer that ranges from 0 to 65535. The default value is 33434.
-q nqueries Specifies the number of probe packets to be sent each time. In the case of poor network quality, you can set this parameter to a comparatively large value to ensure that the probe packet can reach the destination. The value is an integer that ranges from 1 to 65535. The default value is 3.
-w timeout Specifies the timeout period to wait for a reply. If a tracert packet times out when reaching a gateway, an asterisk (*) is displayed.

In the case of poor network quality and a low network transmission rate, you are advised to prolong the timeout period.

The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 5000.
-s packetsize

Specifies the length of an ICMP Echo Request message, excluding the IP header and ICMP header.

The value is an integer that ranges from 12 to 9600, in bytes. The default value is 12.
host Indicates the domain name or IPv4 address of the destination host. The value is a string of 1 to 255 case-sensitive characters with spaces not supported. Alternatively, the value can be a valid IPv4 address in dotted decimal notation.

Views

All views

Default Level

0: Visit level

Usage Guidelines

Usage Scenario

During routine system maintenance, you can run the ping command to check network connectivity. If the ping fails, run the tracert command to locate the fault on the network.

You can specify different parameters in the tracert command for different scenarios:

  • To check information about nodes between the source and the destination, run the tracert host command.
  • On an unstable network, you can run the tracert -q nqueries -w timeout host command to check information about nodes between the source and the destination. If the network is unreliable, set the packet transmission count (-q) and timeout (-w) to the upper limits. This makes the test result accurate.
  • To check information about nodes along a segment of a path, run the tracert -f first-ttl -m max-ttl host command that has initial TTL and maximum TTL specified.

Prerequisite

  • The UDP module of each node is working properly; otherwise, the tracert operation fails.
  • The ICMP module of each node is working properly; otherwise, " * * * " is displayed.

Procedure

The execution process of the tracert command is as follows:
  1. The source sends a packet with the TTL being 1. After the TTL times out, the first hop sends an ICMP Error message to the source, indicating that the packet cannot be forwarded.
  2. The source sends a packet with the TTL being 2. After the TTL times out, the second hop sends an ICMP Error message to the source, indicating that the packet cannot be forwarded.
  3. The source sends a packet with the TTL being 3. After the TTL times out, the third hop sends an ICMP Error message to the source, indicating that the packet cannot be forwarded.
  4. The preceding process proceeds until the packet reaches the destination.

When receiving a packet, each destination hop cannot find the port specified in the packet, and returns an ICMP Port Unreachable message, indicating that the destination port is unreachable and the tracert ends. In this manner, the result of each probe is displayed on the source, according to which you can find the path from the source to the destination.

Configuration Impact

If a fault occurs when you run the tracert command, the following information may be displayed:
  • !H: The host is unreachable.
  • !N: The network is unreachable.
  • !: The port is unreachable.
  • !P: The protocol type is incorrect.
  • !F: The packet is incorrectly fragmented.
  • !S: The source route is incorrect.

Precautions

Once -r is specified, the outputs of both the tracert and ping commands show information about nodes between the source and the destination. Differences between the outputs of the tracert and ping commands are as follows:

  • If the ping command times out on a transit node, a timeout packet is returned and the command output displays no path information.
  • If the tracert command times out on a transit node, the command output displays " * * * " indicating that the tracert times out on the node but the tracert is not interrupted.

Example

# Tracert the gateways from the source host to the destination host with the IP address being 10.26.0.115.

<Huawei> tracert 10.26.0.115
traceroute to 10.26.0.115 (10.26.0.115), max hops: 30, packet length: 40, press CTRL_C to break
1 10.3.112.1		10 ms	10 ms	10 ms
2 10.32.216.1		19 ms	19 ms	19 ms
3 10.32.216.1		39 ms	19 ms	19 ms
4 10.32.136.23		19 ms	39 ms	39 ms
5 10.32.168.22		20 ms	39 ms	39 ms
6 10.32.197.4		59 ms	119 ms	39 ms
7 192.168.2.5		59 ms	59 ms	39 ms
8 172.16.70.13		80 ms	79 ms	99 ms
9 172.16.71.6		139 ms	139 ms	159 ms
10 172.16.1.7		199 ms	180 ms	300 ms
11 172.16.7.2		300 ms	239 ms	239 ms
12 * * *
13 10.11.4.72		59 ms	499 ms	279 ms
14 * * *
15 * * *
16 * * *
17 * * *
18 10.26.0.115   339 ms 279 ms 279 ms
Table 15-5  Description of the tracert command output

Item

Description

traceroute to

Tracert to a destination IP address.

max hops

Maximum TTL value.

packet length

Length of a sent packet.

1 10.3.112.1 10 ms 10 ms 10 ms

The integer 1 indicates the first hop gateway. Each hop increments the hop count. By default, the maximum hop count is 30.

"10.3.112.1" is the gateway address of the first hop. The IPv4 address following the serial number of each hop is the gateway address of the hop.

"10 ms 10 ms 10 ms" indicates the difference between the time when the three UDP packets are sent and when corresponding ICMP Time Exceeded or ICMP Port Unreachable messages are received. By default, each hop sends three UDP probe packets.

* * *

No ICMP Time Exceeded message or ICMP Port Unreachable message is returned within a specified period on the Nth hop. By default, an ICMP Time Exceeded message or ICMP Port-unreachable message should be returned within 5000 ms.

Related Topics
Translation
Download
Updated: 2019-07-18

Document ID: EDOC1100064353

Views: 128029

Downloads: 98

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next