Understanding ARP (Part 3) – How Network Card Obtain Other Computers MAC Address

We learned before that all computers in the network were using their MAC Addresses to communicate with each others. Therefore when one computer want to communicate with other computers in the network, their MAC Addresses must be known.

MAC Address

Imagine that computer A wish to communicate with computer C. Therefore computer A must know the MAC Address of computer C.

Let’s see how computer A get the MAC Address of computer C:

1. Computer A will send a ARP Packet (broadcast) to all computers in the network. The ARP Packet will look something like that:

ARP Packet

2. The ARP Packet will travel along the network through the ethernet cable.

3. This is obvious that the first computer in the network that receive the ARP Packet will be computer B. Computer B will then check the Target IP Address of the Packet. Since the Target IP Address is different, computer B will ignore this packet. The situation is same as the diagram below:

ARP Packet

4. Since Computer B ignore the packet, the packet will continue travelling further down the network.

5. The next computer that receive the packet will be computer C. Computer C will compare the Target IP Address of the packet with it’s own IP address. Computer C notice that the packet is sent to him. The situation is same as the diagram below:

ARP Packet

6. Now computer knows that the packet is sent to him. Computer C will receive the packet and then reply a ARP Packet to computer A. The ARP Reply Packet will look something like:

ARP Packet

Note that the target address is computer A.

7. When computer A receive the reply packet, he then knows the MAC Address of computer C. Therefore he can communicate with computer C now.

Note:
When computer A get the MAC Address of computer C, he will save the information in the ARP cache table (see previous blog). Therefore when computer A want to talk with computer C later on, he will firstly check the MAC Address of computer C in it’s own ARP cache table. This avoid being asked for MAC Address for every communication.

You may also like...