So... an IP address is not a hardware address. A MAC address is. ARP is a protocol for mapping between them.
Here’s the idea:
Hosts SHOULD maintain an ARP cache so that every IP datagram that comes is does not require the whole APR exchange thing to take place.
The ARP message is embedded inside a frame. ARP messages look like this:
0 | Hardware address type | -- 1 for Ethernet |
2 | Protocol address type | -- 1024 for IP |
4 | Number of octets in hardware address | -- 6 for Ethernet |
5 | Number of octets in protocol address | -- 4 for IPv4 |
6 | Operation | -- 1 for ARP Request, 2 for ARP Reply |
8 | Sender Hardware Address | |
Sender Protocol Address | ||
Target Hardware Address | ||
Target Protocol Address |
In the event that the local network uses Ethernet, here’s how the ARP message would be embedded inside the Ethernet frame:
Preamble | Dest | Src | 0806 | ARP Message | CRC |
---|
We’ve covered: