Tracert (Compact 2013)

3/26/2014

The tracert (trace route) command-line tool determines the path to a destination by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination. The tracert command-line tool displays the near-side interfaces of the routers (hops) in the path between the source host and the destination. The near-side interface is the interface of the router that is closest to the sending host in the path. By default, tracert sends both ICMP and ICMPv6 echo request messages. Used without options, tracert displays help.

Syntax

tracert [-p] [-d] [-h maxhops] [-j hostlist] [-w timeout] [-R] [-S srcaddr] [-4 | -6] destination

Options

The following table describes each tracert option. These options are not case-sensitive.

Option

Option

Description

-p

Prints output to the debug output port. If your device is connected to Platform Builder, tracert prints to the Output window in Visual Studio.

-d

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

-h

maxhops

Specifies the maximum number of hops in the path to search for the destination. The default is 30 hops.

-j

hostlist

(IPv4 only) Specifies that echo request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in hostlist. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The hostlist is a series of IP addresses (in dotted decimal notation) separated by spaces.

-w

timeout

Specifies the amount of time in milliseconds to wait for the ICMP (or ICMPv6) time exceeded or echo reply message corresponding to a given echo request message to be received. If the message is not received within the time-out, tracert displays an asterisk (*). The default time-out is 4000 (4 seconds).

-R

Displays a trace of the round-trip path (IPv6 only).

-S

srcaddr

(IPv6 only) Specifies the source address to use. If you have multiple IP addresses, you can use this option to specify which source address you want to use for the trace.

-4

Specifies that IPv4 is used to search for the destination. This option is not necessary when you are identifying the destination with an IPv4 address; it is only necessary when you identify the target host by name.

-6

Specifies that IPv6 is used to search for the destination. This option is not required when you are identifying the destination with an IPv6 address; it is only necessary when you identify the target host by name.

destination

Specifies the destination, identified either by IP address or host name.

Remarks

By default, tracert queries both IPv4 and IPv6 addresses when you specify a host name for destination. You can override this behavior by using the -4 or -6 option.

The tracert command-line tool determines the path to the destination by examining the ICMP Time Exceeded messages returned by intermediate routers and the Echo Reply message returned by the destination. However, some routers do not return Time Exceeded messages for packets with expired Time to Live (TTL) values and are invisible to tracert. In this case, tracert displays a row of asterisks (*) for that hop.

Example

The following example shows typical output produced by the tracert command-line tool.

\> tracert 65.55.58.201

Tracing route to 00001001.ch [65.55.58.201]
over a maximum of 30 hops:

  1     1 ms    <1 ms    <1 ms  10.125.148.1
  2     2 ms     1 ms     1 ms  10.37.44.98
  3     2 ms     1 ms     1 ms  10.37.19.149
  4     2 ms     1 ms     1 ms  131.107.201.150
  5     2 ms     2 ms     2 ms  tk5c6n02-te3-1.network.microsoft.com [131.107.201.250]
  6     2 ms     2 ms     2 ms  207.46.36.225
  7     2 ms     2 ms     2 ms  207.46.46.27
  8     3 ms     2 ms     2 ms  207.46.47.64
  9    28 ms    25 ms    25 ms  207.46.40.197
 10     *        8 ms     7 ms  207.46.33.178
 11     *        *        *     Request timed out.
 12     *        *        *     Request timed out.

See Also

Reference

Network Command-Line Tools Reference

Concepts

Network Command-Line Tools Catalog Items and Sysgen Variables