ARP table

ARP table

 If the destination MAC address is not known, it will look up the destination MAC address by initiating the ARP process. Then, in preparation for the next communication, it adds the correspondence information between the learned destination IP address and MAC address to its own ARP table.

 By referring to this ARP table from the next communication, you can know the MAC address, so you do not need to perform the ARP process.

Then

Let's take a look at the ARP table using a Windows PC.

Start Command Prompt.

c:\>arp -a

Enter.

Then the current ARP table of your computer will be displayed.

By the way, the options of the ARP command are as follows.

optionexplanation
-a (IP address)Show entries from the ARP cache table.
-d [IP address] (Interface)Delete an ARP entry.
-gSame as -a
-N [Interface]Show ARP entries for the specified interface number.
-s [IP address] [Mac Address] (Interface)Add to ARP table.

Communicate with other terminals belonging to the same network that are not on this ARP entry.

 Access to shared folders or anything else. In some cases, disable the firewall function of the antivirus software.

 Also, remove the firewall settings on the OS side. This is because ICMP ECHO requests are blocked by default.

If you see a key in your local area connection, you have a firewall.

After removing the firewall settings, try pinging other terminals.

for example,

ping 192.168.1.1

Enter.

Display the ARP table again.

c:\>arp -a

Enter.

A new entry is displayed.

A MAC address corresponding to "192.168.1.1" has been added.

Wait for a while. Wait about 10 minutes. During that time, do not communicate with "192.168.1.1" at all.

*On a Windows computer, an entry is deleted from the table if communication with the entry does not occur for 10 minutes.

Display the ARP table again.

c:\>arp -a

Enter.

The entry for "192.168.1.100" disappeared.

 The ARP table is refreshed periodically, so if there is no communication for a while, entries will be deleted from the ARP table.

There is a reason why it works like this.

I will explain why it works like this.

 For example, see the network configuration below. This network uses a DHCP server to assign IP addresses to each computer.

Computer A has the following ARP table with each computer.

IP addressMAC address
192.168.1.200:17:42:5B:33:02
192.168.1.300:17:42:5B:33:03
192.168.1.400:17:42:5B:33:04
192.168.1.500:17:42:5B:33:05
192.168.1.1000:17:42:5B:33:0A

What if the learned ARP table is never updated?

For example, Computer D and Computer E were rebooted and assigned new IP addresses.

as a result,

Computer D's IP address changes from "192.168.1.4" to "192.168.1.5"
Computer E's IP address changes from "192.168.1.5" to "192.168.1.4"

Consider what changed.

 If the ARP table is not updated, there will be discrepancies in the IP and MAC address combinations. In other words, consistency is lost.

 Computer A cannot communicate with Computer D and Computer E by specifying the correct combination of IP address and MAC address, so communication fails.

The ARP table MUST be modified as below.

IP addressMAC address
192.168.1.200:17:42:5B:33:02
192.168.1.300:17:42:5B:33:03
192.168.1.400:17:42:5B:33:05
192.168.1.500:17:42:5B:33:04
192.168.1.1000:17:42:5B:33:0A

Therefore, the ARP table is periodically refreshed (cleared from the table) to maintain consistency.