Interview Prep/Networking/Network Models, TCP, UDP & Ports

What is ARP and how does it relate to the data link layer?

IntermediateConceptNetwork Models, TCP, UDP & Ports
Answer

ARP resolves an IPv4 address to a MAC address on the local subnet. The host broadcasts "who has 10.0.1.5?" and the owner replies with its MAC; the answer is cached in the neighbor table.

ip neigh show
arping -I eth0 10.0.1.5

Off-subnet traffic is sent to the gateway's MAC instead. In cloud VPCs ARP is answered by the virtual network, so you will not see real L2 behavior, and gratuitous ARP tricks for floating IPs generally do not work.

All Networking questions Roadmap: Networking for DevOps

More on Network Models, TCP, UDP & Ports