ARP Cache – When and How It Gets Updated

arpNetwork

Suppose,
My host is A

A(my machine) has ip address 12.

B has ip address 13

C has ip address 14

My machine has below entries in ARP cache

B => ip address 13 and its corresponding MAC address

C => ip address 14 and its corresponding MAC address

Now, B and C disconnects from LAN and when they are connected back to LAN, but this time C is assigned IP address 13 and B is assigned IP address 14

But my ARP cache has old info. What would happen if I try to ping B now ?

Best Answer

If that were to happen just as you state, then your pings would fail.

In practise if you are using DHCP to hand out addresses, the server will give you back the same address. Even if it doesn't (because you clear your DHCP server cache and reboot it, all before your ARP cache times out) you'll probably find that your B and C will send gratuitous ARPs anyway to update the ARP cache.