In: Computer Science
Suppose a computer receives two ARP replies for a single request. The first reply claims that the MAC address is M1, and the second reply claims that the MAC address is M2. How does ARP handle the replies?
Ans: We should first try to understand the working of Address Resolution Protocol. If a machine talks to another machine in the same network, it requires its physical or MAC address. But ,since the application has given the destination's IP address it requires some mechanism to bind the IP address with its MAC address.This is done through Address Resolution protocol (ARP). IP address of the destination node is broadcast and the destination node informs the source of its MAC address. Let us suppose a situation like:- A wants to send packets to machine B, A has to send an ARP packet to resolve the MAC address of B and hence this will increase the traffic load too much, so to reduce the communication cost computers that use ARP maintains a cache of recently acquired IP_to_MAC address bindings, i.e. they dont have to use ARP repeatedly.When machine A wants to send packets to machine B, it is possible that machine B is going to send packets to machine A in the near future.So to avoid ARP for machine B, A should put its IP_to_MAC address binding in the special packet while requesting for the MAC address of B. Since A broadcasts its initial request for the MAC address of B, every machine on the network should extract and store in its cache the IP_to_MAC address binding of A When a new machine appears on the network (e.g. when an operating system reboots) it can broadcast its IP_to_MAC address binding so that all other machines can store it in their caches. This will eliminate a lot of ARP packets by all other machines, when they want to communicate with this new machine.
Thus, as per it's working, the computer would treat each reply independently and updates it's cache to have M2. The M1 MAC Address is replaced in the cache by M2 MAC Address. However, M2 would be binded with the same IP Address as that of M1 because there is a single request.