Demystifying Local Communication: ARP in IPv4 vs. NDP in IPv6

Demystifying Local Communication: ARP in IPv4 vs. NDP in IPv6

In the world of computer networking, devices must resolve logical addresses to physical ones before they can communicate on a local segment. While we often think in terms of IP addresses (Layer 3), actual data transmission on Ethernet networks depends on MAC addresses (Layer 2). That’s where Address Resolution Protocol (ARP) in IPv4 and its more advanced IPv6 counterpart, Neighbor Discovery Protocol (NDP), come into play.

These two protocols silently handle address resolution under the hood, enabling seamless communication within local networks. Let’s explore how they work—and observe their behavior in action using tcpdump.

ARP in IPv4: Translating IP to MAC

ARP is the mechanism that IPv4 uses to map an IP address to a MAC address on the local network.

ARP Workflow:

  1. Check ARP Cache
    The source device first consults its ARP cache to see if it already knows the MAC address for the target IP.
  2. Send ARP Request
    If not cached, it broadcasts an ARP Request asking: "Who has IP X.X.X.X? Tell me."
  3. Process Request
    All devices receive the request, but only the one with the matching IP responds.
  4. Receive ARP Reply
    The target device sends a unicast ARP Reply containing its MAC address.
  5. Update ARP Cache
    The source stores the IP-to-MAC mapping in its cache for future use.

ARP Example in tcpdump

To observe ARP in real time, use:

This post is for subscribers only

Subscribe to LevelUp I.T. newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox. It's free!
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!