Samba: mount error 113 = No route to host

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: 1482
Joined: Fri Aug 29, 2003 8:39 pm

Samba: mount error 113 = No route to host

Post by ^rooker »

[PROBLEM]
After changing the IP address of a Windows "server" 2003 from "192.168.0.100" to "192.168.1.100".
From that moment on, I was unable to mount it anymore, getting the error:
mount error 113 = No route to host
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
The Windows "server" has multiple network interfaces (NIC) and multiple IPs, so I checked that the name "storage" was resolved to the right IP, by running verbose mount:

Code: Select all

mount -v /mnt/storage
The result confirmed the correct, new IP address (censored here)
mount.cifs kernel mount options: unc=//storage\Part1,ip=192.168.1.100,ver=1,rw,noexec,nosuid,nodev,noauto,username=videorw,uid=33,gid=33,prefixpath=Video,pass=********mount error 113 = No route to host
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
On my linux server, I've verified routing, IP-configuration, etc - and even pinged the exact same (copy/paste) IP address, mount.cifs claimed to use in the above message:

Code: Select all

ping 192.168.1.100
...works fine!

WTF?

[SOLUTION]
I'm suspecting, that a simple reboot of both computers will fix the problem, but very often you can't just reboot a server because you feel like it, so I had to dig into this.

I haven't solved it yet, but it seems that some part of the Samba communication returns the old IP (I guess it's the Windows "server" still clinging onto it), because tcpdump shows communication between the Linux and the Windows machine (so they *do* talk to each other), but suddenly spits out ARP lookup requests:
[...]
14:07:15.023448 IP 192.168.1.100.Microsoft-ds > host.local.37563: F 950:950(0) ack 976 win 64561 <nop,nop,timestamp 12211124 42171341>
14:07:15.023466 IP host.local.37563 > 192.168.1.100.Microsoft-ds: . ack 951 win 125 <nop,nop,timestamp 42171341 12211124>
14:07:15.895642 arp who-has 192.168.0.100 tell host.local
14:07:16.895396 arp who-has 192.168.0.100 tell host.local
14:07:17.899544 arp who-has 192.168.0.100 tell host.local
14:07:18.900163 arp who-has 192.168.0.100 tell host.local
14:07:19.899403 arp who-has 192.168.0.100 tell host.local
14:07:20.904149 arp who-has 192.168.0.100 tell host.local
14:07:21.903406 arp who-has 192.168.0.100 tell host.local
14:07:22.903354 arp who-has 192.168.0.100 tell host.local
(where "host.local" is the linux server)
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