old-www/LDP/nag/node89.html

142 lines
6.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-c (Feb 29, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Writing the Master Files</TITLE>
</HEAD>
<BODY LANG="EN">
<A HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <BR>
<B> Next:</B> <A HREF="node90.html">Verifying the Name Server </A>
<B>Up:</B> <A HREF="node86.html">Running named</A>
<B> Previous:</B> <A HREF="node88.html">The DNS Database Files</A>
<BR> <P>
<H2><A NAME="SECTION008230000">Writing the Master Files</A></H2>
Figures-<A HREF="node89.html#resolvfignamedcache"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif"></A>, <A HREF="node89.html#resolvfignamedhosts"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif"></A>,
<A HREF="node89.html#resolvfignamedlocal"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif"></A>, and <A HREF="node89.html#resolvfignamedrev"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif"></A> give sample
files for a name server at the brewery, located on vlager. Owing
to the nature of the network discussed (a single LAN), the example is
pretty straightforward. If your requirements are more complex, and you
can't get named going, get ``DNS and BIND'' by Cricket Liu and
Paul Albitz ([<A HREF="#liudns"></A>]).
<P>
The named.ca cache file shown in figure-<A HREF="node89.html#resolvfignamedcache"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif"></A>
shows sample hint records for a root name server. A typical cache file
usually describes about a dozen name servers, or so. You can obtain the
current list of name servers for the root domain using the nslookup
tool described toward the end of this chapter.<A HREF="footnode.html#3697"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>
<P>
<STRONG>Figure:</STRONG>
<A NAME="resolvfignamedcache"></A>
<A NAME="3698"></A>
The named.ca file.
<pre>
;
; /var/named/named.ca Cache file for the brewery.
; We're not on the Internet, so we don't need
; any root servers. To activate these
; records, remove the semicolons.
;
; . 99999999 IN NS NS.NIC.DDN.MIL
; NS.NIC.DDN.MIL 99999999 IN A 26.3.0.103
; . 99999999 IN NS NS.NASA.GOV
; NS.NASA.GOV 99999999 IN A 128.102.16.10
</pre>
<P><A NAME="3699"></A><BR>
<STRONG>Figure:</STRONG>
<A NAME="resolvfignamedhosts"></A>
The named.hosts file.
<pre>
;
; /var/named/named.hosts Local hosts at the brewery
; Origin is vbrew.com
;
@ IN SOA vlager.vbrew.com. (
janet.vbrew.com.
16 ; serial
86400 ; refresh: once per day
3600 ; retry: one hour
3600000 ; expire: 42 days
604800 ; minimum: 1 week
)
IN NS vlager.vbrew.com.
;
; local mail is distributed on vlager
IN MX 10 vlager
;
; loopback address
localhost. IN A 127.0.0.1
; brewery Ethernet
vlager IN A 191.72.1.1
vlager-if1 IN CNAME vlager
; vlager is also news server
news IN CNAME vlager
vstout IN A 191.72.1.2
vale IN A 191.72.1.3
; winery Ethernet
vlager-if2 IN A 191.72.2.1
vbardolino IN A 191.72.2.2
vchianti IN A 191.72.2.3
vbeaujolais IN A 191.72.2.4
</pre>
<P>
<P><A NAME="3700"></A><BR>
<STRONG>Figure:</STRONG>
<A NAME="resolvfignamedlocal"></A>
The named.local file.
<pre>
;
; /var/named/named.local Reverse mapping of 127.0.0
; Origin is 0.0.127.in-addr.arpa.
;
@ IN SOA vlager.vbrew.com. (
joe.vbrew.com.
1 ; serial
360000 ; refresh: 100 hrs
3600 ; retry: one hour
3600000 ; expire: 42 days
360000 ; minimum: 100 hrs
)
IN NS vlager.vbrew.com.
1 IN PTR localhost.
</pre>
<P><A NAME="3701"></A><BR>
<STRONG>Figure:</STRONG>
<A NAME="resolvfignamedrev">The named.rev file</A>
<pre>
;
; /var/named/named.rev Reverse mapping of our IP addresses
; Origin is 72.191.in-addr.arpa.
;
@ IN SOA vlager.vbrew.com. (
joe.vbrew.com.
16 ; serial
86400 ; refresh: once per day
3600 ; retry: one hour
3600000 ; expire: 42 days
604800 ; minimum: 1 week
)
IN NS vlager.vbrew.com.
; brewery
1.1 IN PTR vlager.vbrew.com.
2.1 IN PTR vstout.vbrew.com.
3.1 IN PTR vale.vbrew.com.
; winery
1.2 IN PTR vlager-if1.vbrew.com.
2.2 IN PTR vbardolino.vbrew.com.
3.2 IN PTR vchianti.vbrew.com.
4.2 IN PTR vbeaujolais.vbrew.com.
</pre>
<HR>
<P><ADDRESS>
<I>Andrew Anderson <BR>
Thu Mar 7 23:22:06 EST 1996</I>
</ADDRESS>
</BODY>
</HTML>