Name

traceroute — stdin  stdout  - file  -- opt  --help  --version

Synopsis

traceroute [options] host [packet_length]

The traceroute command prints the network path from your local host to a remote host, and the time it takes for packets to traverse the path.

$ traceroute yahoo.com
 1 server.example.com (192.168.0.20) 1.397 ms ...
 2  10.221.16.1 (10.221.16.1) 15.397 ms ...
 3  gbr2-p10.cb1ma.ip.att.net (12.123.40.190) 4.952 ms ...
...
...
16  p6.www.dcn.yahoo.com (216.109.118.69)  * ...

Each host in the path is sent three “probes” and the return times are reported. If five seconds pass with no response, traceroute prints an asterisk. Also, traceroute may be blocked by firewalls or unable to proceed for various reasons, in which case it prints a symbol:

Symbol

Meaning

!F

Fragmentation needed.

!H

Host unreachable.

!N

Network unreachable.

!P

Protocol unreachable.

!S

Source route failed.

!X

Communication administratively prohibited.

!N

ICMP unreachable code N.

The default packet size is 40 bytes, but you can change this with the final, optional packet_length parameter (e.g., traceroute myhost 120).

Useful options

-n

Numeric mode: print IP addresses instead of hostnames.

-w N

Change the timeout from five seconds to N seconds.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.