Enabling Resolving

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 16.  Configuring DNS


Everything appears to be working OK with DNS, apart from one thing. We still have to tell the system to use it! This is very easy to do, and we have already carried this out a number of times. Chapter 12, "Naming Services and NIS," contains more details about this.

In short, we enable DNS by updating the name service switch file, /etc/nsswitch.conf. We do this by adding the "dns" token to the "hosts" entry as shown here:

 antimony# grep hosts /etc/nsswitch.conf hosts: files dns antimony# 

Simplewe've added "dns" as the final service so any host name lookups will first try to resolve the host name by looking in the local /etc files before trying DNS. Once we've done this, we should be able to check that it's working using any commands that will force a lookup to occur, such as ping, telnet, ftp, and so forth.

 antimony# ping www.sun.com www.sun.com is alive antimony# 

Note that the above switch file entry assumes the machine is not using any other name service. For example, if the machine was also configured for NIS, the entry would be something similar to that shown below:

 hosts: nis [NOTFOUND=return] files 

This is because NIS includes "DNS forwarding," which means it will automatically forward the request onto DNS if required. This is explained more in Chapter 12, "Naming Services and NIS." Finally, ping appears to be responding OK too, so let's move on and configure all the clients to use DNS.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net