Bv9ARM.ch05.html revision 027e89d47af308db4b41761ca9f847c026b63ec8
70N/A<HTML
70N/A><HEAD
286N/A><TITLE
70N/A>The BIND 9 Lightweight Resolver</TITLE
70N/A><META
70N/ANAME="GENERATOR"
70N/ACONTENT="Modular DocBook HTML Stylesheet Version 1.41"><LINK
70N/AREL="HOME"
70N/AHREF="Bv9ARM.html"><LINK
70N/AREL="PREVIOUS"
70N/ATITLE="Advanced Concepts"
70N/AHREF="Bv9ARM.ch04.html"><LINK
70N/AREL="NEXT"
70N/ATITLE="BIND 9 Configuration Reference"
70N/AHREF="Bv9ARM.ch06.html"></HEAD
70N/A><BODY
70N/ABGCOLOR="#FFFFFF"
70N/ATEXT="#000000"
70N/ALINK="#0000FF"
70N/AVLINK="#840084"
70N/AALINK="#0000FF"
70N/A><DIV
70N/ACLASS="NAVHEADER"
70N/A><TABLE
70N/AWIDTH="100%"
70N/ABORDER="0"
70N/ACELLPADDING="0"
70N/ACELLSPACING="0"
70N/A><TR
70N/A><TH
551N/ACOLSPAN="3"
70N/AALIGN="center"
70N/A></TH
70N/A></TR
359N/A><TR
359N/A><TD
359N/AWIDTH="10%"
98N/AALIGN="left"
551N/AVALIGN="bottom"
321N/A><A
493N/AHREF="Bv9ARM.ch04.html"
321N/A>Prev</A
550N/A></TD
550N/A><TD
213N/AWIDTH="80%"
304N/AALIGN="center"
530N/AVALIGN="bottom"
425N/A></TD
425N/A><TD
325N/AWIDTH="10%"
493N/AALIGN="right"
536N/AVALIGN="bottom"
456N/A><A
320N/AHREF="Bv9ARM.ch06.html"
332N/A>Next</A
501N/A></TD
231N/A></TR
550N/A></TABLE
523N/A><HR
98N/AALIGN="LEFT"
347N/AWIDTH="100%"></DIV
532N/A><DIV
525N/ACLASS="chapter"
463N/A><H1
493N/A><A
425N/ANAME="ch05"
493N/A>Chapter 5. The <SPAN
472N/ACLASS="acronym"
324N/A>BIND</SPAN
347N/A> 9 Lightweight Resolver</A
310N/A></H1
316N/A><DIV
474N/ACLASS="TOC"
290N/A><DL
332N/A><DT
464N/A><B
332N/A>Table of Contents</B
509N/A></DT
332N/A><DT
210N/A>5.1. <A
493N/AHREF="Bv9ARM.ch05.html#AEN989"
128N/A>The Lightweight Resolver Library</A
414N/A></DT
484N/A><DT
326N/A>5.2. <A
493N/AHREF="Bv9ARM.ch05.html#AEN995"
335N/A>Running a Resolver Daemon</A
493N/A></DT
493N/A></DL
425N/A></DIV
370N/A><DIV
70N/ACLASS="sect1"
400N/A><H1
294N/ACLASS="sect1"
435N/A><A
98N/ANAME="AEN989"
434N/A>5.1. The Lightweight Resolver Library</A
505N/A></H1
277N/A><P
433N/A>Traditionally applications have been linked with a stub resolver
546N/Alibrary that sends recursive DNS queries to a local caching name
356N/Aserver.</P
289N/A><P
326N/A>IPv6 introduces new complexity into the resolution process,
439N/Asuch as following A6 chains and DNAME records, and simultaneous
501N/Alookup of IPv4 and IPv6 addresses. These are hard or impossible
469N/Ato implement in a traditional stub resolver.</P
290N/A><P
542N/A>Instead, <SPAN
424N/ACLASS="acronym"
286N/A>BIND</SPAN
543N/A> 9 provides resolution services to local clients
90N/Ausing a combination of a lightweight resolver library and a resolver
475N/Adaemon process running on the local host. These communicate using
535N/Aa simple UDP-based protocol, the "lightweight resolver protocol"
295N/Athat is distinct from and simpler than the full DNS protocol.</P
70N/A></DIV
299N/A><DIV
262N/ACLASS="sect1"
455N/A><H1
539N/ACLASS="sect1"
277N/A><A
332N/ANAME="AEN995"
332N/A>5.2. Running a Resolver Daemon</A
493N/A></H1
70N/A><P
70N/A>To use the lightweight resolver interface, the system must
319N/Arun the resolver daemon <B
280N/ACLASS="command"
319N/A>lwresd</B
359N/A>.</P
493N/A><P
70N/A>Applications using the lightweight resolver library will make
98N/AUDP requests to the IPv4 loopback address (127.0.0.1) on port 921.
98N/A The daemon will try to find the answer to the questions "what are the
414N/Aaddresses for host <SPAN
98N/ACLASS="systemitem"
493N/A>foo.example.com</SPAN
493N/A>?" and "what are
70N/Athe names for IPv4 address 204.152.184.79?"</P
493N/A><P
493N/A>The daemon currently only looks in the DNS, but in the future
493N/Ait may use other sources such as <TT
CLASS="literal"
>/etc/hosts</TT
>,
NIS, etc.</P
><P
>The <B
CLASS="command"
>lwresd</B
> daemon is essentially a stripped-down,
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.
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
></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
>