traceroute

traceroute (or tracert, as it is known under Windows) is a network diagnostic tool for IP networks. Its purpose is twofold: to display the path of packets, as well as the transit delays along each step (known as a hop). The RTT of each hop is recorded, and the sum of the mean times in each hop is a measure of the total time to establish the connection. By default, traceroute outputs the results of each hop, as well as the final results. traceroute sends three packets, and it proceeds unless all three are lost more than twice. In this case, the connection is considered lost and the route/path cannot be evaluated.

traceroute is available at the Windows command prompt (as tracert), but it is not part of most default Linux installations. Instead, it is available from the repositories, both as a standalone package (traceroute) and as part of the inetutils utilities (inetutils-traceroute). The output of traceroute is relatively simple. The first column displays the hop count. The final column displays the IP address and hostname (if available) of the host/router. The middle three columns display the RTT of each of the three packets sent.

The only required parameter is the hostname or IP address of the destination host. There are, however, many other options available, as shown in the following table:

Option

Description

-e

Firewall evasion mode; uses fixed destination ports for UDP, UDP-lite, TCP, and SCTP probes

-ffirst_ttl

Set the TTL for the first outgoing packet

-F

Set the DF bit

-d

Enable socket-level debugging

-I

Use ICMP ECHO instead of UDP datagrams

-M first_ttl

Set the TTL value used in outgoing probe packets

-P proto

Set the protocol (proto) used in outgoing probe packets; the currently supported values are UDP, UDP-Lite, TCP, SCTP, GRE, and ICMP

-ssrc_addr

Use src_addr as the IP address in outgoing probe packets to force the source address to something other than the IP address of the interface the probe packet is sent on (only works if the IP address is the address of one of the interfaces on the host)

-S

Print a summary of how many probes were not answered at each hop

-v

Verbose output (all received ICMP packets shown)

-w

Set the time to wait for a response to a probe (default is 5 seconds)

 

I omitted the Windows Equivalent column on this table, since few of the options available for traceroute under Linux exist for the Windows version. If you need to use another protocol, you can use the –P option; there is also a utility called tcptraceroute (available for Linux), which sends TCP probe packets.

You can also invoke traceroute from the web GUI. To do so, navigate to Diagnostics | Traceroute. Type in the hostname or IP address in the Hostname edit box. You can select the protocol (IPv4 or IPv6) in the IP Protocol drop-down box. You can select the source address for the trace in the Source Address drop-down box. In the Maximum number of hops drop-down box, you can set the maximum number of network hops to trace (the maximum number is 20; the default is 18). You can enable DNS lookup by checking the Reverse Address Lookup checkbox. Finally, you can change the protocol used by traceroute from UDP to ICMP by checking the Use ICMP checkbox. When you are done configuring settings, click on the Traceroute button.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset