Summary
Highlights
ICMP (Internet Control Messaging Protocol) provides feedback on issues related to IP packet processing. In the early days of TCP/IP, there was no mechanism to determine if packets were lost or if links were down; ICMP was introduced to manage these network communications. However, ICMPv4 is often restricted in networks for security reasons, as it can be exploited (e.g., 'ping of death').
There are three common ICMP messages in both IPv4 and IPv6: host reachability, destination or service unreachable, and time exceeded. Host reachability uses 'ping' with echo requests and replies to confirm connectivity. Destination or service unreachable indicates that the target cannot be reached. Time exceeded messages are generated when a packet's Time To Live (TTL) in IPv4 or Hop Limit in IPv6 reaches zero before reaching its destination, often resulting in a 'request timeout' when pinging.
ICMPv6 messages include the Neighbor Discovery Protocol (NDP). NDP facilitates communication between routers and hosts, using Router Solicitation (host requests network prefix) and Router Advertisement (router advertises network prefix). Between hosts, NDP uses Neighbor Solicitation (host seeks MAC address or checks for duplicate IP host IDs) and Neighbor Advertisement (device responds with MAC address or indicates duplicate IP).
The 'ping' command (Packet Internet Groper) uses echo requests and replies to check for connectivity. A common troubleshooting sequence involves pinging: first, the loopback address (127.0.0.1 for IPv4 or ::1 for IPv6) to test the local TCP/IP stack; second, the default gateway; and third, the remote host. A 'request timeout' during ping often indicates a TTL of zero.
If a ping fails, 'traceroute' (or 'tracert' in Windows) is used to identify the point of failure. It provides a list of successfully reached hops along the path to the destination. This command is crucial for pinpointing exactly where a network communication is breaking down, as displayed by the hops taken and any subsequent stars indicating a failure point.