Bv9ARM.ch05.html revision 7fca810d8735063703afff4208c8e92cf6b5ca6a
985687b4e080182c1a3a2173df02b94a5b78b24fBob Halley>The BIND 9 Lightweight Resolver</TITLE
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyNAME="GENERATOR"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyCONTENT="Modular DocBook HTML Stylesheet Version 1.61
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyTITLE="BIND 9 Administrator Reference Manual"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyREL="PREVIOUS"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyTITLE="Advanced Concepts"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyTITLE="BIND 9 Configuration Reference"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyCLASS="chapter"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyBGCOLOR="#FFFFFF"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyTEXT="#000000"
904a5734375869ffb504ed8cde6b68cafadb6d64Bob HalleyLINK="#0000FF"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyVLINK="#840084"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyALINK="#0000FF"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyCLASS="NAVHEADER"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyCELLPADDING="0"
ecb6c5782ea248307e86c4bceac6c371d27576a6David LawrenceCELLSPACING="0"
ecb6c5782ea248307e86c4bceac6c371d27576a6David LawrenceALIGN="center"
ecb6c5782ea248307e86c4bceac6c371d27576a6David Lawrence>BIND 9 Administrator Reference Manual</TH
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyVALIGN="bottom"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyALIGN="center"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsVALIGN="bottom"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsALIGN="right"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsVALIGN="bottom"
985687b4e080182c1a3a2173df02b94a5b78b24fBob HalleyCLASS="chapter"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>Chapter 5. The <SPAN
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="acronym"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews> 9 Lightweight Resolver</A
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>Table of Contents</B
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>The Lightweight Resolver Library</A
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>Running a Resolver Daemon</A
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="sect1"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="sect1"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsNAME="AEN1058"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>5.1. The Lightweight Resolver Library</A
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>Traditionally applications have been linked with a stub resolver
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewslibrary that sends recursive DNS queries to a local caching name
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>IPv6 introduces new complexity into the resolution process,
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewssuch as following A6 chains and DNAME records, and simultaneous
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewslookup of IPv4 and IPv6 addresses. These are hard or impossible
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsto implement in a traditional stub resolver.</P
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>Instead, <SPAN
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="acronym"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews> 9 provides resolution services to local clients
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsusing a combination of a lightweight resolver library and a resolver
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsdaemon process running on the local host. These communicate using
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsa simple UDP-based protocol, the "lightweight resolver protocol"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsthat is distinct from and simpler than the full DNS protocol.</P
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="sect1"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="sect1"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsNAME="lwresd"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>5.2. Running a Resolver Daemon</A
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>To use the lightweight resolver interface, the system must
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsrun the resolver daemon <B
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="command"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>By default, applications using the lightweight resolver library will make
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsUDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsaddress can be overriden by <B
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="command"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="filename"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsThe daemon will try to find the answer to the questions "what are the
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsaddresses for host
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="literal"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>?" and "what are
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsthe names for IPv4 address 10.1.2.3?"</P
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>The daemon currently only looks in the DNS, but in the future
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsit may use other sources such as <TT
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="filename"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="command"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews> daemon is essentially a
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewscaching-only name server that answers requests using the lightweight
518be7faab2498c795e6dc9bb25ac10ca38b3a8dMark Andrewsresolver protocol rather than the DNS protocol. Because it needs
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsto run on each host, it is designed to require no or minimal configuration.
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsUnless configured otherwise, it uses the name servers listed on
c1e7aff941dbf40090fec49300e728ad017d4f0cMark AndrewsCLASS="command"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews>nameserver</B
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrews> lines in <TT
52637f592f705ca93fadc218e403fd55e8ce4aeaMark AndrewsCLASS="filename"
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsas forwarders, but is also capable of doing the resolution autonomously if
52637f592f705ca93fadc218e403fd55e8ce4aeaMark Andrewsnone are specified.</P
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark AndrewsCLASS="command"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark Andrews> daemon may also be configured with a
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCLASS="filename"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark Andrews> style configuration file, in
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCLASS="filename"
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark Andrews> by default. A name server may also
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark Andrewsbe configured to act as a lightweight resolver daemon using the
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCLASS="command"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark Andrews> statement in <TT
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCLASS="filename"
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark AndrewsCLASS="NAVFOOTER"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCELLPADDING="0"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsCELLSPACING="0"
1ef8965366d91e02a4672c35a187d30aa4a4c72cMark AndrewsALIGN="center"
d0221bfa6a08f7b284b231886928aa5d8ac87fc2Mark AndrewsALIGN="right"
904a5734375869ffb504ed8cde6b68cafadb6d64Bob Halley>Advanced Concepts</TD