Bv9ARM.ch05.html revision 64fa866a20a871c958f0d9c799a821f9bb7c3357
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal<HTML
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><HEAD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TITLE
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>The BIND 9 Lightweight Resolver</TITLE
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><META
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalNAME="GENERATOR"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCONTENT="Modular DocBook HTML Stylesheet Version 1.41"><LINK
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalREL="HOME"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.html"><LINK
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalREL="PREVIOUS"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalTITLE="Advanced Concepts"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch04.html"><LINK
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalREL="NEXT"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalTITLE="BIND 9 Configuration Reference"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch06.html"></HEAD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><BODY
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalBGCOLOR="#FFFFFF"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalTEXT="#000000"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalLINK="#0000FF"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalVLINK="#840084"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALINK="#0000FF"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="NAVHEADER"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TABLE
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalWIDTH="100%"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalBORDER="0"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCELLPADDING="0"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCELLSPACING="0"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TR
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TH
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCOLSPAN="3"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALIGN="center"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TH
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TR
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TR
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalWIDTH="10%"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALIGN="left"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalVALIGN="bottom"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch04.html"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Prev</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalWIDTH="80%"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALIGN="center"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalVALIGN="bottom"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalWIDTH="10%"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALIGN="right"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalVALIGN="bottom"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch06.html"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Next</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TD
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TR
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></TABLE
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><HR
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalALIGN="LEFT"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalWIDTH="100%"></DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="chapter"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalNAME="ch05"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Chapter 5. The <SPAN
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="acronym"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>BIND</SPAN
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal> 9 Lightweight Resolver</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="TOC"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DL
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Table of Contents</B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>5.1. <A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch05.html#AEN999"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>The Lightweight Resolver Library</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>5.2. <A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalHREF="Bv9ARM.ch05.html#lwresd"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Running a Resolver Daemon</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DL
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="sect1"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="sect1"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalNAME="AEN999"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>5.1. The Lightweight Resolver Library</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Traditionally applications have been linked with a stub resolver
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmallibrary that sends recursive DNS queries to a local caching name
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalserver.</P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>IPv6 introduces new complexity into the resolution process,
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalsuch as following A6 chains and DNAME records, and simultaneous
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmallookup of IPv4 and IPv6 addresses. These are hard or impossible
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalto implement in a traditional stub resolver.</P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>Instead, <SPAN
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="acronym"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>BIND</SPAN
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal> 9 provides resolution services to local clients
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalusing a combination of a lightweight resolver library and a resolver
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmaldaemon process running on the local host. These communicate using
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmala simple UDP-based protocol, the "lightweight resolver protocol"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalthat is distinct from and simpler than the full DNS protocol.</P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><DIV
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="sect1"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="sect1"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalNAME="lwresd"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>5.2. Running a Resolver Daemon</A
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal></H1
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>To use the lightweight resolver interface, the system must
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalrun the resolver daemon <B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="command"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>lwresd</B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>.</P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>By default, applications using the lightweight resolver library will make
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalUDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmaladdress can be overriden by <B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="command"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>lwserver</B
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal> lines in
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal<TT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="filename"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>/etc/resolv.conf</TT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>.
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalThe daemon will try to find the answer to the questions "what are the
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmaladdresses for host
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal<TT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalCLASS="literal"
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>foo.example.com</TT
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>?" and "what are
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmalthe names for IPv4 address 10.1.2.3?"</P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal><P
abcd8fbfef7fa11f0f88aa6966df7b7c2f851fc5ishmal>The daemon currently only looks in the DNS, but in the future
it may use other sources such as <TT
CLASS="filename"
>/etc/hosts</TT
>,
NIS, etc.</P
><P
>The <B
CLASS="command"
>lwresd</B
> daemon is essentially a
caching-only name server that answers requests using the lightweight
resolver protocol rather than the DNS protocol. Because it needs
to run on each host, it is designed to require no or minimal configuration.
Unless configured otherwise, it uses the name servers listed on
<B
CLASS="command"
>nameserver</B
> lines in <TT
CLASS="filename"
>/etc/resolv.conf</TT
>
as forwarders, but is also capable of doing the resolution autonomously if
none are specified.</P
><P
>The <B
CLASS="command"
>lwresd</B
> daemon may also be configured with a
<TT
CLASS="filename"
>named.conf</TT
> style configuration file, in
<TT
CLASS="filename"
>/etc/lwresd.conf</TT
> by default. A name server may also
be configured to act as a lightweight resolver daemon using the
<B
CLASS="command"
>lwres</B
> statement in <TT
CLASS="filename"
>named.conf</TT
>.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="Bv9ARM.ch04.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="Bv9ARM.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="Bv9ARM.ch06.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Advanced Concepts</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><SPAN
CLASS="acronym"
>BIND</SPAN
> 9 Configuration Reference</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>