A Digital Garden - frequent growth but a bit weedy in the back corner
The ARPProcedure ARP exists for: finding the MAC for an IP on the local link. A request, then a reply @ref=l/158-225
1. The asker broadcasts a StandardARPRequest - Sent when the asker has a packet for a next-hop IP and no entry for it in its ARPCache - Sender MAC and Sender IP are its own, Target IP is the one it wants. Target MAC is left unset, “because it is this value that it is trying to determine” @ref=l/181-184 - Broadcast to every station on the link @ref=l/188-189 - RFC826 has the asker throw away the packet that prompted it, on the assumption a higher layer will retransmit @ref=l/172-175
2. Every receiver learns from it - A receiver that already has an entry for the Sender IP updates its MAC, whether or not the request is for it @ref=l/209-213 - Only the target also adds a new entry for the asker @ref=l/214-218, on the assumption that communication is two-way @ref=l/226-229
3. The target answers with a StandardARPReply - It swaps the sender and target fields, puts its own MAC and IP in the sender fields and sets the opcode to reply @ref=l/219-223 - Sent unicast to the asker, on the hardware the request came in on @ref=l/224-225 - The asker adds the target to its cache, and can now send
Variations:
When it doesn’t go to plan:
A reply with no request before it isn’t part of this procedure, though it looks the same: see Directed Cache Update