Local network operation: Which protocol is used to discover the hardware (MAC) address that corresponds to a local IPv4 address on the same LAN?

Difficulty: Easy

Correct Answer: ARP

Explanation:


Introduction / Context:
On Ethernet LANs, devices must map Layer 3 IPv4 addresses to Layer 2 MAC addresses to deliver frames. The protocol that performs this resolution is crucial for basic connectivity and troubleshooting duplicate IPs or stale cache entries.



Given Data / Assumptions:

  • We are working with IPv4 on a broadcast LAN (e.g., Ethernet).
  • Hosts require a mapping from IP to MAC before sending unicast frames.
  • The target IP is in the same subnet as the sender.


Concept / Approach:
Address Resolution Protocol (ARP) broadcasts a query: “Who has IP X? Tell Y.” The owner of IP X responds with its MAC address, allowing Y to populate its ARP table and send frames directly. Reverse ARP (RARP) historically mapped MAC to IP (now superseded by modern boot protocols). ICMP handles control messages, not L2 resolution.



Step-by-Step Solution:

Sender checks ARP cache for the target IP.If absent, it sends an ARP Request (broadcast MAC FF:FF:FF:FF:FF:FF).Target replies with an ARP Reply containing its MAC; cache is updated.


Verification / Alternative check:
Use command line tools (arp -a, ip neigh) to inspect cache entries after communication. Packet captures clearly show ARP Request/Reply exchanges preceding unicast traffic.



Why Other Options Are Wrong:

  • RARP maps MAC to IP; largely obsolete.
  • IP is the Layer 3 protocol being mapped, not the resolver.
  • ICMP is for control messages (e.g., Echo), not address resolution.
  • DHCP leases addresses; it does not perform per-packet L2 resolution.


Common Pitfalls:
Assuming ARP works across routers (it does not); ignoring ARP cache timeouts that cause intermittent delays.



Final Answer:
ARP

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion