ARP - Address Resolution Protocol

Consider the following:

Pasted image 20250204151701.png

Where does PC1 get PC2's MAC address? We have to create the following frame:

The protocol to get these MAC addresses prior to any other communications is called ARP:

IP address MAC Address
... ...

Namely, when we say ping 1.2.3.4 via IP Addressing (IP Protocol), we need to convert this IP to the MAC in order to send the "packet" over the network. This is the process.

ARP Request/Reply

An ARP Request:

Essentially, it's asking all the switches:

"who has IP x.x.x.x"

Then a switch broadcasts it (really a PC would):

"it is A:B:C:D"

via an ARP Reply, but now it is:

An Example

Consider our example from earlier:

Pasted image 20250204151701.png

Say PC1 wants to know what IP 129.4.3.11 has for a MAC address:

  1. PC1 sends an ARP request out to the switch, who broadcasts it to everyone else like the Router and PC2.
  1. PC2 recognizes it's its IP, so it sends it's IP address and it's MAC.
  2. PC1 recognizes it needed that, and adds it to the ARP table.

PC1 Arp Cache:

IP Address MAC Address
129.4.3.11 MAC2

Now on PC1 can respond to keep PC2 in check:

PC2 Arp Cache:

IP Address MAC Address
129.4.3.2 MAC1
Over a period of time, these entries will fizzle out. However, because these MAC addresses often don't change (and even the IPs for that matter) these often don't change and thus stay in there.
Note

Any IP Addressing (IP Protocol) layer 3 device will have an ARP table.

Warning

Any device that is not involved in this interaction (ex: some PC3) would not log these requests. Essentially, every request/reply pair will be logged only by the two devices in question.

Another Table?

This seems like a Routing Table right? The difference here is that this is not address learning (namely, you are mapping different layered things: MAC and IP. A routing table will instead map IPs to IPs for routing).

Side-Note - Ethernet broadcasts

There's two types of ethernet broadcasts on the switch specifically. Namely:

Routers are a Blocking Point

When the ARP broadcast hits a router, since it's a layer 3 device it will not allow it to pass the ARP request along. Thus, it will not forward that traffic to the greater internet.