Setting the DNS server on workstations
If you run a caching DNS server, you will need to make sure your local network PC’s will actually use it. First some general theory. On most operating systems (and this is pretty generally true, given that AFAIK, pretty much all operating systems use ISC’s resolver code), you set a list of DNS servers, that will be tried in order: if the first one fails, the second one is tried, and so on.
.., and configure search lists, too, ...
Also, you can set a search list for domain names. Whenever you enter a domain name, the domain names in the search lists will be appended to it, and each resulting domain name will be tried until one exists. For example, if you have localnet
in your search lists, and you look up the thunderbird
domain name, your operating system will at first do a lookup for thunderbird.localnet
before it tries localnet
. Thus, the search list can be used if you want short names for your local network PCs.
In this case, it is important that the caching DNS server is either authoritative for the domain names in the search list, or has a quick connection to the servers for that domain names: for any query the DNS servers for the domain names in the search list will be queried, so you will want responses to be quick.
... using DHCP
If you assign IP numbers automatically using DHCP, you can give out the IP numbers of your DNS servers with DHCP, too. How to do that depends on your DHCP server software. Using ISC’s DHCP server, which seems the most common one, you should do something like
option domain-name-servers 192.168.10.9, 192.168.10.6;
But then again, given that I’m no DHCP expert and I just copy-pasted this from somewhere else, you should probably check some documentation. Search lists should be configurable in this way, too – you may have luck using the option domain-name
construction.
... on Windows clients
The place to set the DNS server on Windows platforms is in the TCP/IP properties of your netwerk card. How to get there seems to differ from version to version. On Windows 9x versions, you choose the “Network” item in the Control Panel; for Windows NT/XP, you can use the “Network connections” entry. Now, the DNS server can be set in a dialog similar to the following:
By clicking the “Advanced” button, we can also edit the DNS search list by editing the value of the “DNS suffix for this connection” field.
... on Unix clients
On Unix systems, the place to be is the /etc/resolv.conf
file; the following command will give you OS-specific information:
man resolv.conf
In this file, you can place nameserver
commands (to add a DNS server), and search
commands (to add domain names to the search list). For example:
nameserver 192.168.10.9 nameserver 192.168.10.6 search localnet
There are numerous other options available; see the aforementioned manual page for details.