Address Resolution Protocol (ARP)

 

Address Resolution Protocol (ARP)

Address Resolution Protocol (ARP) is used to find the link-layer (MAC) address corresponding to a given IP address on a local network.

When a host or router wants to send an IP datagram, it knows the IP address of the next node. However, to deliver the datagram over the local link, it needs the next node's link-layer address. ARP performs this mapping.

The ARP protocol is one of the auxiliary protocols defined in the network layer, as shown in Figure 5.46. It belongs to the network layer.



How ARP works

1. ARP Request (Broadcast)

Host A knows Host B's IP address but not its MAC address. A broadcasts an ARP request asking, “Who has this IP address?”

2. Request Processing

All hosts on the local network receive the request. Only the host whose IP address matches the requested address responds.

3. ARP Reply (Unicast)

Host B sends an ARP reply directly to Host A, providing its IP address and MAC address.

4. Data Transmission

Host A uses the obtained MAC address to construct the frame and transmit the IP datagram to Host B.




Example

Suppose Host A wants to send data to Host B.

Address

Host A

Host B

IP address

    192.168.1.10

    192.168.1.20

MAC address

    AA:AA:AA:AA:AA:AA

    BB:BB:BB:BB:BB:BB

Host A knows Host B's IP address, 192.168.1.20, but does not know its MAC address.

  • Request: Host A broadcasts, “Who has 192.168.1.20?”

  • Reply: Host B responds, “192.168.1.20 is at BB:BB:BB:BB:BB:BB.”

  • Transmission: Host A sends the frame using Host B's MAC address.

Important points

  • ARP maps an IP address to a MAC address.

  • An ARP request is sent using broadcast.

  • An ARP reply is normally sent using unicast.

  • ARP is used to resolve the address of the next node on the local link. If the destination is on another network, the sender resolves the MAC address of its default gateway instead.

Remember: IP tells us which network-layer destination is intended; ARP helps find the MAC address needed to deliver the frame over the local link.

Comments

Popular posts from this blog

Computer Networks PCCST501 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Model Question Paper Computer Networks PCCST501 KTU 2024 Scheme and Answer Key

Introduction to Computer Networks