Re: [SLUG] hostname resolution wackiness

From: Ian Blenke (icblenke@nks.net)
Date: Wed Jul 14 2004 - 12:44:19 EDT


Chad Perrin wrote:

> The fact that my Windows machines can talk to each other is actually
> relevant, however. I need my Linux machines to be able to contact the
> Windows machines by hostname. That is one of the things I'm trying to
> accomplish. Thus, the fact that the Windows machines are talking to
> each other means that there's at least some kind of WINS or NetBIOS
> broadcast going on in the network. Additionally, I can resolve by
> hostname from the Linux boxen when using nmblookup. It's ping that's
> falling flat on its face, along with some other (more actually useful
> for reasons other than diagnostics) utilities/applications.

DOS / Windows 98 / NT4 use NetBIOS name broadcasts to "register"
Windows 2000/XP/2003 "Active Directory" registers using Dynamic DNS

> The reason I need dynamic IPs involves the fact that computers tend to
> enter and leave this network regularly. This network, among other
> things, must accomodate the computers of clients when they're being
> worked on. It would be nice, from time to time, to be able to contact
> said comeputers from a Linux machine without having to change the
> network configuration on each Linux machine when I connect the
> computer to the network. I'd rather do it "right".

Doing it right would entail, either:
1. Using an NSS plugin that allows your Linux box to resolve via NetBIOS
2. Setting up BIND with Dynamic DNS enabled for your Win2k machines to
register with.

Sure, you could do both.

> It seems that if Samba can handle resolution of NetBIOS names using
> nmblookup, I should be able to get name resolution through other
> utilities like ping as well. It might be "easier" to use fixed IPs,
> but that would neuter the network's effectiveness for my purposes. In
> other words, that's a non-solution in this case.

Samba is an application. It has no inherent hooks into the underlying OS
to provide services. With Samba, you are running a "server" that can
talk to the legacy Microsoft SMB/CIFS world (nmbd does NetBIOS naming,
smbd talks the SMB/CIFS filesharing protocols).

You could, for example, turn off all microsoft filesharing and naming on
a Windows box and run Samba under Cygwin for example - Windows would
gain no advantage of Samba running as a server (you would not be able to
lookup NetBIOS names under Windows).

Linux has standard subsystems to handle things in a modular way:
- PAM (Pluggable Authentication Module) is used to allow a standard way
to extend communication to various authentication servers
- NSS (Name Services Switch) is used to allow a standard way of
extending name and other system database information lookups

What you need is a NSS plugin like libnss_wins (as Larry suggested),
libnss_ldap (if you use Active Directory), or something else that will
allow you to access a directory service somewhere on your network where
clients register their names.

I hope this helps clarify things a bit.

- Ian

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:27:12 EDT