[Samba] Netbios name resolution with DHCP

Buchan Milne bgmilne at cae.co.za
Fri Feb 15 01:02:08 GMT 2002

Hash: SHA1

Robert Wood wrote:
|  >> Note that you then need to have WINS running on one machine (a samba box
| with  "wins support = yes" is fine), and any other machine using nss_wins
| needs to  have a wins server defined in smb.conf "wins server = IP.ADD.RE.SS"
|  Dynamic IP addresses only makes dns (usually not WINS) more complicated (you
|  would probably want to  setup dynamic DNS with bind 9.x and dhcp 3.x - if you
|  do, let me know how, I'm having trouble with this) <<
| Thanks for everyone's help.
| Am I right in thinking that WINS is the Windows way of resolving dynamic IP
| addresses to netbios names?

Not really, WINS is one way of resolving a netbios name to an IP address and the
reverse. The other ways are by lmhosts files and by broadcast (works only in one
subnet). With nss_wins, wins is now available for unix also.

| I've installed nss_wins and now I can ping the *Linux* machines on the
| network but not the Windows machines! (I  also had to add wins to the hosts
| section of nsswitch.conf to make it work.)

That should have worked before anyway. If you can't ping your windows machines
by netbios name, and nss_wins is setup correctly, then the chances are that your
windows machines aren't setup for wins. You either need to do this manually on
each machine, or do it by dhcp by adding something like the following to
dhcpd.conf (inside your subnet "stanza":

~        option netbios-name-servers xxx.xxx.xxx.17, xxx.xxx.xxx.87;
~        option netbios-dd-server xxx.xxx.xxx.17, xxx.xxx.xxx.87;
~        option netbios-node-type 4;

| I've added wins support to the smb.conf file on the Red Hat server which
| *isn't* the DHCP server, is that daft? The Smoothwall server is easy to set
| up as the DHCP server, which is why I chose to use that thather than the RH
| machine.

No, as long as the box running wins has a static IP (even if it is by dhcp, but
you would then reserve it's IP based on MAC address).

| So, any ideas why I can ping the Linux machi8nes but not the Windows
| machines?!

You might want to check that you can find the windows machines by wins first,
before you check nss_wins:

nmblookup -U <IP of WINS server> -R <netbios name of machine>

If that works, then nss_wins should work.

- --
|----------------Registered Linux User #182071-----------------|
Buchan Milne                Mechanical Engineer, Network Manager
Cellphone * Work            +27 82 472 2231 * +27 21 8828820x202
Stellenbosch Automotive Engineering         http://www.cae.co.za
GPG Key                       http://ranger.dnsalias.com/gpg.key
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


More information about the samba mailing list