Solved

Ping Windows NetBIOS names from CentOS

Posted on 2014-04-09
7
2,591 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 61

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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 61

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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now