Samba: "error(101): Network is unreachable"
Posted: Tue May 22, 2012 4:45 pm
[PROBLEM]
I tried to mount a windows share and got the following error:
Standard network-admin procedure, one would think - but not if a Windows-network-protocol is involved...
I can ping the target perfectly, routing is correct and functional - and basically: everything is the way it should be.
Except for one thing:
The target machine has 2 different IPs in 2 different subnets.
So for some (yet to me unknown) reason, even if the target hostname is resolved to the correct IP in the right subnet (=the one I want), inside the smb-resolving mechanisms, something goes wrong and it suddenly returns the "other" IP.
Therefore the error message.
I tried to mount a windows share and got the following error:
Well, one would guess that it's quite obvious that the problem is that the target host (=windows) is in a network, unreachable to the samba client.mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Standard network-admin procedure, one would think - but not if a Windows-network-protocol is involved...
I can ping the target perfectly, routing is correct and functional - and basically: everything is the way it should be.
Except for one thing:
The target machine has 2 different IPs in 2 different subnets.
Trying to mount the share verbosely ("mount -v") shows that it uses the right IP for the request:192.168.100.x
192.168.201.x
WTF?mount.cifs kernel mount options: ip=192.168.201.9,unc=\\storage2\Video,noexec,nosuid,nodev,file_mode=0664,dir_mode=0775,nounix,noserverino,credentials=/etc/samba/credentials/user_storage,uid=33,gid=1001,ver=1,user=xxx,prefixpath=Part1,pass=********
So for some (yet to me unknown) reason, even if the target hostname is resolved to the correct IP in the right subnet (=the one I want), inside the smb-resolving mechanisms, something goes wrong and it suddenly returns the "other" IP.
Therefore the error message.