Link to home
Start Free TrialLog in
Avatar of nick2253
nick2253Flag for United States of America

asked on

Ping Windows NetBIOS names from CentOS

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!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

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'.
WINS is not NetBIOS
You need more than samba-common to get netbios names. At least package containing nmbd is needed.
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.
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
Yes enable DNS auto-reg in your DNS server.

TY/SA
Avatar of nick2253

ASKER

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.