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

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

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

Post 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.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply