Resolvers

The term resolver can be used both as a generic term to describe any software entity that resolves names to IPs or more specifically to define a set of functions supplied as part of the standard C network/socket libraries (i.e. glibc6 in *nix systems) or supplied as part of a package (e.g. BIND). These functions are used by applications to answer questions such as 'what is the IP address of this host'. The most common method to invoke such resolver services, used by your browser among many other applications, is to use the POSIX socket functions 'gethostbyname' (or 'getaddrinfo' for sock2) for name to IP and 'gethostbyaddr' (replaced by 'getnameinfo' in sock2) for IP to name.

Resolvers are quite complicated and are defined to be capable of following referrals (they can work with systems that do not support recursive queries. However almost all resolvers (both Windows and *nix) are stub resolvers. A stub resolver is a minimal resolver which will only work with a DNS that does support recursive queries, specifically stub-resolvers cannot follow referrals. Some newer Windows systems (Windows 2K and XP) provide what is called a caching resolver. This resolver is a stub resolver but does maintain a cache of responses to minimize network access and increase performance.

There are a number of ways your system can resolve a name and the actual order will vary based on your configuration:

  1. If you are using a *nix system with the GNU glibc libraries the order of lookup is determined by the 'hosts' entry in the /etc/nsswitch.conf file which will read something like:

    hosts files nisplus dns

    Indicating look at /etc/hosts, then use NIS (Network Information Systems), then DNS (via resolv.conf)
  2. If you are using a *nix system with the older GNU libc libraries the order of lookup is determined by the 'order' entry in the /etc/host.conf file which will read something like:

    order hosts,bind

    Indicating look at /etc/hosts then DNS (using resolv.conf)
  3. If you are using a windows system the order is:
    1. look in hosts (windows\system32\drivers\etc\hosts)
    2. use the DNS entries in the tcp/ip network definition.
  4. FreeBSD does not install /etc/nsswitch.conf (prior to 5.x releases) by default so NIS assumes a resolution order as if the following 'hosts' line was present in nsswitch.conf:

    hosts dns files

    Which means use DNS (via resolve.conf) then /etc/hosts.

If you want to know more about resolvers on *nix systems read Chapter 6 from the Linux Network Administrators Guide.

Pro DNS and BIND by Ron Aitchison

Contents

tech info
guides home
dns articles
intro
contents
1 objectives
big picture
2 concepts
3 reverse map
4 dns types
quickstart
5 install bind
6 samples
reference
7 named.conf
8 dns records
operations
9 howtos
10 tools
11 trouble
programming
12 bind api's
security
13 dns security
bits & bytes
15 messages
resources
notes & tips
registration FAQ
dns resources
dns rfc's
change log

printer friendly

Print Page

SPF Record Conformant Domain Logo

Copyright © 1994 - 2009 ZyTrax, Inc.
All rights reserved. Legal and Privacy
site by zytrax
Hosted by super.net.sg
web-master at zytrax
Page modified: June 21 2007.