ARP - Address Resolution Protocol

ARP - Address Resolution Protocol

IP packets are sent to the data link layer. If the data link layer is using a point-to-point link then no address is needed, but if the data link layer is on a broadcast medium like a LAN, then the frame generated for the IP packet must be given a LAN data link address (e.g. Ethernet or Token Ring). How does the IP address get mapped to the correct Ethernet address?

Hosts on the Internet also have unique-to-the-world NIC addresses. Why not use that for the IP address?

The network layer looks at the IP address, sees that it is either the local network or a remote network. If it is local, then the host sends an ARP request (which is broadcast to all hosts on the local net) asking "who has this IP address?" All NICs examine this broadcast frame and the machine who is configured with that IP address responds to the ARP request with a frame containing its own LAN address. Caching isused thereafter to improve performance but maintain flexibility. ARP frees network administrators from having to configure and maintain the IP/LAN address mapping.

For remote addresses the host might know to send to the NIC of the proper router, or the routers might know the hosts on their networks and respond to the ARP (known as proxy ARP).

Another related problem is the assignmet of IP addresses to diskless workstations. NIC addresses live in ROM on the NIC, but IP addresses are an attribute of the OS, and hence live on disk. When a machine without a disk boots it can use RARP to find out what IP address it should use. Each network must have a RARP server to respond to these requests since routers don't pass data link broadcast frames.

So where does ARP fit? The network layer or the data link layer?