System command

tracert command

Trace the network route toward a destination host.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

tracert [/d] [/h <maximumhops>] [/j <hostlist>] [/w <timeout>] [/R] [/S <srcaddr>] [/4][/6] <targetname>

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example usage for tracert.

tracert -d example.com

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

tracert www.microsoft.com

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

tracert /d www.microsoft.com

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

tracert /j 10.12.0.1 10.29.3.1 10.1.44.1 www.microsoft.com

Parameters, options and clauses

Option / clauseDescription
/dSkip reverse name resolution for intermediate routers.
/h <maximumhops>Set the maximum hop count; the default is 30.
/j <hostlist>Use IPv4 loose source routing through up to nine intermediate addresses.
/w <timeout>Set the wait time in milliseconds for each reply; the default is 4000.
/RUse the IPv6 routing extension header to test the reverse route.
/S <srcaddr>Use the specified source address for an IPv6 trace.
/4 / /6Force IPv4 or IPv6 for a name-based destination.
<targetname>Specify the destination host name or IP address.
/?Display command help or the supported command-line usage.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory