299 lines
5.6 KiB
HTML
299 lines
5.6 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Name Service and Resolver Configuration</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Checking the ARP Tables"
|
|
HREF="x-087-2-iface.verify.arp.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="The Resolver Library"
|
|
HREF="x-087-2-resolv.library.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-iface.verify.arp.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-resolv.library.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="X-087-2-RESOLV"
|
|
>Chapter 6. Name Service and Resolver Configuration</A
|
|
></H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>6.1. <A
|
|
HREF="x-087-2-resolv.library.html"
|
|
>The Resolver Library</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>6.1.1. <A
|
|
HREF="x-087-2-resolv.library.html#X-087-2-RESOLV.HOST-CONF"
|
|
>The host.conf File</A
|
|
></DT
|
|
><DT
|
|
>6.1.2. <A
|
|
HREF="x-087-2-resolv.library.html#X-087-2-RESOLV.NSSWITCH-CONF"
|
|
>The nsswitch.conf File</A
|
|
></DT
|
|
><DT
|
|
>6.1.3. <A
|
|
HREF="x-087-2-resolv.library.html#X-087-2-RESOLV.RESOLV"
|
|
>Configuring Name Server Lookups Using resolv.conf</A
|
|
></DT
|
|
><DT
|
|
>6.1.4. <A
|
|
HREF="x-087-2-resolv.library.html#X-087-2-RESOLV.ROBUSTNESS"
|
|
>Resolver Robustness</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>6.2. <A
|
|
HREF="x-087-2-resolv.howdnsworks.html"
|
|
>How DNS Works</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>6.2.1. <A
|
|
HREF="x-087-2-resolv.howdnsworks.html#X-087-2-RESOLV.DNS.LOOKUPS"
|
|
>Name Lookups with DNS</A
|
|
></DT
|
|
><DT
|
|
>6.2.2. <A
|
|
HREF="x-087-2-resolv.howdnsworks.html#X-087-2-RESOLV.DNS.AUTH"
|
|
>Types of Name Servers</A
|
|
></DT
|
|
><DT
|
|
>6.2.3. <A
|
|
HREF="x-087-2-resolv.howdnsworks.html#X-087-2-RESOLV.DNS.RECORDS"
|
|
>The DNS Database</A
|
|
></DT
|
|
><DT
|
|
>6.2.4. <A
|
|
HREF="x-087-2-resolv.howdnsworks.html#X-087-2-RESOLV.DNS.IN-ADDR"
|
|
>Reverse Lookups</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>6.3. <A
|
|
HREF="x-087-2-resolv.named.html"
|
|
>Running named</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>6.3.1. <A
|
|
HREF="x-087-2-resolv.named.html#AEN5298"
|
|
>The named.boot File</A
|
|
></DT
|
|
><DT
|
|
>6.3.2. <A
|
|
HREF="x-087-2-resolv.named.html#AEN5408"
|
|
>The BIND 8 host.conf File</A
|
|
></DT
|
|
><DT
|
|
>6.3.3. <A
|
|
HREF="x-087-2-resolv.named.html#AEN5453"
|
|
>The DNS Database Files</A
|
|
></DT
|
|
><DT
|
|
>6.3.4. <A
|
|
HREF="x-087-2-resolv.named.html#X-087-2-RESOLV.NAMED-CACHINGONLY"
|
|
>Caching-only named Configuration</A
|
|
></DT
|
|
><DT
|
|
>6.3.5. <A
|
|
HREF="x-087-2-resolv.named.html#AEN5685"
|
|
>Writing the Master Files</A
|
|
></DT
|
|
><DT
|
|
>6.3.6. <A
|
|
HREF="x-087-2-resolv.named.html#X-087-2-RESOLV.NSLOOKUP"
|
|
>Verifying the Name Server Setup</A
|
|
></DT
|
|
><DT
|
|
>6.3.7. <A
|
|
HREF="x-087-2-resolv.named.html#AEN5795"
|
|
>Other Useful Tools</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><P
|
|
>As we discussed in <A
|
|
HREF="x-087-2-issues.html"
|
|
>Chapter 2</A
|
|
>, TCP/IP networking
|
|
may rely on different schemes to convert names into addresses. The
|
|
simplest way is a host table stored in
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/etc/hosts</TT
|
|
>. This is useful only for small LANs
|
|
that are run by one single administrator and otherwise have no IP
|
|
traffic with the outside world. The format of the
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>hosts</TT
|
|
> file has already been described in <A
|
|
HREF="x-087-2-iface.html"
|
|
>Chapter 5</A
|
|
>.</P
|
|
><P
|
|
> Alternatively, you can use the
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>Berkeley Internet Name Domain service</I
|
|
> (BIND) for
|
|
resolving hostnames to IP addresses. Configuring BIND can be a real
|
|
chore, but once you've done it, you can easily make changes in the
|
|
network topology. On Linux, as on many other Unixish systems, name
|
|
service is provided through a program called
|
|
<B
|
|
CLASS="COMMAND"
|
|
>named</B
|
|
>. At startup, it loads a set of master files
|
|
into its internal cache and waits for queries from remote or local
|
|
user processes. There are different ways to set up BIND, and not all
|
|
require you to run a name server on every host.</P
|
|
><P
|
|
> This chapter can do little more than give a rough sketch of how DNS
|
|
works and how to operate a name server. It should be sufficient if you
|
|
have a small LAN and an Internet uplink. For the most current
|
|
information, you may want to check the documentation contained in the
|
|
BIND source package, which supplies manual pages, release notes, and
|
|
the <I
|
|
CLASS="EMPHASIS"
|
|
>BIND Operator's Guide</I
|
|
> (BOG). Don't let this
|
|
name scare you off; it's actually a very useful document. For a more
|
|
comprehensive coverage of DNS and associated issues, you may find
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>DNS and BIND</I
|
|
> by Paul Albitz and Cricket Liu
|
|
(O'Reilly) a useful reference. DNS questions may be answered in a
|
|
newsgroup called <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>comp.protocols.tcp-ip.domains</SPAN
|
|
>. For
|
|
technical details, the Domain Name System is defined by RFC numbers
|
|
1033, 1034, and 1035.</P
|
|
></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="x-087-2-iface.verify.arp.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-resolv.library.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Checking the ARP Tables</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>The Resolver Library</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |