ICMP is used for error handling and diagnostics in IP networks by sending control and error messages.

Facts (CCNA)

Important types

ICMP type Function Typical use
Echo Request (8) Test reachability ping
Echo Reply (0) Answer to echo request ping
Destination Unreachable (3) Cannot deliver the packet routing / ACL / MTU
Time Exceeded (11) TTL expired traceroute

Echo request / reply

  1. Sender sends echo request (type 8)
  2. Receiver answers echo reply (type 0)
  3. RTT is measured

Confirms reachability, tests latency and packet loss. Caveats: ICMP may be blocked by ACL/firewall; a reply means reachability only – not that applications work.

Destination Unreachable (type 3)

Code Meaning
0 Network unreachable
1 Host unreachable
3 Port unreachable
4 Fragmentation needed (PMTUD)

A router or host detects a delivery problem and sends type 3 back – helps identify wrong routing, blocking ACLs, and MTU problems (Path MTU Discovery).

Time Exceeded (type 11)

  1. Every router decrements TTL by 1
  2. TTL = 0 → packet dropped
  3. Router sends ICMP Time Exceeded back

traceroute sends packets with TTL 1, 2, 3…; each router answers with type 11 → the whole path is mapped. Identifies routing loops and gives insight into path selection.

Special considerations

CCNA troubleshooting

ping 8.8.8.8
traceroute 8.8.8.8
show ip route
show access-lists
Error message First thing to check
Network unreachable Routing table
Host unreachable ARP + host status
Port unreachable Application / UDP
TTL expired Routing loop / path
Fragmentation needed MTU / DF bit
Redirect Gateway design

Exam tip 💡: see ICMP type 3 code 0/1/3/4 → ask yourself: routing? host? port? MTU?

Short version: Echo = reachability · Destination Unreachable = why delivery fails · Time Exceeded = how the packet moves through the network.