[comp.protocols.tcp-ip] Resolver implementation

ELINSKY@YKTVMZ.BITNET ("Jay Elinsky") (01/16/90)

I'm posting this for someone who has read-only access to this list.  He
asks that you post comments to the list.

 I know of two different methods for implementing a resolver, which are
 described below.  I'd like to hear comments on which is preferred
 because of usability, and any problems with either of the schemes.

 Both require a RESOLV.CONF file that contain the standard DOMAIN
 statement and NAMESERVER statements.

 Example:  DOMAIN WATSON.IBM.COM
           NAMESERVER X.X.X.X

 Method I
 --------
 If the host name does not contain a period, append the domain name
 before sending the name to the resolver.

 Example:  PING YORKTOWN  sends  YORKTOWN.WATSON.IBM.COM  to the resolver.
           PING YORKTOWN.WATSON sends YORKTOWN.WATSON to the resolver.

 Advantages:  Simple to implement, simple to understand, only one
              query is ever sent to the name server.

 Method II
 ---------
 Always append the domain name, and gradually remove the first element
 in the DOMAIN statement trying all possibilities.

 Example:  PING YORKTOWN.WATSON.IBM.COM
 would send to the resolver:   YORKTOWN.WATSON.IBM.COM.WATSON.IBM.COM
                       then:   YORKTOWN.WATSON.IBM.COM.IBM.COM
                       then:   YORKTOWN.WATSON.IBM.COM.COM
                       then:   YORKTOWN.WATSON.IBM.COM  (success)
           PING YORKTOWN.WATSON
 would send to the resolver:   YORKTOWN.WATSON.WATSON.IBM.COM
                       then:   YORKTOWN.WATSON.IBM.COM  (success)

 Advantages:  A user could specify part of his domain (like
              YORKTOWN.WATSON), provided that part was in their domain
              tree.

 Disadvantages:  Complicated, the Hosts Requirements RFC says that if
                 this method is implemented that a method must be provided
                 to turn it off, and that all negative queries must be
                 cached to prevent further negative traffic to the DNS.


 Has anybody successfully implemented Method II?  And if so, what kind
 of user feedback have you gotten?

 Daniel M. Barton
 TCP/IP Development
 IBM Corporation
 Research Triangle Park, NC

08071TCP@MSU.BITNET (Doug Nelson) (01/17/90)

> I know of two different methods for implementing a resolver, which are
> described below.  I'd like to hear comments on which is preferred
> because of usability, and any problems with either of the schemes.
>
> Method I
> --------
> If the host name does not contain a period, append the domain name
> before sending the name to the resolver.
>
> Method II
> ---------
> Always append the domain name, and gradually remove the first element
> in the DOMAIN statement trying all possibilities.
>
> Has anybody successfully implemented Method II?  And if so, what kind
> of user feedback have you gotten?

I have edited out the examples from Dan's comments above.

We don't use method II, but my biggest concern with it is the potential
for false hits, or the potential for hiding a domain name.  For example,
say I have a "com" (e.g. Communications) department.  And say they name
their Big Blue system "ibm" (for lack of creativity or whatever).  Its
full host name is thus "ibm.com.msu.edu".  Now what happens when a
reference is made to "ibm.com"?  Should this be my local system, or the
top-level entry for your company?  I think it has to be the latter.  In
other words, any name with a dot in it should *always* be tried first as
a fully qualified name prior to appending any portion of the local domain
or domain(s) from the DOMAIN list, or to removing part of the requested
name.  If this were done, I could accept a method II implementation.  I'd
suggest it be controlled by a keyword in the resolv.conf file (ALWAYSAPPEND).

Another method that I have seen is a variation on method II, where dotted
names are always tried as is, but single-part names are tried as in method
II (in domain a.b.c, first try host.a.b.c, then host.b.c, then host.c).
I have aided that process here by the fairly liberal use of CNAMEs - each
host system, and a number of workstations, named as "host.dept.msu.edu",
each have a CNAME entry under "host.msu.edu".

Another useful aid is to place more than one DOMAIN statement in your
resolv.conf file, giving a list of your favorite domains.

Doug Nelson                        nelson@msu.bitnet
Manager of Network Software        nelson@msu.edu
Michigan State University