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).
- 267
- 1
- 2
- 14
-
The original problem that I can't open WindowsShare through network. The problem source couldn't be determined, Anyway I jumped over it through a single command line to open the WindowsShare in Ubuntu. For curious people, it was: "nautilus smb://sit.local/" while sit.local is the domain-name of a network-shared Maxtor hard-disk-drive. – Omar Al-Ithawi Sep 29 '09 at 12:33
4 Answers
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,
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 $?
-
There was no IP duplication!, And the original problem was solved. – Omar Al-Ithawi Sep 29 '09 at 12:29
-
-
1In the version of `arping` I have on Ubuntu, instead of the `-D` flag you need to use `-d`, and it returns 1 when there is a conflict. Check with `arping --help` which syntax is yours. – pgr Dec 11 '20 at 12:55
You can install IPwatchD which works with (other) Debian packages.
The linked article also explains the method and installation steps.
IPwatchD source is from sourceforge.

It lets you configure for a GUI notification (as above, only for GNOME) and a 'syslog' message.
-
Nice! Really useful for us, since many of our desktop PCs are running Linux – jap1968 Nov 20 '15 at 10:08
Unfortunately accepted answer does NOT work if the address you are checking is on your machine. This will do:
arping -0c1 192.168.1.1
It works correctly thanks to -0 option. For scripting you can use arping -q0c1 192.168.1.1 to check address on your machine for duplicates, it returns 0 if there are duplicates. Use arping -qdc1 192.168.1.1 to check address that is NOT on your machine for duplicates, on the contrary, it returns 1 if there are duplicates.
From man arping:
-0- Use this option to ping with source IP address 0.0.0.0. Use this when you haven’t configured your interface yet. Note that this may get the MAC-ping unanswered.-c count- Only send count requests.-d- Find duplicate replies. Exit with 1 if there are answers from two different MAC addresses.-q- Does not display messages, except error messages.
You can also increase count to ensure that a response is received even if there are momentary network congestion or failure.
- 126
- 4
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?
- 62,847
- 18
- 155
- 177
-
5Well, you -can- have 2 machines with the same IP, but neither will work. It's annoying, and one of the main reasons I used DHCP now. – Phoshi Sep 29 '09 at 12:10
-