beginner

ARP, ICMP and a Troubleshooting Method

How a host finds the MAC address that goes with an IP address, what ping and traceroute really do, and a layered method for finding out why a connection does not work.

30 min

The missing step: IP to MAC

A host knows the destination’s IP address (its own subnet, or the default gateway’s). But the frame on the wire needs the destination’s MAC address. The glue is ARP, the Address Resolution Protocol (RFC 826).

  1. Host A wants to send to 192.168.1.1 and does not know its MAC address.
  2. A broadcasts an ARP request to FF:FF:FF:FF:FF:FF: “Who has 192.168.1.1? Tell 192.168.1.20.”
  3. Every device on the network receives it, but only the owner of 192.168.1.1 answers, with a unicast ARP reply: “192.168.1.1 is at 3C:22:FB:9A:10:4E.”
  4. A stores the answer in its ARP cache for a short time (minutes) and sends the frame.

View the cache:

arp -a          # Windows, Linux (older), macOS
ip neigh        # Linux

IPv6 does not use ARP. It has an equivalent, Neighbor Discovery, covered in the IPv6 lessons later in this course.

ICMP: the network’s messaging protocol

ICMP (Internet Control Message Protocol) carries diagnostic and error messages between devices. It sits alongside IP at layer 3 (it has its own IP protocol number) and has no ports. The messages you will meet most:

Message Meaning
Echo request / echo reply The basis of ping
Destination unreachable A router or host reports it cannot deliver (no route, port closed, and so on)
Time exceeded TTL reached zero; used by traceroute
Fragmentation needed A packet is larger than a link’s MTU and was marked “do not fragment” (used for path MTU discovery)

Ping

ping sends an echo request and waits for an echo reply, reporting the round-trip time. It answers “can I reach this address, and how long does it take?”.

ping 192.168.1.1
ping -c 4 8.8.8.8     # Linux/macOS: four packets (Windows uses -n 4)

Read the output: replies mean the path works in both directions; timeouts mean no reply arrived (the destination, a router, or a firewall may be dropping packets); “destination host unreachable” from a router means it has no route or could not resolve the next hop.

Traceroute

traceroute (Windows: tracert) lists the routers between you and a destination. It sends probes with TTL 1, then 2, then 3, and so on. Each router that drops an expired probe reveals itself with an ICMP time-exceeded message.

traceroute 8.8.8.8
tracert 8.8.8.8

Lines of * * * mean no reply for that hop. That is often just a router that does not answer probes, and not necessarily a fault, especially if later hops respond. Look for where the path stops and for a sudden jump in latency that persists on later hops.

A layered troubleshooting method

Random changes waste time and create new problems. Use the layers from the first lesson to work in a fixed order, bottom up, and change one thing at a time.

  1. Define the problem precisely. Who is affected, since when, what changed? “Internet is down” could mean one app, one device, or the whole building.
  2. Physical and link: link light on? Right Wi-Fi network? Connected to the expected switch port?
  3. Local addressing: does the device have an address, mask and gateway that make sense? (ipconfig or ip addr.) An address of 169.254.x.x means DHCP failed.
  4. Reach the gateway: ping the default gateway. Failure points to a local problem (cable, Wi-Fi, VLAN, wrong subnet).
  5. Reach beyond: ping a public IP address such as 8.8.8.8. Failure with a working gateway ping points to the router, its upstream link, or the ISP.
  6. Name resolution: ping or look up a domain name. If the IP address works but the name does not, the problem is DNS.
  7. The service itself: is the port reachable and the service running, and is a firewall in the way?

At each step you split the problem space in half: what works, and what does not. After you fix something, verify by repeating the failed test, and write down the cause and the fix.

A user cannot open any website. ipconfig shows 192.168.1.44/24, gateway 192.168.1.1. Ping to 192.168.1.1 works, ping to 8.8.8.8 works, ping to google.com fails with 'could not find host'. What is wrong, and where do you look?

Layers 1 to 3 are fine because the gateway and a public IP address both answer. The failure is name resolution (DNS). Check which DNS servers the laptop is configured to use (ipconfig /all), test with a different DNS server, and check whether the router’s DNS forwarder or the ISP’s DNS service is working.

Can You Explain It?

Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.

  • Describe the sequence of messages when a host needs to send to an IP address in its own subnet for the first time.
  • Explain how traceroute uses TTL to map a path.
  • A colleague says a server is down because it does not answer ping. What would you check before agreeing?

🧪 Want to practise this on your own computer? See how to set up your lab →

🤖

Need clarification? Ask GT

Hi, I'm GT — your AI tutor for ARP, ICMP and a Troubleshooting Method. What would you like to know?
📝

Knowledge Check

1 of 4

What does ARP do?

Report a problem

About: /lessons/arp-icmp-and-the-troubleshooting-method