The arping command can be used to test the connectivity between various hosts in the LAN, and to test whether a particular IP address in the LAN has been occupied, which can effectively detect the IP address conflict in the LAN.
Example: Arping-c 3-f-D *.*.*.* (*.*.*.* as IP address)
192.168.2.222 returns NULL, indicating that the IP address is not occupied by the LAN.
192.168.2.106 returns 1, indicating that the IP address is already in use, and receives a reply to see the MAC address of the endpoint that binds the IP.
The arping command details:
Usage: arping [-FQBDUAV] [-C Count] [-w timeout] [-I device] [-s source] IP address
Parameters:
-a ARP reply mode, update neighbor
-B Keep broadcasting
-d Copy Address detection mode
-F Get the first reply and exit
-Q does not display a warning message
-U active arp mode, update neighbor
Number of-c< packets > number of packets Sent
-w< Timeout > Set time-out period
-i< network card > Using the specified Ethernet device, using eth0 by default
-s Specifies the source IP address
-H Display Help information
-V Display version information
Linux arping Command test IP address conflict