Solved

Ping Windows NetBIOS names from CentOS

Posted on 2014-04-09
7
2,671 Views
Last Modified: 2014-05-01
I am unable to resolve windows NetBIOS names from inside CentOS.  I've tried the following:

Adding "wins" entry to "hosts:" in nsswitch.conf ("files wins dns")
Changing the order of "files", "wins", and "dns" in nsswitch.conf
Restarting networking "service network restart"
Adding "search WORKGROUP" to resolv.conf (replacing WORKGROUP with my particular workgroup)
Installing samba-common
Restarting the machine

I'm kinda out of options, and I'm not sure where to go from here.  From what I've read, adding wins to nsswitch.conf should solve it, but that doesn't work for me.

I'm able to ping the computers via IP address, and I can resolve the NetBIOS names on Windows machines.  I don't think it's a firewall issues, because when I stop iptables, the issue persists.  It could maybe be an SELinux issue, but I don't really know where to start troubleshooting that.

Help me, EE, you're my only hope!
0
Comment
Question by:nick2253
7 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39990074
As far as I know Samba is the only thing that even looks at NetBIOS on a Linux machine.  It is also the only thing that knows about 'workgroups'.
0
 
LVL 62

Expert Comment

by:gheist
ID: 39990245
WINS is not NetBIOS
You need more than samba-common to get netbios names. At least package containing nmbd is needed.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39990404
I think that 'ping' does a DNS lookup when you give it a host name.  There is no reason to think that the NetBIOS names are in DNS unless you did something to put them there.  On my Ubuntu systems, I had to add all of my Windows machines that have web servers to my 'hosts' file to connect to them by name.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 28

Accepted Solution

by:
serialband earned 500 total points
ID: 39990725
There are some instructions on how to set samba up to resolve Wins.  Maybe the following links can help.  https://www.ibm.com/developerworks/library/l-lpic3-314-2/
http://forums.opensuse.org/showthread.php/454546-nmblookup-resolves-but-cannot-ping-netbios-names-or-ping-FQDN

Those eventually link to the Samba Docs which suggests that you must also edit smb.conf to configure SAMBA to point to the WINS server
Edit these lines in smb.conf
wins support = No
wins server = xxx.xxx.xxx.xxx


Scroll down to the WINS Lookup section in https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/integrate-ms-networks.html#id2586120

You need nmbd to run nmblookup to look up names, but that's independent from ping. http://linuxcommand.org/man_pages/nmblookup1.html
0
 
LVL 62

Expert Comment

by:gheist
ID: 39990806
setting "wins" in nsswitch.conf implies querying nmbd (which can be configured with or without WINS server)
Name itself causes confusion, no wins server is needed to support pinging netbios names.

Why dont you enable DNS auto-registration in your DNS server and rise above archaic useless naming protocols?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39990860
Yes enable DNS auto-reg in your DNS server.

TY/SA
0
 
LVL 9

Author Closing Comment

by:nick2253
ID: 40035148
This didn't actually resolve my issue of getting "ping" to work with NetBIOS names (though it did allow me to get names through nmblookup), but I've since changed my DNS structure in my network, so it's no longer an issue.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
An article on effective troubleshooting
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question