Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got two machines (one a laptop, one a desktop) running the same SAMBA version, on FC11 (old I know, but its a home net behind a router / firewall)
The laptop is 192.168.0.24
The desktop is 192.168.0.22
From the laptop, I can smbclient -L 192.168.0.22 (to the desktop) and see the shares it presents.
Form the desktop, I can smbclient -L 192.168.0.24 (to the laptop) and see the shares it presents.
However, I can ONLY connect in ONE direction...
smbd and nmbd is running on both machines.
I can only do laptop (192.168.0.24) to desktop (192.168.0.22):
Code:
On laptop:
mount -t cifs "//192.168.0.22/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
doing this from desktop (192.168.0.22) to laptop (192.168.0.24):
Code:
On desktop:
mount -t cifs "//192.168.0.24/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
always results in
Code:
[root@stefanhost ~]# mount -t cifs "//192.168.0.24/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root@stefanhost ~]#
This is irrespective of whether the laptop is currently successfully connected to the desktop or not.
Whenever the desktop tries to connect it is told that no such share exists on the laptop - even though smbclient -L to the laptop DOES show the share as available:
Code:
[root@stefanhost ~]# mount -t cifs "//192.168.0.24/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root@stefanhost ~]#
Anybody got any idea where I can start looking? Why can I connect in only one direction?
Just a thought. Have you set up /etc/hosts file on both systems? I have had lots of issues with samba, until I set one up, and copied it to all the clients.
However, no change - the laptop can still connect to the desktop, but just as before, trying to connect the desktop to the laptop gives
On desktop:
Code:
[root@stefanhost ~]# mount -t cifs "//192.168.0.24/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
mount error(113): No route to host
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root@stefanhost ~]# ping 192.168.0.24
[root@stefanhost ~]# ping 192.168.0.24
PING 192.168.0.24 (192.168.0.24) 56(84) bytes of data.
64 bytes from 192.168.0.24: icmp_seq=1 ttl=64 time=0.256 ms
64 bytes from 192.168.0.24: icmp_seq=2 ttl=64 time=0.250 ms
64 bytes from 192.168.0.24: icmp_seq=3 ttl=64 time=0.256 ms
^C
--- 192.168.0.24 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2239ms
rtt min/avg/max/mdev = 0.250/0.254/0.256/0.003 ms
[root@stefanhost ~]#
Also, I double checked that smbd and nmbd (started via smbd -D and nmbd -D) are running on the laptop. I've also reconfirmed that SELinux and iptables are disabled - still can only connect in one direction...
This appears to be a routing issue, more than a samba problem.
Do you have a router in the network?
Have you looked at the default routes?
Do you have a /etc/hosts.allow and /etc/hosts.deny files? If yes, try renaming the deny file, and give it a try. Just some more thoughts.
Hi Cliff
Thanks for the reply.
Yes, there is the normal home-network scenario - router connected to ISP in non-bridged mode.
Here's what I see for default routes:
Desktop:
Code:
[root@stefanhost ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 1 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[root@stefanhost ~]#
Laptop:
Code:
[root@stefanlaptop ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 1 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[root@stefanlaptop ~]#
Strange - the desktop has a "virbir0" network interface listed, but I very definitely only have one NIC in the machine. Could this have something to do with my problem?
I do have /etc/hosts.allow and /etc/hosts.deny files, I put each target machine's IP in the allow files on both, and renamed the .deny files to /etc/hosts/deny.bak.
No luck. Trying to connect form the desktop to the laptop gives
Code:
[root@stefanhost ~]# mount -t cifs "//192.168.0.20/shared" /mnt/remote -o username=guest,password="",uid=stefan,dirmode=0775,filemode=0775
mount error(113): No route to host
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
[root@stefanhost ~]#
while the laptop still happily connects to the desktop.
So you suspect it might be a routing problem imposed by the fact that there is a router on the network?
Strange - the desktop has a "virbir0" network interface listed, but I very definitely only have one NIC in the machine. Could this have something to do with my problem?
This interface shows up when you are using 'libvirtd' daemon. ( Developed by Red Hat for virtual machines ). I don't know if it could cause a problem or not. You could try deactivating the interface, and try again.
The other thing I would like to see you try, now that you have /etc/hosts files on both systems, is try the mount using the host name, not the IP address. It shouldn't make a difference, however, this is a strange problem. No problem pinging the laptop, but can't do a cifs mount with "No route to host".
One last thought, you could define a static route to the laptop and see if the mount works. Best of luck.
This interface shows up when you are using 'libvirtd' daemon. ( Developed by Red Hat for virtual machines ). I don't know if it could cause a problem or not. You could try deactivating the interface, and try again.
Ok, thanks.
Quote:
The other thing I would like to see you try, now that you have /etc/hosts files on both systems, is try the mount using the host name, not the IP address. It shouldn't make a difference, however, this is a strange problem. No problem pinging the laptop, but can't do a cifs mount with "No route to host".
Ok, I'll give it a try once I'm in that office again.
Quote:
One last thought, you could define a static route to the laptop and see if the mount works. Best of luck.
What is the syntax / command I'd use to define a static route of this kind?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.