Search⌘ K
AI Features

Exercise: Sending ICMP Messages With Ping & Traceroute

Explore how to send ICMP echo requests using ping to measure round-trip times and validate network reachability. Understand traceroute's use of TTL and ICMP messages to map the route packets take across multiple hops, helping you analyze network paths and identify troubleshooting points.

Ping

When a client sends ICMP echo messages (ping), it sets a certain value in the TTL field and starts a timer. An echo server software running on the destination returns an ICMP echo reply message. Since the TTL value is decremented at each hop, the ping client can know the number of hops traversed by the packets. Also, when it receives the echo reply, it stops the timer and calculates the round trip time. There is a maximum value for the round trip time and when it’s exceeded, the echo message is declared lost. ping is also often used by network operators to verify that a given IP address is reachable.

Sample usage of ping is shown below.

Terminal 1
Terminal
Loading...

Traceroute

Another very useful debugging tool is traceroute. The ...