Member-only story
Traceroute (Why, How, Alternatives)
Why use the traceroute?
When Server/Network administrator troubleshoots, use the traceroute command to find information about the network hops.
- Trace the route
- Trace the hops from starting point to the destination
- Troubleshoot by catching the breaking hop where the packet has been dropped
How does traceroute work?
The traceroute works by sending a series of packets with incrementally increasing Time-To-Live (TTL) values and monitoring the ICMP error messages returned by each router along the path.
- The source host sends an ICMP packet with a TTL value of 1 to the destination host.
- The first router in the path decrements the TTL value of the packet by 1 and forwards it to the next router. If the TTL value reaches 0, the router discards the packet and sends an ICMP “Time Exceeded” message back to the source host.
- The source host receives the “Time Exceeded” message and records the IP address of the router that sent it.
- The source host sends another ICMP packet with a TTL value of 2 to the destination host.
- The second router in the path decrements the TTL value of the packet by 1 and forwards it to the next router. If the TTL value reaches 0, the router discards the packet and sends an ICMP “Time Exceeded” message back to the source host.