Linux 101 : Troubleshooting ARP



The ARP protocol:

When we want to contact a machine in our network, we use the IP address of the destination machine

The system, then looks for the MAC address - fixed address of the network interface - that corresponds to the destination IP address in its ARP table.


Usually, when the IP address does not exist in the ARP table, the host sends the request to all the machines on the network - broadcast request -, and the owner of the IP address sends back its MAC address, which is stored in the ARP table with IP address for future use.

Below is an example of the "arp" command output:


If one of the network cards fails, and we replace it with  a new network interface, the new card will have a different MAC address, and the IP address entry in our ARP table would point to a non existing MAC address.

To solve that issue, we will need to delete the ARP entry that corresponds to the old MAC address, using the below command:


We could also use the "ip" command version as below:


We don't have to add the new MAC address, it will be added automatically through the broadcast "discovery" described above, where an ARP request is sent to all the machines of the network.

Comments

Leave as a comment:

Archive