
About Lesson
Ping and Traceroute Tests
Use ping and traceroute utilities to test network connectivity.
Ping – Test Connectivity
- The ping command is an IPv4 and IPv6 testing utility that uses ICMP echo request and echo reply messages to test connectivity between hosts and provides a summary that includes the success rate and average round-trip time to the destination.
- If a reply is not received within the timeout, ping provides a message indicating that a response was not received. It is common for the first ping to timeout if address resolution (ARP or ND) needs to be performed before sending the ICMP Echo Request.
Ping the Loopback
Ping can be used to test the internal configuration of IPv4 or IPv6 on the local host. To do this, ping the local loopback address of 127.0.0.1 for IPv4 (::1 for IPv6).
- A response from 127.0.0.1 for IPv4, or ::1 for IPv6, indicates that IP is properly installed on the host.
- An error message indicates that TCP/IP is not operational on the host.
Ping the Default Gateway
The ping command can be used to test the ability of a host to communicate on the local network. The default gateway address is most often used because the router is normally always operational.
- A successful ping to the default gateway indicates that the host and the router interface serving as the default gateway are both operational on the local network.
- If the default gateway address does not respond, a ping can be sent to the IP address of another host on the local network that is known to be operational.
Ping a Remote Host
- Ping can also be used to test the ability of a local host to communicate across an internetwork.
- A local host can ping a host on a remote network.
- A successful ping across the internetwork confirms communication on the local network.
Note: Many network administrators limit or prohibit the entry of ICMP messages therefore, the lack of a ping response could be due to security restrictions.
Traceroute – Test the Path
- Traceroute (tracert) is a utility that is used to test the path between two hosts and provide a list of hops that were successfully reached along that path.
- Traceroute provides round-trip time for each hop along the path and indicates if a hop fails to respond.
- An asterisk (*) is used to indicate a lost or unreplied packet.
- This information can be used to locate a problematic router in the path or may indicate that the router is configured not to reply.
Note: Traceroute makes use of a function of the TTL field in IPv4 and the Hop Limit field in IPv6 in the Layer 3 headers, along with the ICMP Time Exceeded message.
- The first message sent from traceroute will have a TTL field value of 1.
- This causes the TTL to time out at the first router.
- This router then responds with a ICMPv4 Time Exceeded message.
- Traceroute then progressively increments the TTL field (2, 3, 4…) for each sequence of messages.
- This provides the trace with the address of each hop as the packets time out further down the path.
- The TTL field continues to be increased until the destination is reached, or it is incremented to a predefined maximum.
Other related topics
Topic Title | Topic Objective |
---|---|
ICMP Messages | Explain how ICMP is used to test network connectivity. |
Ping and Traceroute Testing | Use ping and traceroute utilities to test network connectivity. |
Other useful information
Join the conversation