LOGBOOK

HELP

1 / 15
Other keys: showSpace: good1-4: rate0: skip5: flag

Question

What is ICMP and what are its main purposes?

Answer

ICMP is a network-layer protocol that reports feedback about problems processing IP packets — its common messages (in both ICMPv4 and ICMPv6) are host reachability, destination/service unreachable, and time exceeded.

ICMP (Internet Control Message Protocol):

A network layer protocol that provides feedback about issues related to IP packet processing.

Two Versions:

Version Used With Notes
ICMPv4 IPv4 Basic messaging protocol
ICMPv6 IPv6 Extended functionality for IPv6

Common ICMP Messages (both versions):

  • Host reachability - Test if a host is available
  • Destination or Service Unreachable - Report delivery failures
  • Time exceeded - TTL/Hop Limit reached zero

Security Note: ICMPv4 messages are not required and are often not allowed within a network for security reasons. Firewalls frequently block ICMP to prevent network reconnaissance.

Go deeper:

An example of how an ICMPv4 redirect message works
An example of how an ICMPv4 redirect message works
Michel Bakni · CC BY-SA 4.0 · Wikimedia Commons
or press any other key

Question

How does ICMP test host reachability?

Answer

The source sends an ICMP Echo Request; if the destination is available it returns an ICMP Echo Reply. No reply suggests the host is unreachable. This is the mechanism behind ping.

ICMP Echo Messages for Host Reachability:

ICMP Echo messages test whether a host is reachable on an IP network.

ICMP echo request from source to destination answered by an echo reply

* The source sends an Echo Request; a reachable host answers with an Echo Reply, which is exactly what ping does. *

Process:

Source Host                    Destination Host
     │                              │
     │──── ICMP Echo Request ─────→│
     │                              │
     │←──── ICMP Echo Reply ───────│
     │                              │

Steps:

  1. Local host sends an ICMP Echo Request to a destination
  2. If the destination is available, it responds with an ICMP Echo Reply
  3. If no reply is received, the destination may be unreachable

ICMP Message Types:

Type Message
8 Echo Request (IPv4)
0 Echo Reply (IPv4)
128 Echo Request (IPv6)
129 Echo Reply (IPv6)

Key insight: This is the mechanism behind the ping command.

Go deeper:

or press any other key