ARP – Understanding Its Purpose in Networking

arpipip addressipv4mac address

I'm a complete beginner at networking, but if I've understood this correctly, the gist of ARP is:

We want to use high level adresses to the highest degree possible but ultimately, we actually need the sinks MAC adress to transmit to it.

  • We route a packet to the host with ip adress I. But we do not know which MAC adress to send it to.
  • Now we broadcast a message in the style of "hey, who does this IP adress belong to?"
  • The sink recognizes its IP and responds by sending its MAC adress.

So, we are doing ARP because we do not want to broadcast the entire packet?

Follow-up #1: I recall reading that at least for Ethernet networks, broadcasting is basically as cheap as single transmissions. But at the time of sending the packet, we do not know if the sink is on Ethernet so we can not assume broadcasting is cheap?

Follow-up #2: At what point do we broadcast? Say the sink is at 23.235.37.67. Do we actually broadcast to 23.235.37.67? If so, what makes it a broadcast, rather than a single user transmission? Why not broadcast the entire packet if there is only a single computer on this IP?

Best Answer

Broadcasts interrupt every host on the broadcast domain, which is not a good thing. ARP must broadcast in order to find the MAC address, but, after that, the MAC address gets cached in an ARP table (it eventually times out). Caching the MAC address prevents excessive broadcasts from ARP - only the first packet needs to ARP (broadcast), and the rest of the stream can use the ARP cache.