What happens when we alias an ip addr which is already allotted to some other on the same LAN. Is aliasing local to my system?
1 Answer
IP addresses are resolved to physical interfaces with a protocol called ARP
.
When a computer wants to know who has an IP address in a LAN segment, it broadcasts an ARP who-has request, telling that the owner of the IP address should tell how he can be reached.
When the computer that has the IP address sees the request, it sends a reply package to the requestor's Ethernet address, indicating that he owns the address.
Now, when two computers have the same address, they both reply to the ARP who-has request, and it is basically random which one of those replies arrive first to the original requestor.
So, to answer your question, other computers in the network connect to either computer when two computers use the same IP address. The computer that has the IP address always connects to the local computer, because it doesn't need to make an ARP request for the Ethernet address corresponding to the IP address.