tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: DNS lookup order
@ 1999-06-02 19:33 A. Mahendra Rajah, Systems Manager
  0 siblings, 0 replies; only message in thread
From: A. Mahendra Rajah, Systems Manager @ 1999-06-02 19:33 UTC (permalink / raw)
  To: tru64-unix-managers

                    
   I asked in this list the following 2 questions:

   1.  How to make sure that all nameserver lookups will consult the 
       /etc/hosts file first, and
   2.  Why only the first server listed in /etc/resolv.conf file is
       contacted for nameserver lookups.

   I received 4 replies. My sincere thanks to:

        Mike Iglesias <iglesias@draco.acs.uci.edu>
        "John F. Marten" <root@tigger.oslc.org>
        wmills@WellsFargo.COM
        Gary Gladney <gladney@stsci.edu>

   Mike answered question #2:

       That is the way it works.  The first nameserver is consulted, and
       if it is not available, the others are tried in the order given in 
       /etc/resolv.conf.  If the first nameserver cannot properly resolve 
       names, it should not be used.


   For question #1:

   John wrote:

       i'm not sure DU looks at /etc/hosts anymore although i keep mine
       around just in case ;>) . anyway make sure your hosts/servers are
       listed in the /etc/namedb/hosts.db file.

   Gary wrote:

       You have the setup right.  If you are using nslookup to check,
       you will notice that nslookup only uses DNS.  It's a DNS tool,
       don't mean to sound ignorant.  Try using telnet instead and
       change the address of a host in your hosts file and see if it
       still works.

   wmills wrote:

       Is it possible that your hosts file is somehow corrupt? That
       would be my first guess. 

   Gsry's answer hit it on the nail. Nameserver lookups use DNS and
   hence _will_ go to a nameserver. But, telnet, ping, et al will 
   happily consult the /etc/hosts file first.
       
   What was my problem? I have several short-form names in /etc/hosts
   file for the hosts that are not listed in the DNS tables. These
   names should be separated by spaces and not commas as I had. 
   
        ###.###.###.###   host.domain        host1,host2,host3

   is INcorrect.

        ###.###.###.###   host.domain        host1 host2 host3

   is correct and it works.

   Cheers and thanks to the four kind persons who answered my query.



   -- mahendra
.........................................................................
   A. Mahendra Rajah                  Email: Mahendra@Meena.CC.URegina.CA
   VMS & DUNIX Systems Manager        Phone:               (306) 585-4496
   Dept. of Computing Services        FAX:                 (306) 585-5060
   University of Regina,
   Regina, Sask., S4S 0A2
   Canada.
.........................................................................

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-02 19:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-02 19:33 Summary: DNS lookup order A. Mahendra Rajah, Systems Manager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox