- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is Address Resolution Protocol (ARP)?
Address Resolution Protocol (ARP) is a network-specific standard protocol. The Address Resolution Protocol is important for changing the higher-level protocol address (IP addresses) to physical network addresses. It is described in RFC 826.
ARP relates an IP address with the physical address. On a typical physical network such as LAN, each device on a link is identified by a physical address, usually printed on the network interface card (NIC). A physical address can be changed easily when NIC on a particular machine fails.
The IP Address cannot be changed. ARP can find the physical address of the node when its internet address is known. ARP provides a dynamic mapping from an IP address to the corresponding hardware address.
When one host wants to communicate with another host on the network, it needs to resolve the IP address of each host to the host's hardware address.
This process is as follows−
- When a host tries to interact with another host, an ARP request is initiated. If the IP address is for the local network, the source host checks its ARP cache to find out the hardware address of the destination computer.
- If the correspondence hardware address is not found, ARP broadcasts the request to all the local hosts.
- All hosts receive the broadcast and check their own IP address. If no match is discovered, the request is ignored.
- The destination host that finds the matching IP address sends an ARP reply to the source host along with its hardware address, thus establishing the communication. The ARP cache is then updated with the hardware address of the destination host.
ARP Packet Generation
If an application needs to send information to a specific IP destination address, the IP routing structure first determines the IP address of the next-hop of the packet (it should be the destination host itself or a router) and the hardware tool on which it should be transmitted.
If it is an IEEE 802.3/4/5 network, the ARP structure should be considered to design the <protocol type target protocol address> to a physical address.
The ARP module attempts to find the address in this ARP cache. If it is to find the connecting pair, it provides the equivalent 48-bit physical location back to the caller (the device driver), which then shares the packet.
If it does not discover the pair in its table, it removes the packet (the assumption is that a higher-level protocol will resend) and creates a network broadcast of an ARP request.
- Hardware address space: It specifies the type of hardware such as Ethernet or Packet Radio net.
- Protocol address space: It specifies the type of protocol, same as the Ether type field in the IEEE 802 header (IP or ARP).
- Hardware Address Length: It determines the length (in bytes) of the hardware addresses in this packet. For IEEE 802.3 and IEEE 802.5, this is 6.
- Protocol Address Length: It specifies the length (in bytes) of the protocol addresses in this packet. For IP, this is 4 byte.
- Operation Code: It specifies whether this is an ARP request (1) or reply (2).
- Source/target hardware address: It contains the physical network hardware addresses. For IEEE 802.3, these are 48-bit addresses.
- For the ARP request packet, the target hardware address is the only undefined field in the packet.
- What is Reverse Address Resolution Protocol (RARP)?
- ARP, Reverse ARP, Inverse ARP, Proxy ARP, and Gratuitous ARP
- What is ICMP Protocol?
- What is Protocol Layering?
- What is loopback address?
- What is Three Address Code?
- What is protocol graph? Compare the network interface and protocol
- What is RSVP (Resource Reservation Protocol)?
- What is the Function of Protocol?
- What is Exterior Gateway Protocol (EGP)?
- What is Wireless Application Protocol (WAP)?
- What is Invisible Internet Protocol (I2P)?
- What is Adaptive Internet Protocol (AIP)?
- What is the MITM (Man in The Middle) Attack using ARP Poisoning?
- What is the scope resolution operator in C#?