Bv9ARM.ch05.html revision 2aca7f657de7002f8144a322148fa42c0a0c1edd
1633838b8255282d10af15c5c84cee5a51466712Bob Halley<HTML
49dbdb0186eb23d87d685b96eaefa9ec3c71d9b8David Lawrence><HEAD
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence><TITLE
1633838b8255282d10af15c5c84cee5a51466712Bob Halley>The BIND 9 Lightweight Resolver</TITLE
1633838b8255282d10af15c5c84cee5a51466712Bob Halley><META
1633838b8255282d10af15c5c84cee5a51466712Bob HalleyNAME="GENERATOR"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceCONTENT="Modular DocBook HTML Stylesheet Version 1.61
15a44745412679c30a6d022733925af70a38b715David Lawrence"><LINK
15a44745412679c30a6d022733925af70a38b715David LawrenceREL="HOME"
15a44745412679c30a6d022733925af70a38b715David LawrenceTITLE="BIND 9 Administrator Reference Manual"
15a44745412679c30a6d022733925af70a38b715David LawrenceHREF="Bv9ARM.html"><LINK
15a44745412679c30a6d022733925af70a38b715David LawrenceREL="PREVIOUS"
15a44745412679c30a6d022733925af70a38b715David LawrenceTITLE="Advanced Concepts"
15a44745412679c30a6d022733925af70a38b715David LawrenceHREF="Bv9ARM.ch04.html"><LINK
15a44745412679c30a6d022733925af70a38b715David LawrenceREL="NEXT"
1633838b8255282d10af15c5c84cee5a51466712Bob HalleyTITLE="BIND 9 Configuration Reference"
9a4ce0c25809073f31226faa6ed94c70474cf363Bob HalleyHREF="Bv9ARM.ch06.html"></HEAD
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson><BODY
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid LawrenceCLASS="chapter"
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob HalleyBGCOLOR="#FFFFFF"
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob HalleyTEXT="#000000"
9a4ce0c25809073f31226faa6ed94c70474cf363Bob HalleyLINK="#0000FF"
9a4ce0c25809073f31226faa6ed94c70474cf363Bob HalleyVLINK="#840084"
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonALINK="#0000FF"
9a4ce0c25809073f31226faa6ed94c70474cf363Bob Halley><DIV
9c4f33b6718407e94d50dbfb4977e16d3f83de9dDavid LawrenceCLASS="NAVHEADER"
9c4f33b6718407e94d50dbfb4977e16d3f83de9dDavid Lawrence><TABLE
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonWIDTH="100%"
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonBORDER="0"
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonCELLPADDING="0"
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonCELLSPACING="0"
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson><TR
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson><TH
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonCOLSPAN="3"
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonALIGN="center"
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson>BIND 9 Administrator Reference Manual</TH
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson></TR
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson><TR
9afcd92352224325ed65919f69f7f58282fc6623Andreas Gustafsson><TD
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob HalleyWIDTH="10%"
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob HalleyALIGN="left"
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonVALIGN="bottom"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><A
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonHREF="Bv9ARM.ch04.html"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>Prev</A
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington></TD
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><TD
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonWIDTH="80%"
01956482905dd861a9b07d417d469955466b728dDamien NeilALIGN="center"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilVALIGN="bottom"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></TD
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><TD
b2a6ebf1bd4dad1410afba9012a61d87090f03adDamien NeilWIDTH="10%"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilALIGN="right"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilVALIGN="bottom"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><A
b2a6ebf1bd4dad1410afba9012a61d87090f03adDamien NeilHREF="Bv9ARM.ch06.html"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>Next</A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></TD
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></TR
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington></TABLE
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><HR
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilALIGN="LEFT"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilWIDTH="100%"></DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilCLASS="chapter"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><H1
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><A
9afcd92352224325ed65919f69f7f58282fc6623Andreas GustafssonNAME="ch05"
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley>Chapter 5. The <SPAN
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilCLASS="acronym"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>BIND</SPAN
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington> 9 Lightweight Resolver</A
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington></H1
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><DIV
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonCLASS="TOC"
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><DL
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><DT
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><B
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>Table of Contents</B
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington></DT
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><DT
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>5.1. <A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilHREF="Bv9ARM.ch05.html#AEN1050"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>The Lightweight Resolver Library</A
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley></DT
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><DT
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley>5.2. <A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilHREF="Bv9ARM.ch05.html#lwresd"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>Running a Resolver Daemon</A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></DT
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></DL
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilCLASS="sect1"
f671a5c51cc59e266620c0c4026b054908fdd80cBob Halley><H1
e4b9761b0ef03597c35d1ef1d86e12514c621f90Michael GraffCLASS="sect1"
f671a5c51cc59e266620c0c4026b054908fdd80cBob Halley><A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilNAME="AEN1050"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>5.1. The Lightweight Resolver Library</A
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></H1
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><P
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil>Traditionally applications have been linked with a stub resolver
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neillibrary that sends recursive DNS queries to a local caching name
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neilserver.</P
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley><P
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley>IPv6 introduces new complexity into the resolution process,
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halleysuch as following A6 chains and DNAME records, and simultaneous
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neillookup of IPv4 and IPv6 addresses. These are hard or impossible
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halleyto implement in a traditional stub resolver.</P
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><P
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>Instead, <SPAN
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonCLASS="acronym"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>BIND</SPAN
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington> 9 provides resolution services to local clients
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellingtonusing a combination of a lightweight resolver library and a resolver
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellingtondaemon process running on the local host. These communicate using
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellingtona simple UDP-based protocol, the "lightweight resolver protocol"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellingtonthat is distinct from and simpler than the full DNS protocol.</P
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil></DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><DIV
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilCLASS="sect1"
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien Neil><H1
e9453d609db9aed9efd2bb4fd287ff3ad11da0b2Damien NeilCLASS="sect1"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><A
26d20cd51c968e111b4122536825368a17b5ca82Brian WellingtonNAME="lwresd"
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>5.2. Running a Resolver Daemon</A
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington></H1
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington><P
26d20cd51c968e111b4122536825368a17b5ca82Brian Wellington>To use the lightweight resolver interface, the system must
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halleyrun the resolver daemon <B
CLASS="command"
>lwresd</B
>.</P
><P
>By default, applications using the lightweight resolver library will make
UDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The
address can be overriden by <B
CLASS="command"
>lwserver</B
> lines in
<TT
CLASS="filename"
>/etc/resolv.conf</TT
>.
The daemon will try to find the answer to the questions "what are the
addresses for host
<TT
CLASS="literal"
>foo.example.com</TT
>?" and "what are
the names for IPv4 address 10.1.2.3?"</P
><P
>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
>