ARP (Address Resolution Protocol) maps an IPv4 address to the corresponding MAC address on a local network so frames can be delivered to the correct device.
- Resolves IP addresses to MAC addresses for local communication
- Works only within the same broadcast domain (LAN)
- Operates directly over link-layer technologies such as Ethernet
- Essential for delivering frames to the correct device
Important ARP Terms
ARP Cache
- A temporary storage table maintained by a device.
- Stores recently resolved IP-to-MAC address mappings.
- Reduces network overhead by avoiding repeated ARP requests.
ARP Cache Timeout
- The time duration for which an entry remains valid in the ARP cache.
- After expiration, the entry is removed to prevent the use of outdated mappings.
ARP Request
- A broadcast message sent to all devices in the local network.
- Asks: “Who has this IP address?”
- Used when the MAC address for a given IP is not present in the ARP cache.
ARP Reply (ARP Response)
- A unicast message sent by the device that owns the requested IP address.
- Contains the corresponding MAC address.
- Allows the sender to update its ARP cache and proceed with data transmission.
Types of ARP
There are four main types of ARP, each used in different scenarios:
1. Proxy ARP
Proxy ARP allows a networking device, typically a router, to respond to ARP requests on behalf of another host that resides on a different network segment.
- When a host sends an ARP request for an IP address outside its local subnet, the router replies with its own MAC address instead of the destination host’s MAC.
- The sending host believes the destination is on the same local network and forwards the frame to the router.
- The router then forwards the packet to the actual destination.
- Proxy ARP is useful for hiding network topology, supporting legacy hosts, or connecting subnets without modifying host configurations.
- Excessive use of Proxy ARP can increase ARP traffic and complicate network troubleshooting.
2. Gratuitous ARP
Gratuitous ARP is an ARP message sent by a device to announce or verify its own IP-to-MAC address mapping.
- A host broadcasts an ARP request or reply for its own IP address, even though no device has asked for it.
- It is commonly used to detect duplicate IP addresses on the network.
- Helps update ARP caches of other hosts when a device’s MAC address changes (for example, after a NIC replacement).
- Switches use Gratuitous ARP to update their MAC address tables.
- Often used during system startup, IP address reassignment, or failover scenarios in high-availability systems.
3. Reverse ARP (RARP)
Reverse Address Resolution Protocol (RARP) enables a device to obtain its IP address when only its physical MAC address is known.
- The device broadcasts a RARP request containing its MAC address on the local network.
- A RARP server checks its database and replies with the corresponding IP address.
- RARP was primarily used by diskless workstations during system startup to acquire network configuration information.
- It requires the presence of a dedicated RARP server within the same local network segment.
- RARP is now obsolete and has been replaced by more efficient and scalable protocols such as BOOTP and DHCP.
4. Inverse ARP (InARP)
Inverse Address Resolution Protocol (InARP) is used to determine the IP address of a remote device when its data link–layer address is already known.
- Unlike standard ARP, InARP operates in networks that use virtual circuits instead of broadcast communication.
- It is commonly implemented in Frame Relay and ATM networks.
- A device sends an InARP request over an already established virtual circuit.
- The remote device responds with its IP address.
- InARP supports dynamic IP address discovery in non-broadcast, multi-access (NBMA) networks.
How ARP Works
The working of ARP can be explained in the following steps:

ARP Cache Lookup
- The sender first checks its ARP cache for an existing entry corresponding to the destination IP address.
- If a valid entry is found, the MAC address is used immediately and data transmission begins.
ARP Request Broadcast
- If no cache entry exists, the sender generates an ARP request.
- This request is broadcast to all devices on the local network.
Request Processing by Hosts
- Every device on the LAN receives the ARP request.
- Each device compares the requested IP address with its own IP address.
ARP Reply Transmission
- The device whose IP address matches the request sends an ARP reply.
- The reply is sent as a unicast message and contains the device’s MAC address.
ARP Cache Update
- Upon receiving the reply, the sender stores the IP–MAC mapping in its ARP cache.
- This cached entry is used for future communication until it expires.
ARP Message Format
An ARP message consists of several fields:

Hardware Type (HTYPE) – 2 bytes
- Identifies the type of hardware used at the data link layer.
- For Ethernet, the value is 1.
Protocol Type (PTYPE) – 2 bytes
- Specifies the network layer protocol whose address is being resolved.
- For IPv4, the value is 0x0800.
Hardware Address Length (HLEN) – 1 byte
- Indicates the length of the hardware (MAC) address.
- For Ethernet MAC addresses, the length is 6 bytes.
Protocol Address Length (PLEN) – 1 byte
- Indicates the length of the protocol (IP) address.
- For IPv4 addresses, the length is 4 bytes.
Operation Code (OPER) – 2 bytes
- Defines the type of ARP operation.
- Value 1 represents an ARP request, and value 2 represents an ARP reply.
Sender Hardware Address (SHA)
- Contains the MAC address of the device sending the ARP message.
Sender Protocol Address (SPA)
- Contains the IP address of the device sending the ARP message.
Target Hardware Address (THA)
- Contains the MAC address of the target device.
- This field is unknown (set to zeros) in an ARP request and filled in an ARP reply.
Target Protocol Address (TPA)
- Contains the IP address of the target device whose MAC address is being resolved.
Advantages
- ARP dynamically resolves IP addresses into MAC addresses without requiring manual configuration.
- It provides seamless communication in a local area network by rapidly finding the destination hardware address.
- ARP is run in the background and does not need user or applications assistance.
- It supports multiple ARP variants such as Proxy ARP, Gratuitous ARP, Reverse ARP, and Inverse ARP to meet different networking requirements.
- By storing resolved addresses in the ARP cache, ARP minimizes repeated broadcasts and improves overall network performance.
- ARP is widely supported across IPv4-based networks and works seamlessly with common link-layer technologies such as Ethernet.
- ARP automatically adapts to changes in IP–MAC mappings, ensuring continued communication even when network configurations change.