|Purchase "Deploying Suse Linux Enterprise Server"
Configuring DNS and DHCP
- DNS Server
- DHCP Server
- Dynamic DNS
- DNS & DHCP Reference
One of the most important, but least configured services in a modern network is the DNS Server. A properly configured DNS Server will not only allow you to work with computer names instead of IP addresses, but may speed up your Internet queries and give your network speedy name resolutions which may improve your overall network speed. When dealing with Unix based servers, a properly configured DNS server is a must.
With SUSE Linux (and YaST in particular), it is very easy to build and maintain a DNS server for your network. On most Linux systems, BIND (the DNS Server Software that SLES uses) is configured through a few simple text files, specifically named.conf and a text file for every zone that your server handles. Unfortunately, because of formatting and syntax, these text files can sometimes be very tricky to construct correctly, I have spent many hours mulling over DNS configuration files trying to figure out why BIND won't work.
YaST allows you to graphically enter all the relevant information you need for your zones, then it will actually construct the named.conf file and all your zone files for you. In fact, I think it is so intuitive that I have actually used YaST to construct a few zone files for use on other Linux Distributions. Again, if you want to edit the configuration files yourself, SUSE Linux will let you work that way, but for the non-DNS experts out there, I will show you how to configure just about every aspect of DNS through YaST.
Stepping Through the Wizard
Upon first starting YaST's DNS module, if you haven't installed all the required libraries and programs, YaST may prompt you for the installation CDs/DVD. Once all the software is installed, it will launch a basic "wizard" that will walk you through a very basic DNS setup. All of the options presented during the Wizard are available for modification through YaST's DNS module after the Wizard is ran, so you can adjust any of these options at any time.
The first screen of the Wizard allows you to enter any Forwarders that your DNS server will use. A Forwarder is simply the IP address of a server that handles all external DNS queries for your network. All DNS servers will "cache" all name information it processes and will use that cache to answer any subsequent queries for the same information. Setting a forwarder for your Server will allow a single DNS server to have what is called a "rich cache" on your network, thus limiting the number of queries sent outside of your network.
Basically what happens during a DNS query is that the DNS server will check its records for the answer, then it will check its "cache" for the answer. If it cannot find the answer in it's own cache, if a forwarder list is specified, it will ask the forwarders for the answer. If the forwarders do not provide the answer, then the DNS server will query the root servers to start to look for the answer.
Forwarders do provide some good features, especially if they are located on a higher bandwidth network than the bandwidth you have to the Internet. A common practice is to use your ISPs DNS servers as forwarders.
The second step of the Wizard allows you to create DNS "zones" for your network. DNS zones are the "nuts and bolts" of your server. The information provided by the zones is what makes DNS useful for local queries and provide the correct information over the Internet. Some of you may be thinking that since your local network only uses private IP addresses, setting up a local zone would not make much sense. Well, granted that you will not be providing any information over the Internet, but creating a zone for your local network does have many advantages, especially if you implement DHCP.
In order to use your DNS server for local resolutions it is necessary to create a "Master Zone". Master zones will hold quite a bit of information including a database of computer names to IP Addresses. When you create this zone you will need to name it something, with the "example.com" being the default example. If you have a registered Domain, go ahead and use that name for your Master zone (even if you are not going to open your DNS servers to the Internet). If you don't have a registered Domain you can simply just choose a simple name, in this guide I will use "private.lan".
Along with a specified "Master Zone", you will want to create what is called a "Reverse Name Lookup Zone" that will provide "reverse queries" to your DNS server. What this means is that if you ask your DNS server what computer is at IP Address 10.0.0.216 it will provide you with the FQDN for that computer.
To create a Reverse Name lookup zone, simply create another "Master Zone", but the name of the master zone must be a specified in a certain way, an example is a zone named "1.168.192.in-addr.arpa" for the 192.168.1.X addresses. Later on I will show you how to add actual computer information into these zones, but for now just add the primary DNS zone for your network and a reverse zone and continue on.
The final step of the DNS Wizard allows you to adjust the Firewall, enable LDAP support and modify whether or not the DNS Server will start at boot time. The Firewall and Startup options should be obvious for your network. The LDAP option, however, does require some thought - Basically it comes down to - If you want to utilize the integrated SLES MailServer you MUST enable LDAP support for the DNS Server and have a working LDAP Server (see the installation section). If you do not need the MailServer options then it is up to you whether or not you want to store your DNS records within your LDAP Server or not.
|Purchase "Deploying Suse Linux Enterprise Server"