Principles Digital Communication System & Computer Networks (Charles River Media Computer Engineering)

 < Day Day Up > 


21.3 ADDRESS RESOLUTION PROTOCOL

Consider a case when a router connected to a LAN receives a packet for one of the nodes on the LAN. The packet is routed up to the router based on the network ID. How does the router send the packet to that specific node? Remember, the packet has to be sent to the node using the physical address, and the received packet contains only the IP address.

Address resolution protocol (ARP) is used when the router does not know the IP address of the node to which the packet has to be sent. The router broadcasts the packet, and the node with the corresponding IP address responds with its physical address.

The ARP solves this problem. The router connected to the LAN sends a broadcast message with the IP address of the node as the destination address. All the nodes receive this packet, and the node with that IP address responds with its physical address. Subsequently, the packets will be transmitted to that node with that physical address. Since broadcasting is a costly proposition, the router can keep a cache in which the physical addresses corresponding to the IP addresses are stored for subsequent use. Since the physical address may change, the router keeps the physical address in the cache only, because it is likely to be valid only for a certain period of time.

In the Ethernet frame, the ARP message is embedded in the data field. The type field of the Ethernet frame contains the code 0806 (hex) to indicate that it is an ARP message.


 < Day Day Up > 

Категории