How Duplicate address is detected in lan for ipv4 networks

If i have two pc's connected to a switch , and i statically configure the same ip address on both the pc's, then how the pc's come to know that there is a address conflict (duplicate address) on the lan network ? No dhcp is used in this scenario.

1

1 Answer

Before assigning even a static IP the computer sends an ARP probe broadcast to check whether the IP address is already in use.

All machines on the local network answer this broadcast and if the address is in use it isn't (mostly) assigned to the network adapter.

In windows you can check the currently known IP adresses (for the local machinde) in an cmd.exe with:

arp -a

For various reasons this method is not always reliable. So it may happen, that two different network adapters use the same IP address. This circumstance is noted in the system log files. Without looking there, errors like these are difficult to detect.

Annotation
This is not the complete mechanism mentioned above, but shows a little bit how it works:

With a ping to the network broadcast address, the most machines will answer with an arp response and tell their IP address and the MAC address. (e.g. broadcast-address 192.168.0.255 for a 192.168.0.0/24 network)

ping 192.168.0.255

After this arp -a will show which machines answered.

Mostly even the machines will answer, which have complete closed firewalls.

Without network communication to the machnies, the arp entries will be discarded after a while.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like