🟢 Phase 4 · IP Addressing 🟢 Beginner MODULE 13

Module 13 — ICMP

⏱️ 20 min
📖 6 sections
🧩 10 Questions
🏗️ Beginner
CCNA Module 13 progress76%
🎯 What you'll learn: How ICMP provides diagnostic and error-reporting services at Layer 3, ICMPv4 message types and codes, ICMPv6 and Neighbor Discovery Protocol (NDP), using ping and traceroute to test connectivity, and a practical troubleshooting methodology using ICMP tools.

What is ICMP?

The Internet Control Message Protocol (ICMP) is a Layer 3 protocol used by IP devices to send error messages and operational information. Unlike TCP or UDP, ICMP is not used to carry application data — it exists purely for diagnostics, error reporting, and network management.

IP by itself is an unreliable, best-effort delivery protocol. It has no built-in mechanism to inform a sender when a packet cannot be delivered. ICMP fills this gap. When a router cannot forward a packet, or when a TTL expires, ICMP generates a message back to the source, identifying the problem.

There are two versions: ICMPv4 for IPv4 networks and ICMPv6 for IPv6 networks. ICMPv6 includes all the error and echo functions of ICMPv4 plus additional features through Neighbor Discovery Protocol (NDP), which replaces ARP in IPv6.

An ICMP message consists of: a Type field (identifies the category of message), a Code field (sub-category within the type), a Checksum for error detection, and Data that varies by message type.

L3
Layer 3 Protocol
⚠️
Error Reporting
0
No Data Transfer
🔍
Diagnostic Tool

ICMPv4 Message Types

ICMPv4 defines many message types, but the CCNA exam focuses on three key categories: Echo Request/Reply (used by ping), Destination Unreachable, and Time Exceeded (used by traceroute).

Host Reachability — Echo Request and Echo Reply: When you run ping, your device sends an ICMP Type 8 (Echo Request) to the target. If the target is reachable and responding, it sends back an ICMP Type 0 (Echo Reply). This round-trip confirms the remote host is alive and the path is functioning.

Destination Unreachable (Type 3): Generated by a router or host when a packet cannot be delivered. Different codes identify exactly what went wrong: Code 0 = Network Unreachable (no route to the destination network), Code 1 = Host Unreachable (network is reached but host not responding), Code 2 = Protocol Unreachable (the specified upper-layer protocol is not active on the destination), Code 3 = Port Unreachable (the destination port has no application listening).

Time Exceeded (Type 11): Every IP packet has a Time-to-Live (TTL) field. Each router that forwards the packet decrements the TTL by 1. When TTL reaches 0, the router discards the packet and sends an ICMP Type 11 Time Exceeded message back to the source. This behavior is the mechanism that makes traceroute work.

Redirect (Type 5): When a router receives a packet that it forwards out the same interface it arrived on, it knows the sender has a suboptimal route. The router forwards the packet but also sends an ICMP Redirect to the sending host, telling it to use a better next-hop for future packets to that destination.

Type 0
Echo Reply
Response to a ping — confirms the host is alive and reachable
Type 3
Destination Unreachable
Packet cannot be delivered — code field specifies why (network/host/protocol/port)
Type 5
Redirect
Router tells host to use a better route for future packets to this destination
Type 8
Echo Request
Ping request — asks the destination host to reply with an Echo Reply
Type 11
Time Exceeded
TTL reached 0 in transit — used by traceroute to discover each hop
Type 3 Codes
Unreachable Codes
0=Network, 1=Host, 2=Protocol, 3=Port — each identifies the specific failure point
💡
ICMP is Encapsulated in IP
ICMP messages are encapsulated in IP packets. Routers can generate ICMP messages when they cannot forward a packet. This means ICMP uses the IP layer for transport, even though it is itself a Layer 3 protocol — it sits alongside IP rather than above it in the protocol stack.

ICMPv6 Messages

ICMPv6 is defined in RFC 4443 and provides all the error and informational messaging of ICMPv4, but also incorporates the Neighbor Discovery Protocol (NDP) — a critical set of functions that replace ARP and add additional IPv6-specific capabilities.

NDP uses four key ICMPv6 message types. Together, these messages handle router discovery, prefix advertisement for stateless address autoconfiguration (SLAAC), and neighbor (MAC) address resolution — all functions that required separate protocols in IPv4.

Type 133 — RS
Router Solicitation
Sent by a host when it comes online — asks routers on the link to advertise their prefix information immediately rather than waiting for the next scheduled RA
Type 134 — RA
Router Advertisement
Sent periodically by routers (or in response to RS) — announces the network prefix, default gateway, and other configuration for SLAAC
Type 135 — NS
Neighbor Solicitation
Resolves an IPv6 address to a MAC address — equivalent to ARP Request in IPv4. Also used for Duplicate Address Detection (DAD)
Type 136 — NA
Neighbor Advertisement
Reply to a Neighbor Solicitation — provides the MAC address of the responding device, equivalent to ARP Reply in IPv4

The NDP process for address resolution works as follows: When Host A needs to reach Host B by IPv6 address, it sends a multicast Neighbor Solicitation (NS) to the solicited-node multicast address derived from Host B's IPv6 address. Host B responds with a unicast Neighbor Advertisement (NA) containing its MAC address. Host A can then send frames directly to Host B.

For default gateway discovery, a host sends an RS when it comes online. Routers on the link reply with RAs containing the network prefix and the router's link-local address (used as the default gateway). This enables full SLAAC configuration without any manual input or DHCP.

NDP Replaces ARP in IPv6
In IPv4, ARP resolves IP addresses to MAC addresses using broadcasts. ICMPv6 NDP replaces ARP entirely using multicast — more efficient because only the target device processes the NS message, rather than every host on the subnet receiving and processing a broadcast. This is a significant improvement in large networks.

Using Ping

Ping (Packet Internet Groper) is the most fundamental network diagnostic tool. It uses ICMP Echo Requests (Type 8) and Echo Replies (Type 0) to test whether a destination is reachable and to measure round-trip latency.

On Cisco IOS, the ping output uses single characters to represent each packet result: ! = Echo Reply received (success), . = Timeout — no reply received, U = ICMP Destination Unreachable received, N = Network Unreachable, P = Protocol Unreachable, Q = Source Quench, M = Could not fragment.

Cisco IOS — Ping Example
Cisco IOS
Router# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

A structured ping troubleshooting methodology helps isolate where a connectivity problem exists:

Step 1 — Ping loopback (127.0.0.1): Tests whether the local IP stack is functioning. If this fails, the device's TCP/IP configuration is broken — no network testing is possible until this is fixed.

Step 2 — Ping the default gateway: Tests whether the local host can reach its router on the same network. If this fails, the problem is local: wrong IP address, wrong subnet mask, cable issue, or switch problem.

Step 3 — Ping the remote host: Tests end-to-end connectivity across networks. If this fails but the gateway ping worked, the problem is somewhere in the routing path or on the remote end.

Extended ping (available in privileged EXEC mode) allows you to specify the source IP address, packet count, packet size, and timeout — useful for testing specific paths or simulating traffic from a particular interface.

Ping in Order: Loopback → Gateway → Remote
Always ping in order: loopback → default gateway → remote host. This helps isolate exactly where connectivity fails. If the gateway ping works but remote fails, the problem is beyond your local network. If the gateway ping fails, stop there — it is a local issue. This systematic approach saves time and confusion during troubleshooting.

Using Traceroute

Traceroute (or tracert on Windows) traces the exact path that packets take from source to destination. It reveals every router (hop) along the path along with the round-trip time to each one — invaluable for identifying exactly where a network problem is occurring.

Traceroute works by exploiting the IP TTL field. It sends a series of packets with progressively increasing TTL values. The first packet has TTL=1 — the first router decrements it to 0 and sends back an ICMP Time Exceeded (Type 11) message, revealing that router's IP address. The second packet has TTL=2, reaching the second router before timing out, and so on. This process continues until the destination is reached (which sends an ICMP Port Unreachable or Echo Reply) or the maximum hop count is reached.

Each hop typically shows three round-trip time measurements, which reveals not just the path but the consistency of latency to each hop.

Cisco IOS — Traceroute Example
Cisco IOS
Router# traceroute 8.8.8.8
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 192.168.1.1   4 msec  2 msec  3 msec
  2 10.0.0.1     12 msec 11 msec 13 msec
  3 172.16.0.1   18 msec 19 msec 17 msec
  4 8.8.8.8      25 msec 24 msec 26 msec

A * (asterisk) in traceroute output means no ICMP Time Exceeded response was received for that hop within the timeout. This is commonly caused by firewalls that block ICMP, routers configured not to send ICMP Time Exceeded messages, or rate-limiting on ICMP responses. Importantly, an asterisk does NOT necessarily mean the path is broken — traffic may still be forwarded through that hop normally.

⚠️
Firewalls Can Hide Hops
Some firewalls block ICMP, causing ping/traceroute to show failures even when the path works. A hop showing * * * may simply be a router that drops ICMP TTL-exceeded responses for security reasons. Don't always assume a failure means the device is down — if traceroute shows hops after the asterisk, the path is working.

Troubleshooting with ICMP

ICMP tools form the first line of network troubleshooting. A structured methodology prevents you from chasing problems in the wrong place. Start at the local host, work outward to the gateway, and then trace the full path to the remote destination.

If ping succeeds but the application fails, the connectivity problem is not at Layer 3 — it is at Layer 4 (wrong TCP port, firewall rule blocking specific ports) or Layer 7 (application misconfiguration, DNS failure, server-side issue). ICMP confirms Layer 3 is working; further diagnosis must happen at higher layers.

ICMP Troubleshooting Decision Flow
Start: Cannot reach destination
Ping 127.0.0.1 (loopback)?
Fail
Fix local IP stack
(TCP/IP config)
Pass
Ping default gateway?
Fail
Local issue: IP/mask,
cable, switch
Pass
Ping remote host?
Fail
Run traceroute:
find failing hop
Pass
TCP port works?
Fail
Check firewall
ACL / port rules
Pass
Application
config issue
🔬
Challenge Lab — ICMP Troubleshooting
Identify the connectivity problem using ICMP methodology
Scenario: PC1 (192.168.1.10/24) cannot reach Server1 at 10.0.0.50. The default gateway for PC1 is 192.168.1.1. You run the following tests:

   • ping 127.0.0.1 from PC1 → !!!!! (success)
   • ping 192.168.1.1 from PC1 → !!!!! (success)
   • ping 10.0.0.1 from PC1 → ..... (timeout)
   • ping 10.0.0.50 from PC1 → ..... (timeout)

Question: What can you conclude from these results? Where is the most likely fault?

Expected Answer: The local host and local network (to gateway) are functioning correctly. The problem begins at 10.0.0.1 — the router cannot reach the 10.0.0.0/24 network. This points to a routing problem: either the router does not have a route to 10.0.0.0/24, the next-hop router is down, or there is a WAN link failure between 192.168.1.1 and the 10.0.0.0 network. Run traceroute from the 192.168.1.1 router toward 10.0.0.1 to narrow further.
💡 Show hints
  • The loopback ping confirms PC1's IP stack is working correctly
  • The gateway ping confirms Layer 2 (local switch/cable) is working
  • Failure at 10.0.0.1 means the problem is beyond the local router
  • Check routing table on 192.168.1.1 with show ip route
  • Look for a route to 10.0.0.0/24 — if missing, add a static route or fix the routing protocol
🧩 Knowledge Check
10 questions — Module 13: ICMP
1. What ICMP type is used by the ping Echo Request?
2. What does ICMP Type 11 indicate?
3. Which tool uses increasing TTL values to discover network hops?
4. What ICMPv6 message type is equivalent to ARP for MAC address resolution?
5. On Cisco IOS, what does !!!!! output from ping mean?
6. What ICMP code indicates the destination network is unreachable?
7. Which ICMPv6 message does a router send to advertise its prefix for SLAAC?
8. What should you ping first when troubleshooting connectivity?
9. A ping shows U.U.U output on Cisco IOS. What does U indicate?
10. What layer does ICMP operate at?
Finished this module?
Mark it complete to track your CCNA progress.
🎉
Module 13 Complete!
You now understand ICMP error reporting, ping, traceroute, ICMPv6, and NDP. You have the diagnostic tools to systematically troubleshoot any connectivity problem. Next — Transport Layer!
← Course Home
Phase 4 · CCNAModule 13 of 17
🗒 Cheat Sheet 📝 Worksheet