Home » Questions » Computers [ Ask a new question ]

How discover duplicate IP using Ubuntu? (is it possible to have duplicate ip?)

How discover duplicate IP using Ubuntu? (is it possible to have duplicate ip?)

"I have a problem in network sharing using SMB protocol. I think it's related to IP-duplicating issue. How to detect this.
Note: I'm using Ubuntu on my desktop the other are using various OSs (win xp, vista, mac, Ubuntu)."

Asked by: Guest | Views: 371
Total answers/comments: 2
bert [Entry]

"You can use arpping command. The arping utility performs an action similar to ping command, but at the Ethernet layer. You can send ARP REQUEST to a neighbor host / computers.

Send ARP request
find out reachability of an IP on the local Ethernet with arping i.e send ARP request 192.168.1.1:

$ sudo arping -I eth0 -c 3 192.168.1.1

Output:

ARPING 192.168.1.1 from 192.168.1.106 ra0
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B] 2.232ms
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B] 1.952ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)

Where,

-I eth0 : Specify network interface i.e. name of network device where to send ARP REQUEST packets. This option is required.
-c 3 : Stop after sending 3 ARP REQUEST packets

Find duplicate IP
The -D option specifies duplicate address detection mode (DAD). It returns exit status 0, if DAD succeeded i.e. no replies are received.

$ sudo arping -D -I eth0 -c 2 192.168.1.1

If 192.168.1.1 duplicated you should see zero exit status:

$ echo $?

Always use following syntax for duplicate address detection with arping:

$ sudo arping -D -I <interface-name> -c 2 <IP-ADDRESS-TO-TEST>
$ echo $?"
bert [Entry]

"You cannot have two machines on the same network with the same IP address.

That said, one of the easiest ways to find out which computers have what IP address is to look through the status pages on your router. Typically there will be some kind of DHCP client list which can tell you which computer (usually given by MAC address) has what IP. One note though, if you are using DHCP, you likely do not have an IP addressing issue. What makes you think you have an IP-duplicating issue?"