Originally Published: Monday, 17 April 2000 Author: Chen Chang and Sylvester Smith, Linuxcare
Published to: learn_articles_support/Articles Page: 1/1 - [Printable]

Linuxcare: How To Set Up DNS Services: 3 Part Series (Part 3)

Linuxcare's Chen Chang and Sylvester Smith, have taken the time to write a 3 part series on DNS Services. Part one essentially set the stage for how one sets up a DNS server for your LAN. Part two discussed server configuration and part three profiled this week, wraps up the series with client configuration.

   Page 1 of 1  

Part 3: Client Configuration

Now that we have set up our DNS server, it's time to configure the other hosts on the network to use its name service. The client portion of BIND, the resolver, is very easy to configure. The configuration is done in the file /etc/resolv.conf.

To configure the hosts to direct their name server queries to the name server, helio, simply requires the following in: /etc/resolv.conf

search gracie.edu nameserver 192.168.1.1

The first line defines how the resolver will form its queries when they are not Fully Qualified Domain Names (FQDN). For example, if we queried for the name rickson, the resolver will append .gracie.edu to our query so that it ends up sending a fully qualified domain name, rickson.gracie.edu to the DNS server.

The second line defines which DNS server the queries should be directed to. In our case, we have configured helio.gracie.edu to be the DNS server, so we define the nameserver parameter to be its IP address, 192.168.1.1.

After these changes are made to the /etc/resolv.conf of the hosts on the network, we should now be able to query the DNS server, helio, for both name to IP address resolution and IP address to name resolution. To test name resolution, we can use the following command:

$ nslookup rickson

The output of this command will include the name of the DNS server which performed the name service and the result of the name resolution:

 
Server:  helio.gracie.edu
Address:  192.168.1.1
Name:    rickson.gracie.edu
Address:  192.168.1.2
To test IP address resolution, we can use this command: $ nslookup 192.168.1.2

The output of this command indicates the name server which performed the service, and the result of the IP address resolution:

Server:  helio.gracie.edu
Address:  192.168.1.1
Name:    rickson.gracie.edu
Address:  192.168.1.2

Future Changes:

With the DNS server in place, any future additions or removal of hosts on the network would simply require updating the zone file, /var/named/gracie.hosts, and the reverse zone file, /var/named/192.168.1.reverse, on the DNS server. No changes are needed on the clients.

References:

TCP/IP Administration - Craig Hunt DNS and BIND - O'Reilly


Chen Chang studied Integrative Biology at UC Berkeley and later parlayed his scientific talents toward Linux. When he's not training the masses at Linuxcare University, he can be seen rollerblading with his two dogs, Tabitha and Cleo, practicing Portuguese or becoming a master in Brazilian jiu-jitsu.

His "Power Tips" column appears every Monday at linux.com. Send your questions and comments to powertips@linuxcare.com.





   Page 1 of 1