What is ARP (Address Resolution Protocol)?

Why Interviewers Ask This

This question tests conceptual clarity. Interviewers want to hear a precise, confident definition before moving to more complex Networking topics. It also reveals how well you can explain technical ideas to non-experts.

Answer

ARP (Address Resolution Protocol) resolves an IP address to a MAC address within a local network. When a device wants to send data to another device on the same LAN, it knows the destination IP but needs the MAC address for the Ethernet frame. It broadcasts an ARP Request: "Who has IP 192.168.1.5? Tell 192.168.1.1." The device with that IP responds with an ARP Reply containing its MAC address. The mapping is cached in the ARP table (cache) for future use. ARP is vulnerable to ARP spoofing/poisoning — a malicious device sends fake ARP replies to associate its MAC with another device's IP, enabling man-in-the-middle attacks. Gratuitous ARP is an unsolicited ARP broadcast used to announce an IP-to-MAC mapping or detect IP conflicts. arp -a (Windows/Linux) shows the local ARP cache.

Pro Tip

This topic has Networking-specific nuances that differ from general programming. Highlighting those nuances in your answer shows expertise rather than generic knowledge.