Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a small network with Windows and Linux machines connected to a D-Link DIR-825 router.

The Windows machines on the network can reach all other machines by name while the Linux machines only can reach other machines by IP-address.

I can see all the machines listed with names and their DHCP assigned addresses in the DHCP client status list in the router web admin interface.

Why can't the Linux machines find any other machine by name while Windows has no problem finding the Linux machines?

share|improve this question
1  
How is your name resolution done? DNS? Do you have a search suffix configured? –  Shane Madden Jan 21 '12 at 21:01
    
All machines are using DHCP, connected to the D-Link router where they seem to register themselves and that is probably enough for Windows to find all machines. But the Linux machines do they really require a local DNS server other than the router? –  Per Salmi Jan 21 '12 at 21:12
    
Unsure about that particular router, but most consumer routers don't integrate DHCP clients into their internal DNS service. Joe's answer is likely your culprit. –  Shane Madden Jan 21 '12 at 21:14
    
Then the Linux machines would respond to LLMNR messages but not use it themselves to find other machines? –  Per Salmi Jan 21 '12 at 21:22

6 Answers 6

by default, without a DNS server, windows can use netbios (a Microsoft name resolution protocol) to discover the names of other windows systems local to their network. As mentioned above, it looks like you need to setup SAMBA on the linux side. Here is a basic set of instuctions to do that.

http://www.zulius.com/how-to/resolve-windows-netbios-names-from-linux/

BTW, this has nothing to do directly with WINS. WINS is a netbios server typically used in larger networks to cut down on broadcast traffic, provide a legacy centralized name resolution platform, and ultimately to enable systems on different networks to know each others netbios name to IP mapping.

An alternative to SAMBA would be to setup a DNS server and ensure dynamic DNS updates are configured, or that DHCP can register DNS recrods.

share|improve this answer

I'm not a network expert, and I'm also researching a LOT for answers in this topic. My current findings are:

  • Windows uses NetBIOS names, and such protocol, being a broadcast one, allows them to find each other without any central server.

  • Linux machines in modern distros uses natively a protocol called Avahi, which is also a server-independent, broadcast protocol. Local network machines have a suffix .local, so you can ping from Linux to Linux using ping hostname.local, or see them with avahi-discover package. some apps in Gnome use avahi to list machines in the network (for example, the Remote Desktop Viewer)

  • Installing SAMBA on a Linux machine will assign it a NetBIOS name (or, more technically, will make a Linux machine advertise itself in broadcast requests with their NetBIOS name, which is by default their hostname), and that allows Windows machines to find the Linux ones.

  • Gotcha: Although Linux machines with Samba will reply to NetBIOS protocol requests, with default settings in distros like Ubuntu it won't use NetBIOS as a method to resolve names, and that's why Linux machines can't "see" each other or the Windows machines. For that, you need to edit /etc/nsswitch.conf file and add wins to the list in this line:

    hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4

  • You may need to install winbind package for the above to work.

  • So, for the visibility issue, you either install Samba on all Linux machines (and also edit /etc/nsswitch.conf to enable NetBIOS name resolution), or you install Avahi support in Windows machines.

  • As for file sharing, Samba provides Linux machines file-sharing capabilities with Windows. Theres no need to edit /etc/nsswitch.conf for Linux machines to see each other and Windows (and vice-versa) in the "Network" section of Nautilus

I hope this helped! :D

share|improve this answer

Most probably LLMNR.

share|improve this answer
    
So would that make the Windows machines find the Linux boxes using the router DHCP registered information then? But Linux doesn't support using the router registered names to find anything? –  Per Salmi Jan 21 '12 at 21:14
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Mark Henderson Jan 21 '12 at 21:34
    
It doesn't feel like the LLMNR explains why Windows can find the Linux boxes but not the other way around. If Linux doesn't use LLMNR it would result in Windows finding Windows but not Linux? –  Per Salmi Jan 21 '12 at 21:40

You probably just need to set up Avahi/mDNS Resolution. It does kind of the same as LLMNR on Windows.

share|improve this answer

Linux can resolve local names though the necessary software isn't installed by default ...

Most Linux distros make few presumptions regarding your software requirements beyond the kernel ... Debian reference DNSMasq

apt-cache search dnsmasq ...

share|improve this answer

Please note, that all the solutions involving NetBIOS do not work, if you are no a network without IPv4 support. For that, LLMNR support would be needed and the Avahi distribution did not yet integrate this support as of now.

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  slm Apr 17 '13 at 14:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.