Saltar al contenido

Command tracert. Syntax, parameters and examples

Command tracert.  Syntax, parameters and examples

The treacert command determines the path to a destination by sending ICMPv6 or echo request messages from the Internet Control Message Protocol (ICMP) to the destination with an incremental increment of the Lifetime (TTL) field values. The displayed route is the list of near / side router interfaces of routers on the path between a source host and a destination. The near / side interface is the interface of the router closest to the sending host on the route. Used without parameters, tracert displays help.

Syntax

tracert [-d] [-h ] [-j ] [-w ][-R] [-S srcaddr] [-4] [-6] target_name

Parameter

Description

d

Prevents tracert from trying to resolve the IP addresses of intermediate routers to their names. This can speed up the display of tracert results.

-h

Specifies the maximum number of hops on the route to find the destination (s). The default is 30 hops.

j

Specifies that Echo Request messages use the Loose Source Route option in the IP header with the intermediate destination set specified in . With the Loose Source route, successive intermediate destinations can be separated by one or more routers. The maximum number of addresses or names in the host list is 9. HostList is a series of IP addresses (in dotted decimal notation) separated by spaces. Use this parameter only when crawling IPv4 addresses.

-w

Specifies the amount of time in milliseconds expected to receive the ICMP Time Exceeded or Echo Reply message for a given echo request message. If it is not received within the expired time, an asterisk is displayed

. The default time is 4000 (4 seconds).

-R

Specifies that the IPv6 routing extension header is used to send an echo request message to the local host, using the destination as an intermediate destination and testing the reverse route.

-S srcaddr

Specifies the source address to use for echo request messages. Use this parameter only when crawling IPv6 addresses.

-4

Specifies that Tracert.exe can only use IPv4 for this tracking.

-6

Specifies that Tracert.exe can only use IPv6 for this tracking.

destination_name

Specifies the destination, identified by the IP address or hostname.

/?

Displays Help at the command prompt.

Remarks

Tracert is a diagnostic tool that determines the route to a destination by sending ICMP echo request messages with different lifetime values ​​(TTL) to the destination. Each router along the route must reduce the TTL on an IP packet by at least 1 before forwarding it. Effectively, TTL is a maximum link counter. When the packet TTL reaches 0, the router is expected to return an ICMP Time Exceeded Time message to the source computer.

Tracert determines the route by sending the first Echo Request message with a TTL of 1 and incrementing the TTL by 1 on each subsequent transmission until the target responds or the maximum number of hops is reached. The maximum number of hops is 30 by default and can be specified using the -h parameter. The path is determined by examining the ICMP expiration messages returned by the intermediate routers and the echo response message returned by the destination. However, some routers do not return expiration messages for packets with expired TTL values ​​and are invisible for the tracert command. In this case, a row of asterisks is displayed

for that jump.

To track a route and provide network latency and packet loss for each router and connection in the route, use the route command.

This command is only available if the Internet Protocol (TCP / IP) is installed as a component in the properties of a network adapter under Network Connections.

Examples

To follow the route to the named host

, being

hostname to follow,

C: > tracert

To follow the route to the named host

and prevent the resolution of each IP address in your name, being

hostname to follow,

C: > tracert / d

To track the route to the named host

and use the free source path 10.12.0.1/10.29.3.1/10.1.44.1, being

hostname to follow,

C: > tracert / j 10.12.0.1 10.29.3.1 10.1.44.1

Tracert command