Bv9ARM.ch05.html revision b00bf1140f4f529e70e0ce99d07faa0c8c96d6df
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota<HTML
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><HEAD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TITLE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>The BIND 9 Lightweight Resolver</TITLE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><META
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaNAME="GENERATOR"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaREL="HOME"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaTITLE="BIND 9 Administrator Reference Manual"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.html"><LINK
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaREL="PREVIOUS"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaTITLE="Advanced DNS Features"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.ch04.html"><LINK
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaREL="NEXT"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaTITLE="BIND 9 Configuration Reference"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.ch06.html"></HEAD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><BODY
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCLASS="chapter"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaBGCOLOR="#FFFFFF"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaTEXT="#000000"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaLINK="#0000FF"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaVLINK="#840084"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALINK="#0000FF"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DIV
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCLASS="NAVHEADER"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TABLE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaSUMMARY="Header navigation table"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaWIDTH="100%"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaBORDER="0"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCELLPADDING="0"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCELLSPACING="0"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TR
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TH
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCOLSPAN="3"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALIGN="center"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>BIND 9 Administrator Reference Manual</TH
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></TR
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TR
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaWIDTH="10%"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALIGN="left"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaVALIGN="bottom"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.ch04.html"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaACCESSKEY="P"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>Prev</A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></TD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaWIDTH="80%"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALIGN="center"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaVALIGN="bottom"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></TD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><TD
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaWIDTH="10%"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALIGN="right"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaVALIGN="bottom"
b27516f55237249607f754e6e42e865f12456675agiri><A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.ch06.html"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaACCESSKEY="N"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>Next</A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></TD
b27516f55237249607f754e6e42e865f12456675agiri></TR
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></TABLE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><HR
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaALIGN="LEFT"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaWIDTH="100%"></DIV
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DIV
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCLASS="chapter"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><H1
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaNAME="ch05"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>Chapter 5. The <ACRONYM
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCLASS="acronym"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>BIND</ACRONYM
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota> 9 Lightweight Resolver</H1
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DIV
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaCLASS="TOC"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DL
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DT
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><B
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>Table of Contents</B
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></DT
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota><DT
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>5.1. <A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji OtaHREF="Bv9ARM.ch05.html#AEN1077"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>The Lightweight Resolver Library</A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></DT
b27516f55237249607f754e6e42e865f12456675agiri><DT
b27516f55237249607f754e6e42e865f12456675agiri>5.2. <A
b27516f55237249607f754e6e42e865f12456675agiriHREF="Bv9ARM.ch05.html#lwresd"
b27516f55237249607f754e6e42e865f12456675agiri>Running a Resolver Daemon</A
b27516f55237249607f754e6e42e865f12456675agiri></DT
b27516f55237249607f754e6e42e865f12456675agiri></DL
b27516f55237249607f754e6e42e865f12456675agiri></DIV
b27516f55237249607f754e6e42e865f12456675agiri><DIV
b27516f55237249607f754e6e42e865f12456675agiriCLASS="sect1"
b27516f55237249607f754e6e42e865f12456675agiri><H1
b27516f55237249607f754e6e42e865f12456675agiriCLASS="sect1"
b27516f55237249607f754e6e42e865f12456675agiri><A
b27516f55237249607f754e6e42e865f12456675agiriNAME="AEN1077"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota>5.1. The Lightweight Resolver Library</A
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota></H1
><P
>Traditionally applications have been linked with a stub resolver
library that sends recursive DNS queries to a local caching name
server.</P
><P
>IPv6 once introduced new complexity into the resolution process,
such as following A6 chains and DNAME records, and simultaneous
lookup of IPv4 and IPv6 addresses. Though most of the complexity was
then removed, these are hard or impossible
to implement in a traditional stub resolver.</P
><P
>Instead, <ACRONYM
CLASS="acronym"
>BIND</ACRONYM
> 9 provides resolution services to local clients
using a combination of a lightweight resolver library and a resolver
daemon process running on the local host. These communicate using
a simple UDP-based protocol, the "lightweight resolver protocol"
that is distinct from and simpler than the full DNS protocol.</P
></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="lwresd"
>5.2. Running a Resolver Daemon</A
></H1
><P
>To use the lightweight resolver interface, the system must
run the resolver daemon <B
CLASS="command"
>lwresd</B
> or a local
name server configured with a <B
CLASS="command"
>lwres</B
> statement.</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 overridden by <B
CLASS="command"
>lwserver</B
> lines in
<TT
CLASS="filename"
>/etc/resolv.conf</TT
>.</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 responds to 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
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="Bv9ARM.ch04.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="Bv9ARM.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="Bv9ARM.ch06.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Advanced DNS Features</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><ACRONYM
CLASS="acronym"
>BIND</ACRONYM
> 9 Configuration Reference</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>