Enabling Host Name Resolving

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 13.  Connecting to the Internet


Now that we have the correct routes set up, we need to enable host name resolving. The reason for this is that we will almost certainly be connecting to machines that we don't know the IP address forbe it to send mail or view Web pages, for example.

We explained earlier that host name resolving is a function of DNS, so we now need to enable this. There are only two tasks we need to do at this point: The first is to instruct the system to use DNS for host name resolving, and the second is to inform it which nameserver it should use for the lookups.

To do the first, we update the nameservice switch file. Ours was previously set to use "local files" only, so we can now alter it to also use DNS. Since DNS is only used for host name entries, the change is very simple, resulting in only one line being altered:

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

To inform DNS which nameserver to use, we create a file named /etc/resolv.conf (since it's not on the system by default) and add the relevant entriesthe most important being the address of the nameserver. Again, we were provided with the IP address of the nameserver (which will normally be the case):

 xenon# cat /etc/resolv.conf search solarisbootcamp.com nameserver 172.35.63.2 xenon# 

We can have up to three nameserver entries in the resolv.conf file if we wish; as long as we have a route to them, everything will function correctly. For example, using the entry shown below would mean that the first nameserver listed would be used; the second entry is a "backup" in that it is only used should the first one become unreachable:

 xenon# cat /etc/resolv.conf search solarisbootcamp.com nameserver 195.10.132.2 nameserver 172.35.63.2 xenon# 

    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