Before NetBIOS Name Servers (NBNS) came about, name resolution worked entirely by broadcast. If you needed a machine's address, you simply broadcast its name across the network and, in theory, the machine itself would reply. This approach is still possible: anyone looking for a machine named
fred
can still broadcast a query and find out if it exists and what its IP address is. (We use this capability to troubleshoot Samba name services with the
nmblookup
command in Chapter 9,
Troubleshooting Samba.)
As you saw in the first chapter, however, broadcasting - whether it be browsing or name registration and resolution - does not pass easily across multiple subnets. In addition, many broadcasts tend to bog down networks. To solve this problem, Microsoft now provides the Windows Internet Naming Service (WINS), a cross-subnet NBNS, which Samba supports. With it, an administrator can designate a single machine to act as a WINS server, and can then provide each client that requires name resolution the address of the WINS server. Consequently, name registration and resolution requests can be directed to a single machine from any point on the network, instead of broadcast.
WINS and broadcasting are not the only means of name resolution, however. There are actually four mechanisms that can be used with Samba:
Samba can use any or all of these name resolution methods in the order that you specify in the Samba configuration file using the
name
resolve
order
parameter. However, before delving into configuration options, let's discuss the one that you've probably not encountered before: the
LMHOSTS file.