Page 1 of 1

Samba: "error(101): Network is unreachable"

Posted: Tue May 22, 2012 4:45 pm
by ^rooker
[PROBLEM]
I tried to mount a windows share and got the following error:
mount error(101): Network is unreachable
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
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.
Standard network-admin procedure, one would think - but not if a Windows-network-protocol is involved... :evil:

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.
192.168.100.x
192.168.201.x
Trying to mount the share verbosely ("mount -v") shows that it uses the right IP for the request:
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=********
WTF?

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.