Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f8eb492b80dedd2f6cd33cf45dfc65b6 > files > 16

howto-text-zh-2006-5mdv2010.0.noarch.rpm


                               DNS HOWTO ¤¤Ä¶ª©

§@ªÌ: Nicolai Langfeldt [1]janl@math.uio.no
ĶªÌ: [2]Asd L. Chen & [3]C.W.Huang

   v1.4.2, 1 January 1998 ½Ķ¤é´Á: 8 January 1998
     _________________________________________________________________

   ¦p¦ó¦¨¬°¤@­ÓºÙ¾ªº¤p«¬ DNS ºÞ²zªÌ¡D
     _________________________________________________________________

1. «e¨¥

     * 1.1 ª©Åv«Å§i
     * 1.2 ·PÁ»P¨D§U
     * 1.3 ÃDÄmÃã

2. ²¤¶

3. ¼È¦s±M¥Î¦WºÙ¦øªA¾¹

     * 3.1 °_©l named

4. ¤@­Ó²³æªº»â°ì

     * 4.1 ¥ý¨Ó¤@ÂI¯Â²z½×
     * 4.2 §Ú­Ì¦Û¤vªº»â°ì
     * 4.3 Ä~Äò²`¤J

5. ¯u¹ê»â°ìªº¨Ò¤l

     * 5.1 /etc/named.boot (©Î /var/named/named.boot)
     * 5.2 /var/named/root.cache
     * 5.3 /var/named/zone/127.0.0
     * 5.4 /var/named/zone/land-5.com
     * 5.5 /var/named/zone/206.6.177

6. ºûÅ@¤u§@

7. Bind version 8

8. ¼·±µ³s½uªº¦Û°Ê³]©w

9. ±`¨£°ÝÃD¸Ñµª

10. ¦p¦ó¦¨¬°¤@­Ó¤j«¬ªº DNS ºÞ²zªÌ
     _________________________________________________________________

1. «e¨¥

   ÃöÁä¦r: DNS, bind, named, dialup, ppp, slip, Internet, domain, name,
   hosts, resolving

1.1 ª©Åv«Å§i

   (C)opyright 1995 Nicolai Langfeldt. Do not modify without amending
   copyright, distribute freely but retain copyright message.
   ¨S¦³­×­qª©ÅvªÌ½Ð¤Å­×§ï¡A¥i¦Û¥Ñ´²§G¦ý¥²¶·«O¯dª©Åv°T®§¡D

1.2 ·PÁ»P¨D§U

   §Ú­n¦VµL¼Æ¦¸¾\Ū³o¥÷¤å¥óªº¯ó½Z¨Ã´£¨Ñ³\¦h¦³¥Î«Øijªº Arnt Gulbrandsen ªí
   ¹F·PÁ¤§·N¡D §Ú¤]­n·PÁ¨º¨Ç±N«Øij±Hµ¹§Úªº¤H¡D

   ³o¥÷¤å¥ó±N¥Ã»·¤£·|¦³§¹¦¨ªº¤@¤Ñ¡A½Ð§â§Aªº°ÝÃD¥H¤Î¦¨¥\ªº¸gÅç±Hµ¹§Ú¡A ³o
   ¥i¥H¨Ï¥¦¦¨¬°¤@¥÷§ó¦nªº»¡©ú¤å¥ó¡D©Ò¥H½Ð§â¿ú¡Aµû½×¥H¤Î/©Î¬O°ÝÃD±Hµ¹ [4]
   janl@ifi.uio.no¡D ¦pªG§A±H«Hµ¹§Ú¨Ã§Æ±æ±o¨ì¦^µª½Ðªí²{°ò¥»ªºÂ§»ª¡A½T©w¦^
   «H¦a§}¬O¥¿½T¦Ó¥B¥i¥H¹B§@ªº¡D ÁÙ¦³¡A¼g«Hµ¹§Ú«e½Ð¥ý¾\Ū [5]FAQ ¤@¸`¡D

   ¦pªG§A·Q½Ķ³o½g HOWTO ½Ð»P§ÚÁpµ¸¡A³o¼Ë§Ú¤~ª¾¹D§Úªº¤å³¹³QÅܦ¨¦óºØ»y¨¥
   :-).

1.3 ÃDÄmÃã

   ÂÔ¥H³o¥÷»¡©ú¤å¥óÄmµ¹ Anne Line Norheim Langfeldt¡DÁöµM¦o¥i¯à¥Ã»·³£¤£·|
   ¾\Ū³o¥÷¤å¥ó¡A¦]¬°¦o¤£¬O³oÃþ«¬ªº¤k«Ä¡D

2. ²¤¶

   ³o¬O¤°»ò¥H¤Î³o¤£¬O¤°»ò

   ­º¥ý¡ADNS ´N¬O»â°ì¦WºÙ¨t²Î(Domain Name System)¡D ¬°¾÷¾¹©R¦Wªº³W«h¥H¤Î
   ±N³o¨Ç¦WºÙÂà´«¬° IP ¼Æ¦rªº³nÅé¡D ³o¥÷ HOWTO ¤å¥ó»¡©ú¤F¦p¦ó¥Î Linux ©w
   ¸q³o¼Ëªº¹ïÀ³¡D ¹ïÀ³«üªº¬O³o¨â¥ó¨ÆªºÁpô¡A¾÷¾¹¦WºÙ¡A¹³ ftp.linux.org¡A
   ¥H¤Î¾÷¾¹ªº IP ¼Æ¦r¡A¹³¬O 199.249.150.4¡D

   DNS¡A¹ï·s¤â(§A¡F¡Ð)¦Ó¨¥¡A¬Oºô¸ôºÞ²z¤¤¤ñ¸û±â·t¤£©úªº¦a¤è¤§¤@¡D ³o¥÷»¡©ú
   ¤å¥ó±N·|¸ÕµÛÅý´X¥ó¨Æ±¡¯à²M·¡¤@ÂI¡D¥¦´y­z¦p¦ó³]¥ß¤@­Ó²³æªº DNS ¦WºÙ¦ø
   ªA¾¹¡D ¶}©l¥ý»¡©ú¼È¦s±M¥Î(caching only)¦øªA¾¹¡AµM«á¬O¬°¤@»â°ì³]¥ß¥D
   ­n(primary)¦WºÙ¦øªA¾¹¡D ¦Ü©ó§ó½ÆÂøªº³]©w§A¥i¥H°Ñ¦Ò³o¥÷¤å¥óªº [6]FAQ ¤@
   ¸`¡D ¤£¥Î»¡§A±N±o¾\Ū¯u¥¿ªº¤å¥ó¡D §Ú±N·|¦b [7]³Ì«á¤@³¹ ¦^¹LÀY¨Ó»¡©ú³o
   ¸Ì©Ò¿×¯u¥¿ªº¤å¥ó¥]§t¦³­þ¨Ç¡D

   ¦b§A¥i¥H¶}©l¶i¦æ³o¶µ¤u§@¤§«e§AÀ³¸Ó­n¥ý°t¸m¦n§Aªº¾÷¾¹¥H«K¥i¥H±q»·ºÝñ¤J
   ¥¦¥H¤Î¥Ñ¥¦¹ï¨ä¥¦¾÷¾¹§@»·ºÝñ¤J¡A ¨Ã¥B¨Ï©Ò¦³¦UºØ¹ïºô¸ôªº³s½u³£¯à¦¨¥\¦a
   ¶i¦æ¡A¤×¨ä§AÀ³¸Ó­n¯à°÷¹ï 127.0.0.1 ¶i¦æ»·ºÝñ¤J¨Ã¥B¶i¤J§A¦Û¤vªº³o¥x¾÷
   ¾¹(²{¦b´N¸Õ¸Õ!)¡D ¦P®É§A¤]»Ý­n¤@¥÷¹B§@¨}¦nªº /etc/host.conf,
   /etc/resolv.conf ¥H¤Î /etc/hosts Àɮק@¬°¶}©l¡D ¦]¬°§Ú±N¤£·|¦b³o¸Ì¸ÑÄÀ
   ¥¦­Ìªº¥\¯à¡D¦pªG§AÁÙ¨S¦³§¹¦¨©Ò¦³³o¨Ç³]©w¨Ã¨Ï¨ä¹B§@¨º»ò the
   networking/NET-2 HOWTO ·|¸ÑÄÀ¦p¦ó³]¥ß¥¦­Ì¡D¾\Ū¤§¡D

   ¦pªG§A¨Ï¥Î SLIP ©ÎªÌ¬O PPP ¨º»ò§A±o­n¯àÅý¥¦¹B§@¡D­Y¬O¥¦ÁÙ¤£¯à¹B§@ªº¸Ü
   ¾\Ū [8]PPP HOWTO¡D

   ·í§Ú»¡¡¥§Aªº¾÷¾¹¡¦®É§Úªº·N«ä¬O§A¥¿­n¹Á¸Õ¦b¤W­±³]¥ß DNS ªº¨º¥x¾÷¾¹¡D ¤£
   ¬O¥ô¦ó¥i¯à¦b§Aºô¸ôÀô¹Ò¸Ìªº¨ä¥¦¾÷¾¹¡D

   §Ú°²³]§A¨Ã¤£¬O³B©ó¥ô¦ó·|ªýê¦WºÙ¬d¸ßªº¨¾¤õÀð«á­±¡D¦pªG§A¬O¨º»ò§A±N·|»Ý
   ­n¯S§Oªº³]©w¡A °Ñ¨£ [9]FAQ ¤@¸`¡D

   ¦b Unix ¤Wªº¦WºÙªA°È¬OÂǥѤ@¤äºÙ¬° named ªºµ{¦¡¨Ó°õ¦æªº¡D ³o¬OÄÝ©ó
   bind ®M¥óªº¤@³¡¥÷¡A³o­Ó®M¥ó¬O¥Ñ Paul Vixie ¬°ºô»Úºô¸ô³nÅ鶰¹Î(Internet
   Software Consortium)©Ò¨ó½Õµo®iªº¡D ¤j³¡¤Àªº Linux µo¦æ®M¥ó³£¥]§t¦³
   named¡A¦Ó¥B³q±`¦w¸Ë©ó /usr/sbin/named¡D ¦pªG§Aªº¨t²Î¦³­Ó named ¨º»ò§A
   ¤j·§¥i¥Hª½±µ¨Ï¥Î¥¦¡F¦pªG¨S¦³ªº¸Ü¨º»ò§A¥i¥H±q¬Y­Ó Linux ftp ¯¸¨ú¦^¤@¥÷
   ¤G¶i¦ì°õ¦æÀÉ¡A©Î¬O±q [10]ftp.isc.org:/isc/bind/src/cur/ ¥Ø¿ý¸Ì¨ú±o³Ì·s
   ³Ì´Îªº­ì©lµ{¦¡½X¡D ¥»¤å¥ó¬O»¡©ú bind version 4 ªº¡D¦pªG§A¦w¸Ë version
   8 §A­n¦Û¤v·Q¿ìªk¡Dµy«á¦³¤@¸`¥i¯à·|¹ï§A¦³¨ÇÀ°§U¡D

   DNS ¬O­Ó¥H¾ã­Óºô¸ô¬°½d³òªº(net-wide)¸ê®Æ®w¡D­n¤p¤ß§A©ñ¶i¸Ì­±ªº¸ê®Æ¡D
   ¦pªG§A©ñ¨Ç¼oª«¶i¥h¡A§A¡A¥H¤Î¨ä¥¦¤H³£±N·|±q¤¤¨ú¥X¨Ç¼oª«¡D «O«ù§A DNS ªº
   ¾ã»ô¤@­P¨º»ò§A±N¯à±q¤¤¨ú±o¨}¦nªºªA°È¡D ¾Ç²ß¥h¨Ï¥Î¥¦¡AºÞ²z¥¦¡A°l¬d¥¦ªº
   ¿ù»~¨º»ò§A±N·|¬O¥t¤@­Ó«O«ùºô¸ô§K©ó¦]¬°ºÞ²z¤£µ½¦Ó®Ä²v§C¸¨ªº¦nºÞ²zªÌ¡D

   ¦b³o¥÷¤å¥ó¸Ì§ÚÂ_µM¦a±Ô­z´X¥ó¨Ã¤£§¹¥þ¬O¯u¹êªº¨Æ±¡(ÁöµM¥¦­Ì¦Ü¤Ö¦³¤@¥b¬O
   ¯uªº)¡D ³o¥þ³£¬O¬°¤F²¤Æ¡D¦pªG§A¬Û«H§Ú©Ò»¡ªº¨º»ò³o¨Ç¤j·§´N¯à¹B§@¡D

   ­n³Z: ¦pªG§A¤w¸g¾Ö¦³§Ú­n§A¥h§ïÅܪºÀɮסA¨º»ò©Ò¦³³o¨ÇÀɮ׳£­n¥ý°µ³Æ¥÷¡A
   ³o¼Ë¤@¨Ó¦pªG¸g¾ú³o¨Ç§ïÅܤ§«á¨S¦³ªF¦è·|°Êªº¸Ü§A¥i¥H¦^´_¨ì§Aªº¡A¥i¥H¹B
   §@ªº±¡§Î¡D

3. ¼È¦s±M¥Î¦WºÙ¦øªA¾¹

   DNS °t¸mªº­ººØ¹Á¸Õ¡A¹ï¼·±µ¨Ï¥ÎªÌ«D±`¦³¥Î¡D

   ¤@¥x¼È¦s±M¥Î¦WºÙ¦øªA¾¹±N·|¬°¦WºÙ¬d¸ß§ä¥Xµª®×¨Ã¥B¦b¤U¤@¦¸§A»Ý­n¨º­Ó¦WºÙ
   ªº®É­Ô°O±oµª®×¡D

   ­º¥ý§A»Ý­n¤@­ÓºÙ¬° /etc/named.boot ªºÀɮסD·í named ±Ò°Ê®É·|Ū¨ú³o­ÓÀÉ
   ®×¡D ¥Ø«e¥¦À³¸Ó³æ¯Â¦a¥]§t:
     _________________________________________________________________

;  Boot file for nicolais caching name server
;
directory /var/named
;
; type          domain                          source file or host
cache           .                               root.cache
primary         0.0.127.in-addr.arpa            pz/127.0.0
     _________________________________________________________________

   «D±`­«­n: ¦b³o¤å¥óªº¬Y¨Çª©¥»¤¤³o­ÓÀɮתº³o¥÷¦Cªí·|¦b²Ä¤@­Ó«DªÅ¥Õ¦r¤¸«e
   ¥]§t¤@¨ÇªÅ®æ©Î tab Áä¡D ³o¨Ç¤£À³¸Ó¥X²{¦bÀɮפ¤¡D¦pªG§A±q³o¥÷ HOWTO °Å
   ¶K¤U¨Ó¡A°O±o§R°£¥ô¦ó«e­±ªºªÅ¥Õ¡D

   `directory' ³o¤@¦æ§i¶D named ¨ì­þ¸Ì¥h§ä´MÀɮסD©Ò¦³¨ä«á©R¦WªºÀɮ׳£±N
   ¬O¬Û¹ï©ó¦¹¥Ø¿ýªº¡D ®Ú¾Ú Linux Àɮרt²Î¼Ð·Ç¥¿½Tªº¥Ø¿ýÀ³¸Ó¬O¦b
   /var/named¡D ¦]¦¹ pz ¬O¦ì©ó /var/named ¤§¤Uªº¡A¤]´N¬O¡A/var/named/pz¡D

   ºÙ¬° /var/named/root.cache ªº³o­ÓÀɮ׬O¦b¦¹©R¦Wªº¡D ³o­Ó
   /var/named/root.cache À³¸Ó¥]§t:
     _________________________________________________________________

 .       518400  NS      D.ROOT-SERVERS.NET.
 .       518400  NS      E.ROOT-SERVERS.NET.
 .       518400  NS      I.ROOT-SERVERS.NET.
 .       518400  NS      F.ROOT-SERVERS.NET.
 .       518400  NS      G.ROOT-SERVERS.NET.
 .       518400  NS      A.ROOT-SERVERS.NET.
 .       518400  NS      H.ROOT-SERVERS.NET.
 .       518400  NS      B.ROOT-SERVERS.NET.
 .       518400  NS      C.ROOT-SERVERS.NET.
;
D.ROOT-SERVERS.NET.     3600000 A       128.8.10.90
E.ROOT-SERVERS.NET.     3600000 A       192.203.230.10
I.ROOT-SERVERS.NET.     3600000 A       192.36.148.17
F.ROOT-SERVERS.NET.     3600000 A       192.5.5.241
G.ROOT-SERVERS.NET.     3600000 A       192.112.36.4
A.ROOT-SERVERS.NET.     3600000 A       198.41.0.4
H.ROOT-SERVERS.NET.     3600000 A       128.63.2.53
B.ROOT-SERVERS.NET.     3600000 A       128.9.0.107
C.ROOT-SERVERS.NET.     3600000 A       192.33.4.12
     _________________________________________________________________

   °O¦í§Ú»¡¹L­n¥h±¼ªÅ¥Õ¦r¤¸!

   ³o­ÓÀÉ®×´y­z¤F¦b³o­Ó¥@¬É¤Wªº®Ú¦WºÙ¦øªA¾¹¡D³o·|ÀH®É¶¡¦Ó§ïÅܨåB¥²¶·¥[¥H
   ºûÅ@¡D ¦p¦ó¯à«O«ù¥¦ÀH®É§ó·s½Ð°Ñ¨£ [11]ºûÅ@½g¡D ¦b named ªº½u¤W¨Ï¥Î¤â¥U
   ¸Ì¦³³o­ÓÀɮתº´y­z¡A¦ý¬O³o¡A¥H§Ú¬Ý¨Ó¡A³Ì¾A¦X¨º¨Ç¤w¸g¤F¸Ñ named ªº¤H­Ì
   ¡D

   ¦b named.boot ¸Ìªº¤U¤@¦æ¬O primary ³o¤@¦æ¡D §Ú±N·|¦bµy«áªº³¹¸`¸Ì¸ÑÄÀ¥¦
   ªº¥Îªk¡A¥Ø«e¥u­n§â¥¦³]¬°¦b pz ¤l¥Ø¿ý¤U¤@­ÓºÙ¬° 127.0.0 ªºÀÉ®×:
     _________________________________________________________________

@               IN      SOA     linux.bogus. hostmaster.linux.bogus. (
                                1       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      ns.linux.bogus.
1                       PTR     localhost.
     _________________________________________________________________

   ±µ¤U¨Ó¡A§A»Ý­n¤@¥÷¬Ý°_¨Ó¹³³o¼Ëªº /etc/resolv.conf ÀÉ®×:
     _________________________________________________________________

search subdomain.your-domain.edu your-domain.edu
nameserver 127.0.0.1
     _________________________________________________________________

   `search' ³o¤@¦æ«ü¥X¹ï©ó¥ô¦ó§A·Q³s©¹ªº¥D¾÷¦WºÙÀ³¸Ó·j´Mªº»â°ì¡D
   `nameserver' ³o¤@¦æ«ü¥X§Aªº¾÷¾¹¥i¥H¦b­þ­Ó¦ì§}¤W§ä¨ì¤@¥x¦WºÙ¦øªA¾¹¡A ¦b
   ³o­Ó¨Ò¤l¤¤¬O§A¦Û¤vªº³o¥x¾÷¾¹¡A¦]¬°§A¦b¥¦¤W­±°õ¦æ named¡D ¦pªG§A·Q¦C¥X
   ¦n´X­Ó¦WºÙ¦øªA¾¹§â¥¦­Ì³£©ñ¦b¤@¦æ `nameserver' ¸Ì¡A¥ÎªÅ®æ¹j¶}¡D (ª`·N:
   named ±q¤£Åª¨ú³o­ÓÀɮסA¦Ó¬O¨Ï¥Î named ªº¦WºÙ¸Ñµª¾¹·|Ū¨ú¡D)

   ¨Ó»¡©ú¤@¤U³o­ÓÀɮצ³¤°»ò§@¥Î: ¦pªG¬Y­Ó«È¤áºÝ¹Á¸Õ­n§ä´M foo ªº¸Ü¡A ¨º»ò
   ­º¥ý¹Á¸Õªº¬O foo.subdomain.your-domain.edu ³o­Ó¦WºÙ¡A µM«á±µ¤U¨Ó¬O
   foo.your-fomain.edu ³o­Ó¦WºÙ¡A³Ì«á«h¬O foo ³o­Ó¦WºÙ¡D ¦pªG¦³¬Y­Ó«È¤áºÝ
   ¹Á¸Õ­n§ä´M sunsite.unc.edu ªº¸Ü¡A ¨º­º¥ý¹Á¸Õªº¬O
   sunsite.unc.edu.subdomain.your-domain.edu ³o­Ó¦WºÙ(¨S¿ù¡A¥¦¯u²Â! ¤£¹L
   ¥¦´N¬O³o»ò°µ)¡A µM«á±µ¤U¨Ó¬O sunsite.unc.edu.your-domain.edu ³o­Ó¦WºÙ
   ¡A³Ì«á«h·|¬O sunsite.unc.edu ³o­Ó¦WºÙ¡D §A¥i¯à¤£·|·Q©ñ¤Ó¦h»â°ì¨ì
   search ¸Ó¦æ¸Ì¥h¡A·j´M¥¦­Ì·|¦hªá®É¶¡¡D

   ³o­Ó½d¨Ò°²³]§AÄÝ©ó subdomain.your-domain.edu ³o­Ó»â°ì¡A ¨º»ò§Aªº¾÷¾¹¡A
   ¥i¯à·|ºÙ¬° your-machine.subdomain.your-domain.edu¡D ¦b search ³o¦æ¸Ì¤£
   À³¸Ó¥]§t§Aªº TLD (³»¼h»â°ì Top Level Domain¡A¦b³o­Ó¨Ò¤l¤¤¬O edu ³o­Ó»â
   °ì)¡D ¦pªG§A¸g±`»Ý­n³s½u¨ì¦b¥t¥~¤@­Ó»â°ì¸Ìªº¥D¾÷§A»ò§A¥i¥H§â¸Ó»â°ì¹³³o
   ¼Ë¦a¥[¶i search ³o¦æ¸Ì:
     _________________________________________________________________

search subdomain.your-domain.edu your-domain.edu other-domain.com
     _________________________________________________________________

   ¨Ì¦¹Ãþ±À¡D«Ü©úÅ㪺¬O§A±o©ñ¤J¯u¹êªº»â°ì¦WºÙ¨Ó¨ú¥N³o¨Ç¦WºÙ¡D½Ðª`·N¦b»â°ì
   ¦WºÙªº³Ì«á­±¨Ã¨S¦³¥y¸¹ '.'¡D

   ±µ¤U¨Ó¡A®Ú¾Ú§A libc ª©¥»ªº¤£¦P»Ý­n­×¥¿ /etc/nsswitch.conf ©ÎªÌ¬O
   /etc/host.conf ÀɮסD

   /etc/nsswitch.conf

   ³o¬O¤@­Ó«ÜªøªºÀɮסA¥¦«ü¥X¨ì¦ó³B¥h¨ú±o¦UºØ¤£¦Pªº¸ê®Æ«¬ºA¡A±q¤°»òÀɮשÎ
   ¬O¸ê®Æ®w¨ú±o¡D ¥¦ªº³»ºÝ¸g±`·|¥]§t¤@¨Ç¦³¥Îªºµù¸Ñ¡D§ä¥X¥H `hosts:' §@¬°
   ¶}ÀYªº¨º¤@¦æ¡A¥¦À³¸Ó¬O³o¼Ë:
     _________________________________________________________________

hosts:      files dns
     _________________________________________________________________

   ¦pªGÀɮ׸̨S¦³¥H `hosts:' §@¬°¶}ÀYªº¦æ¨º»ò§â¤W­±³o¤@¦æ¥[¤W¥h¡D ¥¦¬O»¡
   µ{¦¡À³¸Ó¥ý¦b /etc/hosts Àɮ׸̧ä´M¡AµM«á®Ú¾Ú resolv.conf ¸ß°Ý DNS¡D

   /etc/host.conf

   ¥¦¥i¯à¥]§t¦³¼Æ¦æ¡A¨ä¤¤À³¸Ó¦³¤@¦æ¥H order §@¬°¶}©l¦Ó¥B¥¦¬Ý°_¨Ó·|¹³³o¼Ë:
     _________________________________________________________________

order hosts,bind
     _________________________________________________________________

   ¦pªGÀɮ׸̨S¦³ `order' ³o¤@¦æªº¸Ü¨º»ò§AÀ³¸Ó¶K¤@¥÷¤W¥h¡D ¥¦§i¶D¥D¾÷¦WºÙ
   ¸ÑªR¨ç¦¡¥ý¦b /etc/hosts ¸Ì§ä´M¡AµM«á¬d°Ý¦WºÙ¦øªA¾¹ (¦b resolv.conf ¸Ì
   §A»¡¦b 127.0.0.1 ³o­Ó¦a¤è)¡D ¦b¤j³¡¤À Linux µo¦æ®M¥ó¤¤³Ì«á³o¨â­ÓÀɮתº
   ¤å¥ó¦b resolv(8) ªº½u¤W¨Ï¥Î¤â¥U¤¤(°õ¦æ `man 8 resolv' §Y¥i)¡D ³o¥÷½u¤W
   ¥Î¤â¥U§Úı±o¥i¬Ý¡A¦Ó¥B¨C­Ó¤H¡A¯S§O¬O DNS ºÞ²zªÌ¡A³£À³¸Ó­n¾\Ū¥¦¡D ²{¦b
   ´N°µ¡A¦pªG§A¹ï§A¦Û¤v»¡"§Úµy«á±N·|¥h°µ"¡A§A±N¥Ã»·¤£·|¥h±µªñ¥¦¡D

3.1 °_©l named

   ³o¨Ç¥þ³¡§¹¦¨«á´N¥i¥H°_©l named ¤F¡D¦pªG§A¨Ï¥Î¼·±µ³s½uªº¸Ü¨º»ò½Ð¥ý³s¤W
   ºô¸ô¡D Áä¤J `ndc start' ¨Ã¥B«ö¤U RETURN Áä¡A¨S¦³¿ï¶µ¡D ¦pªG¥¦¤£¦æªº¸Ü
   ¨º»ò¸ÕµÛ¨Ï¥Î `/usr/sbin/ndc start' ¨Ó¨ú¥N¡D ¦A¤£¦æªº¸Ü½Ð°Ñ¦Ò [12]FAQ
   ¤@¸`¡D ²{¦b§A¥i¥H´ú¸Õ§Aªº³]©w¡D·í§A¦b°_©l named ªº®É­Ô¦pªG§AÆ[¹î¤@¤U (
   ¨Ï¥Î tail -f /var/adm/messages «ü¥O)¨t²Î°O¿ý°T®§ÀÉ®× (³q±`¬OºÙ¬°
   /var/adm/messages ªºÀɮסA¦ý¤]¥i¯à¦b /var/log ¤U¡A©Î¬O¥s syslog ªºÀÉ
   ®×) ¨º»ò§AÀ³¸Ó·|¬Ý¨£¹³¼Ëªº¤@¨ÇªF¦è:

Jun 30 21:50:55 roke named[2258]: starting.  named 4.9.4-REL Sun Jun 30 21:29:0
3 MET DST 1996   janl@roke.slip.ifi.uio.no:/var/tmp/bind/named
Jun 30 21:50:55 roke named[2258]: cache zone "" loaded (serial 0)
Jun 30 21:50:55 roke named[2258]: primary zone "0.0.127.in-addr.arpa" loaded (s
erial 1)

   ¦pªG¦³¥ô¦óÃö©ó¿ù»~ªº°T®§¨º»ò´N¬O¦³­Ó¿ù»~µo¥Í¡A named ±N·|«ü¦W¦³¿ù»~ªº
   ÀÉ®×(§Ú·Q¬O named.boot ¥H¤Î root.cache ¨ä¤¤¤§¤@:-)¡D ±þ±¼ named µ{§Ç¨Ã
   ¦^ÀYÀˬd¨º¨ÇÀɮסD

   ²{¦b¥i¥H¥Î nslookup ¨ÓÀˬd¤@¤U§Aªº¤u§@:

$ nslookup
Default Server:  localhost
Address:  127.0.0.1

>

   ¦pªG³o¬O§A©Ò±o¨ìªº¦^À³¨º»ò¥¦¤w¸g¯à°÷¹B§@¡D§Ú­Ì§Æ±æ¬O³o¼Ë¡D±o¨ì¥ô¦ó¨ä¥¦
   ¦^À³³£½Ð¦^ÀYÀˬd¨C¤@¥ó¨Æ¡D ¨C¤@¦¸§A§ïÅÜ named.boot Àɮפ§«á§A³£±o¨Ï¥Î
   ndc restart ³o­Ó«ü¥O­«·s°_©l named µ{¦¡¡D

   ²{¦b§A¥i¥H¿é¤J¬d¸ß¡D¹Á¸Õ§ä´M¬Y¨Ç¾aªñ§Aªº¾÷¾¹¡Dpat.uio.no Â÷§Ú¤£»·¡A¦b
   Oslo ªº¤j¾Ç¸Ì:

> pat.uio.no
Server:  localhost
Address:  127.0.0.1

Name:    pat.uio.no
Address:  129.240.2.50

   ²{¦b nslookup ­n¨D§Aªº named §ä´M pat.uio.no ³o¥x¾÷¾¹¡D µM«á¥¦(named)
   Ápô¦b§A root.cache Àɮ׸̩ҫü¦Wªº¦WºÙ¦øªA¾÷¾¹¨ä¤¤¤@¥x¡A ¨Ã¥B±q¨º¸Ì¬d
   °Ý¥¦¸Ó¦p¦óÄ~Äò¤U¥h¡D¦b§A¨ú±oµ²ªG¤§«e¥i¯à±oªá¶O¤@ÂI®É¶¡¡A ¦]¬°¥¦·j´M§A
   ¦b /etc/resolv.conf ¸Ì«ü¦Wªº©Ò¦³»â°ì¡D

   ¦pªG§A¦A¸Õ¤@¦¸ªº¸Ü¨º»ò§A±N·|±o¨ì:

> pat.uio.no
Server:  localhost
Address:  127.0.0.1

Non-authoritative answer:
Name:    pat.uio.no
Address:  129.240.2.50

   ª`·N³o¦^§Ú­Ì©Ò±o¨ìªº `Non-authoritative answer:' ³o¤@¦æ¡D ³o¥Nªí named
   ¦¹¦¸¨Ã¥¼¨ìºô¸ô¥~¥h¬d°Ý¡A¨ú¦Ó¥N¤§ªº¬O¦b¥¦ªº¼È¦s°Ï¸Ì§ä´M¨Ã¥B¦b¨º¸Ì§ä¨ìµª
   ®×¡D ¦ý¬O¼È¦sªº¸ê°T¥i¯à·|¹L®É¡D©Ò¥H¥¦ÂÇ¥Ñ `Non-authorative answer:' ¨Ó
   ª¾·|§A¦³³o­Ó(«Ü»´·Lªº)¦MÀI©Ê¦s¦b¡D ·í nslookup »¡³o¬O§A²Ä¤G¦¸¬d°Ý¬Y¥x
   ¥D¾÷®É¡A³o¬O named ¯à¼È¦s¸Ó¶µ¸ê°T¨Ã¥B¥¿±`¹B§@ªº¤@­Ó°T®§¡D §A¥i¥H¨Ï¥Î
   `exit' «ü¥OÂ÷¶} nslookup µ{¦¡¡D

   ¦pªG§A¬O­Ó¼·±µ(ppp, slip) ¨Ï¥ÎªÌ½Ð¾\Ū [13]¼·±µ³s½u±M¸`¡A¸Ì­±¦³¤@¨Çµ¹
   §Aªº«Øij¡D

   ²{¦b§Aª¾¹D¦p¦ó³]¥ß¤@­Ó¯à°÷¼È¦sªº named ¨t²Î¡D¨ÓªM°à°s¡A¤û¥¤¡A©Î¬O¥ô¦ó
   §A³ßÅwªºªF¦è¨Ó¼y¯¬§a¡D

4. ¤@­Ó²³æªº»â°ì

   ¦p¦ó«Ø¥ß§A¦Û¤vªº»â°ì

4.1 ¥ý¨Ó¤@ÂI¯Â²z½×

   ¦b§Ú­Ì¯uªº¶}©l¶i¦æ³o¤@¸`¥H«e§Ú±N·|´£¨Ñ§A¤@¨ÇÃö©ó DNS ¦p¦ó¹B§@ªº²z½×¡D
   ¦Ó§AÀ³¸Ó¾\Ū¥¦¦]¬°³o¹ï§A¦³¯q¡D¦pªG§A¤£¡¥·Q­n¡¦¨º»ò¦Ü¤Ö§A¤]±o«Ü§Ö¦a²¤Åª
   ¤@¤U¡D ·í§A¬Ý¨ìÀ³¸Ó©ñ¶i named.boot Àɮ׸̥hªº¤º®e®É¦A°±¤î³oºØ²¤Åª¤è¦¡
   ¡D

   DNS ¬O¤@­Ó¶¥¼h¦¡ªº¨t²Î¡D¨ä³»ºÝ¼g§@ `.' ¦Ó¨äµo­µ¬° `root' ¡D ¦b . ¤§¤U
   ¦³´X­Ó³»¼h»â°ì(TLDs)¡A³Ìª¾¦Wªº¬O ORG, COM, EDU ¥H¤Î NET ³o´X­Ó¡A¦ý¬OÁÙ
   ¦³§ó¦h¡D

   ¦b´M§ä¤@¥x¾÷¾¹¦WºÙ®É¬d¸ß·|¥H»¼°j¤èªk±q³»ºÝ¶}©l¡D ·í§A·Q­n§ä¥X
   prep.ai.mit.edu ªº¦ì§}®É§Aªº¦WºÙ¦øªA¾¹¥²¶·§ä¨ì­t³d edu ªº¤@¥x¦WºÙ¦øªA
   ¾¹¡D ³o­Ó°ÝÃD¥¦·|¥h¬d°Ý root.cache ÀɮסA¦Ó . ¦øªA¾¹·|µ¹¥¦¤@¥÷ edu ¦ø
   ªA¾¹¦Cªí¡D

$ nslookup
Default Server:  localhost
Address:  127.0.0.1

   ¶}©l¬d°Ý¬Y¥x®Ú¦øªA¾¹¡D

> server c.root-servers.net.
Default Server:  c.root-servers.net
Address:  192.33.4.12

   ³]©w¬d¸ß«¬ºA¬° NS (¦WºÙ¦øªA¾¹°O¿ý name server records)¡D

> set q=ns

   ¬d°ÝÃö©ó edu. ªº¸ê®Æ¡D

> edu.

   µ²§Àªº . ¦b³o¸Ì«D±`­«­n¡A¥¦§i¶D¸Ó¦øªA¾¹§Ú­Ì©Ò¬d°Ýªº edu ¬O¦b . ¤§¤Uªº
   ¨º¤@­Ó¡A ³oµy¯àÁY¤p·j´Mªº½d³ò¡D

edu     nameserver = A.ROOT-SERVERS.NET
edu     nameserver = H.ROOT-SERVERS.NET
edu     nameserver = B.ROOT-SERVERS.NET
edu     nameserver = C.ROOT-SERVERS.NET
edu     nameserver = D.ROOT-SERVERS.NET
edu     nameserver = E.ROOT-SERVERS.NET
edu     nameserver = I.ROOT-SERVERS.NET
edu     nameserver = F.ROOT-SERVERS.NET
edu     nameserver = G.ROOT-SERVERS.NET
A.ROOT-SERVERS.NET      internet address = 198.41.0.4
H.ROOT-SERVERS.NET      internet address = 128.63.2.53
B.ROOT-SERVERS.NET      internet address = 128.9.0.107
C.ROOT-SERVERS.NET      internet address = 192.33.4.12
D.ROOT-SERVERS.NET      internet address = 128.8.10.90
E.ROOT-SERVERS.NET      internet address = 192.203.230.10
I.ROOT-SERVERS.NET      internet address = 192.36.148.17
F.ROOT-SERVERS.NET      internet address = 192.5.5.241
G.ROOT-SERVERS.NET      internet address = 192.112.36.4

   ³o§i¶D§Ú­Ì *.root-servers.net ªA°È edu. »â°ì¡A©Ò¥H§Ú­Ì¥i¥HÂǦ¹Ä~Äò¬d°Ý
   c ¦øªA¾¹¡D ²{¦b§Ú­Ì·Q­nª¾¹D¬O½Ö­t³d¤U¤@¼h mit.edu. ªº»â°ì¦WºÙ:

> mit.edu.
Server:  c.root-servers.net
Address:  192.33.4.12

Non-authoritative answer:
mit.edu nameserver = STRAWB.mit.edu
mit.edu nameserver = W20NS.mit.edu
mit.edu nameserver = BITSY.mit.edu

Authoritative answers can be found from:
STRAWB.mit.edu  internet address = 18.71.0.151
W20NS.mit.edu   internet address = 18.70.0.160
BITSY.mit.edu   internet address = 18.72.0.3

   steawb, w20ns ¥H¤Î bitsy ­t³d mit »â°ì¡A¿ï¾Ü¨ä¤¤¤@­Ó¨Ã¥B¬d¸ß
   ai.mit.edu:

> server W20NS.mit.edu.

   ¥D¾÷¦WºÙ¤£¤À¤j¤p¼g¡A¦ý¬O§Ú¨Ï¥Î·Æ¹«¨Ó°Å¶K©Ò¥H³o¨Ç¸ê®Æ¬O¿Ã¹õªº«þ¨©¡D

Server:  W20NS.mit.edu
Address:  18.70.0.160

> ai.mit.edu.
Server:  W20NS.mit.edu
Address:  18.70.0.160

Non-authoritative answer:
ai.mit.edu      nameserver = WHEATIES.AI.MIT.EDU
ai.mit.edu      nameserver = ALPHA-BITS.AI.MIT.EDU
ai.mit.edu      nameserver = GRAPE-NUTS.AI.MIT.EDU
ai.mit.edu      nameserver = TRIX.AI.MIT.EDU
ai.mit.edu      nameserver = MUESLI.AI.MIT.EDU

Authoritative answers can be found from:
AI.MIT.EDU      nameserver = WHEATIES.AI.MIT.EDU
AI.MIT.EDU      nameserver = ALPHA-BITS.AI.MIT.EDU
AI.MIT.EDU      nameserver = GRAPE-NUTS.AI.MIT.EDU
AI.MIT.EDU      nameserver = TRIX.AI.MIT.EDU
AI.MIT.EDU      nameserver = MUESLI.AI.MIT.EDU
WHEATIES.AI.MIT.EDU     internet address = 128.52.32.13
WHEATIES.AI.MIT.EDU     internet address = 128.52.35.13
ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.37.5
GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.32.4
GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
TRIX.AI.MIT.EDU internet address = 128.52.32.6
TRIX.AI.MIT.EDU internet address = 128.52.38.6
MUESLI.AI.MIT.EDU       internet address = 128.52.32.7
MUESLI.AI.MIT.EDU       internet address = 128.52.39.7

   ©Ò¥H weaties.ai.mit.edu ¬O ai.mit.edu ªº¤@¥x¦WºÙ¦øªA¾¹:

> server WHEATIES.AI.MIT.EDU.
Default Server:  WHEATIES.AI.MIT.EDU
Addresses:  128.52.32.13, 128.52.35.13

   ²{¦b§Ú§ïÅܬd¸ßªº«¬ºA¡A§Ú­Ì¤w¸g§ä¨ì¸Ó¦WºÙ¦øªA¾¹©Ò¥H²{¦b§Ú­Ì±N­n¸ß°Ý
   wheaties Ãö©ó prep.ai.mit.edu ¥¦©Òª¾¹Dªº¥ô¦ó¨Æ±¡¡D

> set q=any
> prep.ai.mit.edu.
Server:  WHEATIES.AI.MIT.EDU
Addresses:  128.52.32.13, 128.52.35.13

prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
prep.ai.mit.edu
        inet address = 18.159.0.42, protocol = tcp
         #21 #23 #25 #79
prep.ai.mit.edu preference = 1, mail exchanger = life.ai.mit.edu
prep.ai.mit.edu internet address = 18.159.0.42
ai.mit.edu      nameserver = alpha-bits.ai.mit.edu
ai.mit.edu      nameserver = wheaties.ai.mit.edu
ai.mit.edu      nameserver = grape-nuts.ai.mit.edu
ai.mit.edu      nameserver = mini-wheats.ai.mit.edu
ai.mit.edu      nameserver = trix.ai.mit.edu
ai.mit.edu      nameserver = muesli.ai.mit.edu
ai.mit.edu      nameserver = count-chocula.ai.mit.edu
ai.mit.edu      nameserver = life.ai.mit.edu
ai.mit.edu      nameserver = mintaka.lcs.mit.edu
life.ai.mit.edu internet address = 128.52.32.80
alpha-bits.ai.mit.edu   internet address = 128.52.32.5
wheaties.ai.mit.edu     internet address = 128.52.35.13
wheaties.ai.mit.edu     internet address = 128.52.32.13
grape-nuts.ai.mit.edu   internet address = 128.52.36.4
grape-nuts.ai.mit.edu   internet address = 128.52.32.4
mini-wheats.ai.mit.edu  internet address = 128.52.32.11
mini-wheats.ai.mit.edu  internet address = 128.52.54.11
mintaka.lcs.mit.edu     internet address = 18.26.0.36

   ©Ò¥H§Ú­Ì±q . ¶}©l³sÄò§ä¥X¦b»â°ì¦WºÙ¸Ìªº¤U¤@¼h¦WºÙ¦øªA¾¹¡D ¦pªG§A¨Ï¥Î§A
   ¦Û¤vªº DNS ¦øªA¾¹¦Ó¤£¬O©Ò¦³³o¨Ç­Ó¨ä¥¦ªº¦øªA¾¹¡A §Aªº named ·íµM·|¼È¦s
   ©Ò¦³³o¨Ç¦b¬°§A´M§ä³o­Óµª®×®É©Ò§ä¨ìªº¸ê°T¡A ¦Ó¥B¦b¤@¬q®É¶¡¤º¥¦¤£¥²¦A¦¸
   ¬d°Ý¡D

   ¤@­Ó¤ñ¸û°_¨Ó«Ü¤Ö³Q½×¤Î¡A¦ý¬O¦P¼Ë­«­nªº¬O in-addr.arpa »â°ì¡D¥¦¤]¹³¡¥¥¿
   ±`ªº¡¦»â°ì¤@¼Ë¬O±_ª¬ªº¡D in-addr.arpa Åý§Ú­Ì¥i¥H¦b¾Ö¦³¥D¾÷¦ì§}ªº®É­Ô±o
   ª¾¸Ó¥D¾÷ªº¦WºÙ¡D ¦b³o¸Ì¦³¥ó­«­nªº¨Æ±¡­nª`·Nªº¬O¦b in-addr.arpa ³o­Ó»â
   °ì¤¤ ip ¼Æ¦r¬O¥H¤Ï¦V¶¶§Ç®Ñ¼gªº¡D ¦pªG§A¦³¬Y¥x¾÷¾¹ªº¦ì§}: 192.128.52.43
   ¨º»ò named ·|¥HÃþ¦ü prep.ai.mit.edu ³o­Ó½d¨Òªº¤è¦¡¨Ó³B²z: §ä¥X arpa.
   ªº¦øªA¾¹¡A§ä¥X in-addr.arpa. ªº¦øªA¾¹¡AµM«á¦A§ä¥X 192.in-addr.arpa. ªº
   ¦øªA¾¹¡A §ä¥X 128.192.in-addr.arpa. ªº¦øªA¾¹¡A±µµÛ§ä¥X
   52.128.192.in-addr.arpa. ªº¦øªA¾¹¡A ³Ì«á¦A§ä¥X©Ò»Ý¤§
   43.52.128.192.in-addr.arpa. ªº°O¿ý¡DÁo©ú¥G? (»¡¡¥¬Oªº¡¦)¡D ÀY¨â¦~³o¤Ï
   ¦Vªº¼Æ¦r¤]¤Þ°_¹L¤@¨Ç§xÂZ¡D

   ¨ä¹ê§Ú¬OÄF§Aªº¡DDNS ¨Ã«D§¹§¹¥þ¥þ¦a¹³§Ú§i¶D§Aªº³o¼Ë¹B§@¡D¦ý¬O³o¤w¸g°÷±µ
   ªñªº¤F¡D

4.2 §Ú­Ì¦Û¤vªº»â°ì

   ²{¦b¨Ó©w¸q§Ú­Ì¦Û¤vªº»â°ì¡D§Ú­Ì±N·|³Ð³y¥X linux.bogus ³o­Ó»â°ì¨Ã¥B©w¸q
   ¨ä¤¤ªº¾÷¾¹¡D §Ú¨Ï¥Î¤@­Ó§¹¥þ¬OµêÀÀ¥X¨Óªº»â°ì¦WºÙ¥H«K½T©w§Ú­Ì¤£·|ÂZ¶Ã¨ì
   ºô¸ô¤Wªº¨ä¥¦¦a¤è¡D

   §Ú­Ì¦­´N¤w¸g¥H named.boot ¸Ìªº³o¤@¦æ¶}©l¤F³o­Ó³¡¥÷ªº³]©w:
     _________________________________________________________________

primary         0.0.127.in-addr.arpa            pz/127.0.0
     _________________________________________________________________

   ½Ðª`·N¦b³o­ÓÀɮ׸̪º»â°ì¦WºÙµ²§À¨Ã¨S¦³¥[¤W `.' ²Å¸¹¡D ²Ä¤@¦æ§â©w¸q
   0.0.127.in-addr.arpa ªºÀɮשR¦W¬° pz/127.0.0¡D §Ú­Ì¦­¤w¸g«Ø¥ß¤F³o­ÓÀÉ
   ®×¡A¥¦¬O³o¼Ëªº:
     _________________________________________________________________

@               IN      SOA     linux.bogus. hostmaster.linux.bogus. (
                                1       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      ns.linux.bogus.
1                       PTR     localhost.
     _________________________________________________________________

   ½Ðª`·N¦b³o­ÓÀɮ׸̩Ҧ³ªº§¹¾ã»â°ì¦WºÙµ²§Àªº `.' ²Å¸¹¡A³o»P¤W­±´£¨ìªº
   named.boot ÀɮקΦ¨¹ï¤ñ¡D ¦³¨Ç¤H³ßÅw¥H $ORIGIN «ü¥O±Ò©l¨C­Ó°Ï°ìÀɮסA
   ¦ý³o¬O¤£¥²­nªº¡D ¤@­Ó°Ï°ìÀɮתº°òÂI(´N¬O¨ä©ÒÄݪº DNS ¶¥¼h¬[ºc¦ì¸m)¬O¦b
   named.boot Àɮתº¡¥»â°ì¡¦¦æ¸Ì«ü©wªº¡A ¦b³o­Ó¨Ò¤l¸Ì¬O
   0.0.127.in-addr.arpa¡D

   ³o­Ó¡¥°Ï°ìÀɮס¦¤¤¥]§t¤TºØ¡¥¸ê·½°O¿ý¡¦(resource records, RRs): ¤@­Ó¬O
   SOA ¸ê·½°O¿ý¡D¤@­Ó¬O NS ¸ê·½°O¿ý¥H¤Î¤@­Ó PTR °O¿ý¡D SOA ¬O±ÂÅv°_
   ©l(Start Of Authority)ªºÁY¼g¡D`@' ¬O­Ó·N«ä¬°°òÂIªº¯S®í¼Ð°O¡A ¦Ó¦]¬°³o
   ­ÓÀɮתº¡¥»â°ì¡¦¦æ»¡¬O 0.0.127.in-addr.arpa ©Ò¥H²Ä¤@¦æ¹ê»Ú¤W¬O«ü

  0.0.127.IN-ADDR.ARPA. IN      SOA ...

   NS ¬O¦WºÙ¦øªA¾¹¸ê·½°O¿ý¡A¥¦§i¶D DNS ¤°»ò¾÷¾¹¬O³o­Ó»â°ì
   0.0.127.in-addr.arpa ªº¦WºÙ¦øªA¾¹¡A¤]´N¬O ns.linux.bogus. ¦Ó³Ì«áªº PTR
   °O¿ý»¡ 1 (µ¥©ó¬O 1.0.0.127.IN-ADDR.ARPA, ¤]´N¬O 127.0.0.1)ªº¦WºÙ¬O
   localhost¡D

   SOA ³o­Ó°O¿ý¬O©Ò¦³°Ï°ìÀɮתº§Ç¤å¡A¦Ó¥B¦b¨C¤@­Ó°Ï°ìÀɮ׸̳£À³¸Ó¦³³o°ß¤@
   ªº¤@­Ó¡A³Ì¶}ÀYªº°O¿ý¡D ¥¦´y­z¸Ó°Ï°ì¡A¥¦±q¦ó¦Ó¨Ó(¤@¥xºÙ¬° linux.bogus
   ªº¾÷¾¹)¡A½Ö­t³d¨ä¤º®e(hostmaster@linux.bogus)¡A ³o­Ó°Ï°ìÀɮ׬O¤°»òª©
   ¥»(serial: 1)¡A¥H¤Î¨ä¥¦¥²¶·°µªº¡A¦³Ãö¼È¦s»P¦¸­n¦WºÙ¦øªA¾¹ªº¨Æ¡D ³Ñ¤Uªº
   Äæ¦ì¦p refresh, retry, expire ¥H¤Î minimum §A¥i¥H¨Ï¥Î³o¥÷¤å¥ó¸Ì©Ò¥Îªº
   ¼Æ¦r¦Ó¥BÀ³¸Ó¤£·|¥X°ÝÃD¡D

   ²{¦b­«·s°_©l§Aªº named(¨Ï¥Î ndc restart «ü¥O)¨Ã¨Ï¥Î nslookup ¨ÓÀËÅç§Ú
   ­Ì°µ¤F¤°»ò:

$ nslookup

Default Server:  localhost
Address:  127.0.0.1

> 127.0.0.1
Server:  localhost
Address:  127.0.0.1

Name:    localhost
Address:  127.0.0.1

   ©Ò¥H¥¦ºÞ²z±q 127.0.0.1 ±o¨ì localhost ªº¹Lµ{¡A«Ü¦n¡D ²{¦b¶}©l§Ú­Ìªº¥D
   ­n¥ô°È¡Alinux.bogus ³o­Ó»â°ì¡A ¦b named.boot ¸Ì ´¡¤J·sªº¤@¦æ primary
   «ü¥O:
     _________________________________________________________________

primary               linux.bogus                     pz/linux.bogus
     _________________________________________________________________

   ª`·N¡A¦b named.boot Àɮ׸̻â°ì¦WºÙªºµ²§ÀÁÙ¬O¨S¦³ '.' ²Å¸¹¡D

   ¦b³o­Ó linux.bogus °Ï°ìÀɮ׸̧ڭ̱N·|©ñ¤J¤@¨Ç§¹¥þµêÀÀªº¸ê®Æ:
     _________________________________________________________________

;
; Zone file for linux.bogus
;
; Mandatory minimum for a working domain
;
@       IN      SOA     linux.bogus. hostmaster.linux.bogus. (
                        199511301       ; serial, todays date + todays serial #
                        28800           ; refresh, seconds
                        7200            ; retry, seconds
                        3600000         ; expire, seconds
                        86400 )         ; minimum, seconds
                NS      ns.linux.bogus.
                NS      ns.friend.bogus.
                MX      10 mail.linux.bogus   ; Primary Mail Exchanger
                MX      20 mail.friend.bogus. ; Secondary Mail Exchanger

localhost       A       127.0.0.1
ns              A       127.0.0.2
mail            A       127.0.0.4
     _________________________________________________________________

   Ãö©ó SOA °O¿ý¦³¨â¥ó¨Æ»Ý­nª`·N¡D­º¥ý ns.linux.bogus ¥²¶· ¬O¤@¥x¨ã¦³ A
   °O¿ýªº¯u¥¿¾÷¾¹¡D ¦b SOA °O¿ý¤¤¥Î CNAME °O¿ý¬°¦WºÙªº¾÷¾¹¬O¤£¦Xªkªº¡D¥¦
   ªº¦W¦r¤£¤@©w­n¬O ns¡A¥¦¥i¥H¬O¥ô¦ó¦Xªkªº¥D¾÷¦WºÙ¡D ¦A¨Ó
   ¡Ahostmaster.linux.bogus À³¸Ó³Qµø¬° hostmaster@linux.bogus¡A³oÀ³¸Ó¬O¤@
   ­Ó¶l¥ó¦ì§}©Î§O¦W¡A ¬OºûÅ@³o­Ó DNS ªº¤H¸g±`Ū«Hªº¦ì§}¡D¥ô¦óÃö©ó¦¹»â°ìªº
   «H¥ó·|³Q°e¨ì³o­Ó¦ì§}¡D ¥¦ªº¦W¦r¤£¤@©w­n¬O hostmaster¡A¥¦¥i¥H¬O¥ô¦ó¦Xªk
   ªº¹q¤l¶l¥ó¦ì§}¡AµM¦Ó³o­Ó¦ì§} `hostmaster' À³¸Ó¯à¤u§@¥¿±`¡D

   ¦b³o­ÓÀɮ׸̦³¤@ºØ·sªº¸ê·½°O¿ý«¬ºA¡A§Y MX «¬ºA¡A©Î¬O¶l¥ó¥æ´«ªÌ¸ê·½°O
   ¿ý(Mail eXchanger RR)¡D ³oºØ¸ê·½°O¿ý«¬ºA§i¶D¶l»¼¨t²Î¦a§}
   someone@linux.bogus ªº¶l¥ó­n±H°e¨ì­þ¸Ì¡A ´«¥y¸Ü»¡¤]´N¬OÀ³¸Ó±H°e¨ì
   mail.linux.bogus ©Î¬O mail.friend.bogus¡D ¦b¨C­Ó¾÷¾¹¦WºÙ«e­±ªº¼Æ¦r¬O
   MX ¸ê·½°O¿ýªºÀu¥ýÅv¡A¼Æ¦r¤ñ¸û§C (10) ªº¸ê·½°O¿ý¬O¶l¥ó¥D­nÀ³¸Ó±H©¹ªº¾÷
   ¾¹¡D ¦pªG¥¢±Ñ¥i¥H§â¥¦±H©¹¼Æ¦r¤ñ¸û°ªªº¾÷¾¹¡A¤@¥x¦¸­nªº¶l¥ó³B²zªÌ¡A¤]´N
   ¬O¦b³o¸Ì¨ã¦³Àu¥ýÅv 20 ªº mail.friend.bogus¡D

   ¥Î ndc restart ­«·s°_©l named¡D¥H nslookup ÀËÅçµ²ªG:

$ nslookup
> set q=any
> linux.bogus
Server:  localhost
Address:  127.0.0.1

linux.bogus
        origin = linux.bogus
        mail addr = hostmaster.linux.bogus
        serial = 199511301
        refresh = 28800 (8 hours)
        retry   = 7200 (2 hours)
        expire  = 604800 (7 days)
        minimum ttl = 86400 (1 day)
linux.bogus     nameserver = ns.linux.bogus
linux.bogus     nameserver = ns.friend.bogus
linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
linux.bogus     nameserver = ns.linux.bogus
linux.bogus     nameserver = ns.friend.bogus
ns.linux.bogus  internet address = 127.0.0.2
mail.linux.bogus        internet address = 127.0.0.4

   ¤p¤ß¦aÀËÅç§A±N·|µo²{¤@­Ó¿ù»~¡D³o¤@¦æ

  linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogu
s

   ¥þ³£¿ù¤F¡D¥¦À³¸Ó¬O

  linux.bogus     preference = 10, mail exchanger = mail.linux.bogus

   §Ú¬G·N¥Ç¤F­Ó¿ù»~©Ò¥H§A¥i¥HÂǦ¹¾Ç²ß:-) ¥J²Ó¬Ý¬Ý¸Ó°Ï°ìÀɮקڭ̷|µo²{³o¤@
   ¦æ

@              MX      10 mail.linux.bogus     ; Primary Mail Exchanger

   ¿òº|¤F¤@­Ó¥yÂI¡D©Î¬O»¡¦h¤F­Ó `linux.bogus'¡D ¦b°Ï°ìÀɮ׸̦pªG¤@­Ó¾÷¾¹
   ¦WºÙ¤£¬O¥H¥yÂIµ²§À¨º»ò·|¦b¨äµ²§À¥[¤J°òÂI¡D©Ò¥H¤£½×¬O
     _________________________________________________________________

@              MX      10 mail.linux.bogus.    ; Primary Mail Exchanger
     _________________________________________________________________

   ©Î¬O
     _________________________________________________________________

@              MX      10 mail                 ; Primary Mail Exchanger
     _________________________________________________________________

   ³£¬O¥¿½Tªº¡D§Ú¤ñ¸û³ßÅw«á­±³oºØ§Î¦¡¡A¥¦»Ý­nªº¥´¦r¤ñ¸û¤Ö¡D ¦b¤@­Ó°Ï°ìÀÉ
   ®×¸Ì»â°ì¦WºÙÀ³¸Ó­n¤£´N¬O¼g¥X¨Ó¨Ã¥H `.' µ²§À©ÎªÌ´N¬O¤@ÂI³£¤£­n¥]§t¶i¥h
   ¡A ¦Ó¦b³oºØ±¡ªp¤U¨ä»â°ì¹w³]¬°°òÂI¡D¨ä¥¦¤H¤]³\³ßÅw±Ä¥Î¥t¤@ºØ¤è¦¡¡D

   §Ú¥²¶·±j½Õªº¬O¦b named.boot Àɮ׸̻â°ì¦WºÙ«á­±¤£À³¸Ó¦³ `.' ªº¦s¦b¡D §A
   ¤£ª¾¹D¦³¦h¤Ö¦¸¦]¬°¦h¤F©Î¤Ö¤F¤@­Ó `.' ¦Ó·d¯{¤F¨Ã¥B¹ï³\¦h¤H³y¦¨§xÂZ¡D

   ©Ò¥H¦b¥[¤J§Ú±j½Õªº­«ÂI«á±o¨ì¤@¥÷·sªº°Ï°ìÀɮסA¨ä¤¤ÁÙ¥]§t¤@¨ÇÃB¥~ªº¸ê
   °T:
     _________________________________________________________________

;
; Zone file for linux.bogus
;
; Mandatory minimum for a working domain
;
@       IN      SOA     linux.bogus.    hostmaster.linux.bogus. (
                        199511301       ; serial, todays date + todays serial #
                        28800           ; refresh, seconds
                        7200            ; retry, seconds
                        604800          ; expire, seconds
                        86400 )         ; minimum, seconds

                NS      ns              ; Inet Address of name server
                NS      ns.friend.bogus.
                MX      10 mail         ; Primary Mail Exchanger
                MX      20 mail.friend.bogus. ; Secondary Mail Exchanger

localhost       A       127.0.0.1
ns              A       127.0.0.2
mail            A       127.0.0.4
;
; Extras
;
@               TXT     "Linux.Bogus, your DNS consultants"

ns              MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "Pentium" "Linux 1.2"
                TXT     "RMS"
richard         CNAME   ns
www             CNAME   ns

donald          A       127.0.0.3
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "i486"  "Linux 1.2"
                TXT     "DEK"

mail            MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "386sx" "Linux 1.0.9"

ftp             A       127.0.0.5
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "P6" "Linux 1.3.59"
     _________________________________________________________________

   §A¤]³\·|·Q­n²¾°Ê«e­±¤T­Ó A °O¿ý¥H«KÅý¥¦­Ì¾aªñ¨ä¥¦ªº¬ÛÃö°O¿ý¡A¦Ó¤£¬O¹³
   ³o¼Ë©ñ¦b³Ì«eºÝ¡D

   ³o¸Ì¦³´X­Ó·sªº¸ê·½°O¿ý: ¥D¾÷¸ê°T(HINFO: Host INFOrmation) ¥]¬A¨â­Ó³¡¥÷
   ¡A ¨Ï¥Î¤Þ¸¹²[¬A¨C­Ó³¡¥÷¬O­Ó¦n²ßºD¡D²Ä¤@­Ó³¡¥÷¬O¾÷¾¹¤WªºµwÅé©Î¬O¤¤¥¡³B
   ²z³æ¤¸¡A ¦Ó²Ä¤G­Ó³¡¥÷¬O¾÷¾¹¤Wªº³nÅé©Î¬O§@·~¨t²Î¡Dns ¦³¤@Áû Pentium CPU
   ¨Ã¥B°õ¦æ Linux 1.2 ¨t²Î¡D TXT °O¿ý¬O­ÓÀH·Nªº¤å¦r°O¿ý¡A§A¥i¥H¥Î¥¦¨Ó°O¿ý
   ¥ô¦ó¨Æ±¡¡D ¥¿¦¡¦WºÙ(CNAME: Canonical NAME)¥i¥H¥Î¨Óµ¹¨C¥x¾÷¾¹¼Æ­Ó¦WºÙ¡D
   ©Ò¥H richard ¥H¤Î www ³£¬O ns ªº¤@­Ó§O¦W¡D «Ü­«­nªº¤@ÂI¬O A, MX,
   CNAME, ¥H¤Î SOA °O¿ý¥Ã»·¤£¸Ó°Ñ·Ó CNAME °O¿ý³]©wªº§O¦W¡A ¥¦­Ì¥uÀ³¸Ó°Ñ·Ó
   A °O¿ý©Ò³]©wªº¦WºÙ¡A©Ò¥H¹³³o¼Ëªº°O¿ý¬O¿ùªº
     _________________________________________________________________

foobar  CNAME   richard                 ; NO!
     _________________________________________________________________

   ¤£¹L³o¼Ë¬O¹ïªº
     _________________________________________________________________

foobar  CNAME   ns                      ; Yes!
     _________________________________________________________________

   ÁÙ¦³¤@ÂI¤]«Ü­«­nªº¬Oª`·N¥¿¦¡¦WºÙ©Ò³]©wªº¹ï¹q¤l¶l»¼¦ì§}¦Ó¨¥¤£¬O¦Xªk¥D¾÷
   ¦WºÙ: webmaster@www.linux.bogus ¥H¤W­±ªº³]©w¦Ó¨¥¬O¤@­Ó¤£¦Xªkªº¹q¤l¶l»¼
   ¦ì§}¡D §Y¨Ï¥¦¦b§Aªº¨t²Î¤W¥i¥H¹B§@¡A¥i¥H¹w®Æªº¬O«Ü¤Ö¦³¹q¤l¶l¥óºÞ²zªÌ·|
   ¥h¹ê¦æ³o¶µ³W«h¡D ÁקK³o­Ó°ÝÃDªº¤èªk¬O¨Ï¥Î A °O¿ý(©ÎªÌ¤]¥i¯à¬O¤@¨Ç¨ä¥¦
   ªº¡A¹³¬O MX °O¿ý)¨Ó¨ú¥N¤§:
     _________________________________________________________________

www     A       127.0.0.2
     _________________________________________________________________

   Paul Vixie, ¥D­nªº named ±M®a¡A«Øij¤£­n¨Ï¥Î CNAME ³o­Ó³]©w¡D ©Ò¥HÀ³¸Ó
   ¦Ò¼{¤£­n«Ü»{¯u¦a¥h¨Ï¥Î¥¦¡D

   ÂǥѰõ¦æ ndc reload ¸ü¤J·sªº¸ê®Æ®w¡A³o·|¨Ï named ¦A¤@¦¸Åª¨ú¨äÀɮסD

$ nslookup
Default Server:  localhost
Address:  127.0.0.1

> ls -d linux.bogus

   ³o·N«üÀ³¸Ó¦C¥X©Ò¦³ªº°O¿ý

[localhost]
 linux.bogus.                   SOA   ns.linux.bogus hostmaster.linux.bogus. (1
99511301 28800 7200 604800 86400)
 linux.bogus.                   NS    ns.linux.bogus
 linux.bogus.                   NS    ns.friend.bogus
 linux.bogus.                   MX    10   mail.linux.bogus
 linux.bogus.                   MX    20   mail.friend.bogus
 linux.bogus.                   TXT   "Linux.Bogus, your DNS consultants"
 localhost                      A     127.0.0.1
 mail                           A     127.0.0.4
 mail                           MX    10   mail.linux.bogus
 mail                           MX    20   mail.friend.bogus
 mail                           HINFO 386sx       Linux 1.0.9
 donald                         A     127.0.0.3
 donald                         MX    10   mail.linux.bogus
 donald                         MX    20   mail.friend.bogus
 donald                         HINFO i486        Linux 1.2
 donald                         TXT   "DEK"
 www                            CNAME ns.linux.bogus
 richard                        CNAME ns.linux.bogus
 ftp                            A     127.0.0.5
 ftp                            MX    10   mail.linux.bogus
 ftp                            MX    20   mail.friend.bogus
 ftp                            HINFO P6          Linux 1.3.59
 ns                             A     127.0.0.2
 ns                             MX    10   mail.linux.bogus
 ns                             MX    20   mail.friend.bogus
 ns                             HINFO Pentium     Linux 1.2
 ns                             TXT   "RMS"
 linux.bogus.                   SOA   ns.linux.bogus hostmaster.linux.bogus. (1
99511301 28800 7200 604800 86400)

   «Ü¦n¡DÅý§Ú­ÌÀˬd¥¦¹ï©ó³æ¿Wªº www ·|»¡¤°»ò:

> set q=any
> www.linux.bogus.
Server:  localhost
Address:  127.0.0.1

www.linux.bogus canonical name = ns.linux.bogus

   ...´«¥y¸Ü»¡¡Awww.linux.bogus ¯u¥¿ªº¦WºÙ¬O ns.linux.bogus¡D

linux.bogus     nameserver = ns.linux.bogus
linux.bogus     nameserver = ns.friend.bogus
ns.linux.bogus  internet address = 127.0.0.2

   ¦Ó ns.linux.bogus ¾Ö¦³ 127.0.0.2 ³o­Ó¦ì§}¡D¬Ý°_¨Ó¤]«Ü¦n¡D

4.3 Ä~Äò²`¤J

   ·íµM¡A³o­Ó»â°ì¬O°ª«×µêÀÀªº¡A¸Ì­±©Ò¦³ªº¦ì§}¤]³£¬O¡A¦Ó³o©Î³\·|Åý§A¦³¨Ç²V
   ²c¡D ¯u¹ê»â°ìªº¤@­Ó¯u¹ê¨Ò¤l½Ð¨£¤U¤@¸`¡D

5. ¯u¹ê»â°ìªº¨Ò¤l

   ³o¸Ì§Ú­Ì¦C¥X¤@¨Ç¯u¥¿ªº°Ï°ìÀÉ®×

   ¨Ï¥ÎªÌ«Øij§Ú¥[¤W¤@­Ó¥i¥H¹B§@ªº¯u¹ê¨Ò¤l¡A¦]¬°§Ú¹ï¯u¥¿¥i¹B§@ªº»â°ì¤ÎµêÀÀ
   ½d¨Ò¤§¶¡®t§O¸ÑÄÀªº¤£°÷²M·¡¡D

   Ãö©ó³o­Ó¨Ò¤l¦³¥ó¨Æ¥²¶·Án©ú: ¤d¸U¤£­n§â¥¦©ñ¨ì§Aªº¦WºÙ¦øªA¾¹¤W! §â¥¦·í§@
   °Ñ¦Ò¸ê®Æ¨Ó¾\Ū´N¦n¡D¦pªG§A·Q°µ¹êÅç¡A¥Î¤W­±µêÀÀªº¨Ò¤l¡D §Ú¸g¹L LAND-5
   ªº David Bullock ªº¦P·N¤~¨Ï¥Î³o­Ó¨Ò¤l¡D³o¨ÇÀɮתº¤é´Á¬O 1996 ¦~¤E¤ë¤G
   ¤Q¤é¡A ¦]¦¹¦pªG§A²{¦b¬d¸ß LAND-5 ªº¦WºÙ¦øªA¾¹¥i¯à·|µo²{¦³©Ò¤£¦P¡D ÁÙ¦³
   ¡A½Ð°O¦í¡A§R¥h«e­±ªºªÅ¥Õ :-)

5.1 /etc/named.boot (©Î /var/named/named.boot)

   §Ú­Ìµo²{»Ý­n¨â¦æ primary ªº¤Ï¦V°Ï°ì: ¤@­Ó¬O 127.0.0¡A¥t¤@­Ó¬O LAND-5
   ªº¤lºô¸ô 206.6.177¡D ÁÙ¦³¤@¦æµ¹ land-5.com ªº¥¿¦V°Ï°ì¡DÁÙ¦³¤@ÂI­nª`·N
   ªº¬O¤£¹³§Ú¦b³o½g¤å³¹¸Ì±NÀɮשñ¦b pz ¥Ø¿ý¸Ì¡A ¥L±N¥¦­Ì©ñ¨ì¥s°µ zone ªº
   ¥Ø¿ý¡D
     _________________________________________________________________

;  Boot file for LAND-5 name server
;
directory /var/named
;
; type          domain                          source file or host
cache           .                               root.cache
primary         0.0.127.in-addr.arpa            zone/127.0.0
primary         177.6.206.in-addr.arpa          zone/206.6.177
primary         land-5.com                      zone/land-5.com
     _________________________________________________________________

5.2 /var/named/root.cache

   °O¦í³o­ÓÀɮ׬O°ÊºAªº¡A³oÃä¦C¥X¨Óªº¬Oªº¡D§A³Ì¦n¦Û¤v¥Î dig ²£¥Í¤@­Ó·s
   ªº¡D
     _________________________________________________________________

; <<>> DiG 2.1 <<>>
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6
;; flags: qr rd ra; Ques: 1, Ans: 9, Auth: 0, Addit: 9
;; QUESTIONS:
;;      ., type = NS, class = IN

;; ANSWERS:
 .       518357  NS      H.ROOT-SERVERS.NET.
 .       518357  NS      B.ROOT-SERVERS.NET.
 .       518357  NS      C.ROOT-SERVERS.NET.
 .       518357  NS      D.ROOT-SERVERS.NET.
 .       518357  NS      E.ROOT-SERVERS.NET.
 .       518357  NS      I.ROOT-SERVERS.NET.
 .       518357  NS      F.ROOT-SERVERS.NET.
 .       518357  NS      G.ROOT-SERVERS.NET.
 .       518357  NS      A.ROOT-SERVERS.NET.

;; ADDITIONAL RECORDS:
H.ROOT-SERVERS.NET.     165593  A       128.63.2.53
B.ROOT-SERVERS.NET.     165593  A       128.9.0.107
C.ROOT-SERVERS.NET.     222766  A       192.33.4.12
D.ROOT-SERVERS.NET.     165593  A       128.8.10.90
E.ROOT-SERVERS.NET.     165593  A       192.203.230.10
I.ROOT-SERVERS.NET.     165593  A       192.36.148.17
F.ROOT-SERVERS.NET.     299616  A       192.5.5.241
G.ROOT-SERVERS.NET.     165593  A       192.112.36.4
A.ROOT-SERVERS.NET.     165593  A       198.41.0.4

;; Total query time: 250 msec
;; FROM: land-5 to SERVER: default ---- 127.0.0.1
;; WHEN: Fri Sep 20 10:11:22 1996
;; MSG SIZE  sent: 17  rcvd: 312
     _________________________________________________________________

5.3 /var/named/zone/127.0.0

   ¤£¹L¬O°ò¥»ªº¡A¤£¯à¬Ù²¤ªº SOA °O¿ý¡A¥H¤Î±N 127.0.0.1 «ü¦V localhost ªº
   °O¿ý¡D ¨âªÌ³£¬O¥²¶·ªº¡D¤£À³¦³¨ä¥¦ªºªF¦è¦b¦¹Àɮפ¤¡D³o­ÓÀÉ®×¥i¯à¥Ã»·¤£
   ¥²§ó·s¡A°£«D§Aªº¦WºÙ¦øªA¾¹©ÎºÞ²z¤H¦a§}§ïÅÜ¡D
     _________________________________________________________________

@               IN      SOA     land-5.com. root.land-5.com. (
                                199609203       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      land-5.com.

1                       PTR     localhost.
     _________________________________________________________________

5.4 /var/named/zone/land-5.com

   ¦b³o¸Ì§Ú­Ì¬Ý¨ì³o­Ó¥²¶·ªº SOA °O¿ý¡A¥²­nªº NS °O¿ý¡D §Ú­Ì¥i¥H¬Ý¨ì¥¦¦³¤@
   ­Ó¦¸­nªº¦WºÙ¦øªA¾¹©ó ns2.psi.net¡D ³o¤]À³¸Ó¬O¥²­nªº¡AÁ`¬O«O¦³¤@­Ó¦¸­n
   ªº¦øªA¾¹°µ¬°³Æ¥÷¡D §Ú­ÌÁ٬ݨ찵¬° LAND-5 ­t³d©Ò¦³¤£¦PªA°Èªº¥D¾÷¡A¥¦¥H
   ³\¦hªº CNAME °O¿ý°µ¨ì³oÂI (¥t¤@­Ó°µªk¬O¥Î A °O¿ý)¡D

   ´N¹³§A±q SOA °O¿ý¬Ý¨ìªº¤@¼Ë¡A°Ï°ìÀÉ®×¥H land-5.com ¶}©l¡AºÞ²z¤H¬O
   root@land-5.com¡D §Ç¸¹(serial)¥H yyyymmdd ªº®æ¦¡¥[¤W·í¤Ñªº¸¹½X; ¥¦¥i¯à
   ¬O 1996 ¦~¤E¤ë¤G¤Q¸¹¨º¤Ñªº²Ä¤»­Óª©¥»ªº°Ï°ìÀɮסD ½Ð°O¦í§Ç¸¹¥²¶·³æ½Õ¦a
   »¼¼W¡A³o¸Ì¥¦¥u¥Î¤@¦ì¼Æ¦rªí¥Ü·í¤Ñªº¸¹½X¡A ¦]¦¹¦b½s¿è¤E¦¸¤§«á¥L¥²¶·µ¥¨ì
   ©ú¤Ñ¤~¯à¦A½s¿è³o­ÓÀɮסD[Ķµù] ¦]¦¹À³¸Ó¦Ò¼{¥Î¨â¦ì¼Æ¦r¡D

   [Ķµù]
          ŪªÌ¥i¯à·|©_©Ç¬°¤°»ò¤£¯à¥Î 1996092010 ? ³o­Ó¼Æ¦r¤]¬O»¼¼Wªº¡A©Ò
          ¥H·íµM¥i¥H¡D ¦ý¨ì¤F©ú¤Ñ²Ä¤@¦¸½sÀɮ׮ɸӥΤ°»ò©O? ¦pªG¥Î
          199609211¡A¨º»ò³o­Ó¼Æ¦r´N¤ñ 1996092010 ­n¤p¤F¡D ³o¼Ë·|¦³³Â·Ð¡D
          ¦]¦¹§@ªÌ«ØijÀ³¥Î¨â¦ì¼Æ¦r¡A¦p 1996092006¡D
     _________________________________________________________________

@       IN      SOA     land-5.com. root.land-5.com. (
                        199609206       ; serial, todays date + todays serial #
                        10800           ; refresh, seconds
                        7200            ; retry, seconds
                        10800           ; expire, seconds
                        86400 )         ; minimum, seconds
                NS      land-5.com.
                NS      ns2.psi.net.
                MX      10 land-5.com.  ; Primary Mail Exchanger

localhost       A       127.0.0.1

router          A       206.6.177.1

land-5.com.     A       206.6.177.2
ns              CNAME   land-5.com.
ftp             CNAME   land-5.com.
www             CNAME   land-5.com.
mail            CNAME   land-5.com.
news            CNAME   land-5.com.

funn            A       206.6.177.3
illusions       CNAME   funn.land-5.com.
@               TXT     "LAND-5 Corporation"

;
;       Workstations
;
ws_177200       A       206.6.177.200
                MX      10 land-5.com.   ; Primary Mail Host
ws_177201       A       206.6.177.201
                MX      10 land-5.com.   ; Primary Mail Host
ws_177202       A       206.6.177.202
                MX      10 land-5.com.   ; Primary Mail Host
ws_177203       A       206.6.177.203
                MX      10 land-5.com.   ; Primary Mail Host
ws_177204       A       206.6.177.204
                MX      10 land-5.com.   ; Primary Mail Host
ws_177205       A       206.6.177.205
                MX      10 land-5.com.   ; Primary Mail Host
; {Many repetitive definitions deleted - SNIP}
ws_177250       A       206.6.177.250
                MX      10 land-5.com.   ; Primary Mail Host
ws_177251       A       206.6.177.251
                MX      10 land-5.com.   ; Primary Mail Host
ws_177252       A       206.6.177.252
                MX      10 land-5.com.   ; Primary Mail Host
ws_177253       A       206.6.177.253
                MX      10 land-5.com.   ; Primary Mail Host
ws_177254       A       206.6.177.254
                MX      10 land-5.com.   ; Primary Mail Host
     _________________________________________________________________

   ¥t¤@¥ó­È±oª`·Nªº¨Æ©Ò¦³ªº¤u§@¯¸³£¨S¦³­Ó§Oªº¦WºÙ¡A¦Ó¬O¥Î¤@¶}ÀY¥[¤W³Ì«á¨â
   ¦ìªº IP ¼Æ¦r¡D ¥Î³o¼ËªººD¨Ò¥i¥H¤j¶q¦a²¤ÆºûÅ@¤u§@¡A¦ý¥i¯à¦³ÂI¤£¤è«K¡A
   ¦Ó¥B¡A¨Æ¹ê¤W¥i¯à¬O§Aªº«È¤á¤£º¡ªº¨Ó·½¡D

5.5 /var/named/zone/206.6.177

   §Ú±N¦b«á­±»¡©ú³o­ÓÀɮסD
     _________________________________________________________________

@               IN      SOA     land-5.com. root.land-5.com. (
                                199609206       ; Serial
                                28800   ; Refresh
                                7200    ; Retry
                                604800  ; Expire
                                86400)  ; Minimum TTL
                        NS      land-5.com.
                        NS      ns2.psi.net.
;
;       Servers
;
1       PTR     router.land-5.com.
2       PTR     land-5.com.
3       PTR     funn.land-5.com.
;
;       Workstations
;
200     PTR     ws_177200.land-5.com.
201     PTR     ws_177201.land-5.com.
202     PTR     ws_177202.land-5.com.
203     PTR     ws_177203.land-5.com.
204     PTR     ws_177204.land-5.com.
205     PTR     ws_177205.land-5.com.
; {Many repetitive definitions deleted - SNIP}
250     PTR     ws_177250.land-5.com.
251     PTR     ws_177251.land-5.com.
252     PTR     ws_177252.land-5.com.
253     PTR     ws_177253.land-5.com.
254     PTR     ws_177254.land-5.com.
     _________________________________________________________________

   ¤Ï¦V°Ï°ì¦ü¥G¬O¾ã­Ó³]©w¤¤³ÌÅý¤HÀYµhªº³¡¥÷¡D¥¦¬O¦b§A¦³¾÷¾¹ªº IP ¼Æ¦r®É¬d
   ¸ß¾÷¾¹¦WºÙ¥Îªº¡D ¨Ò¦p: §A¦³¤@³¡ irc ¦øªA¾¹±µ¨ü irc «È¤áºÝªº³s½u¡D ¦ý§A
   ¬O®¿«Âªº¦øªA¾¹¦]¦¹§A¥u§Æ±æ±µ¨ü¨Ó¦Û®¿«Â¤Î¨ä¥¦´µ³ô¦a¨ººû¨È°ê®aªº³s½u¡D
   ·í§A±µ¨ì¨Ó¦Û«È¤áºÝªº³s½u®É C µ{¦¡®w¯à°÷§i¶D§A³s½u¾÷¾¹ªº IP ¦ì§}¡A¦]¬°
   «È¤áºÝªº IP ¼Æ¦r¬O¥]§t¦b¶Ç¤Jªººô¸ô«Ê¥]¤¤ªº¡D µM«á§A¥i¥H©I¥s¤@¨ç¦¡
   gethostbyaddr ¥Hµ¹©wªº IP ¬d¸ß¾÷¾¹¦WºÙ¡D gethostbyaddr ¨ç¦¡·|¦V DNS ¸ß
   °Ý¡ADNS ´N·|¥X¥h¬d¸ß³o¥x¾÷¾¹¦WºÙ¡D °²³]«È¤áºÝ¨Ó¦Û ws_177200.land-5.com
   ¡AC µ{¦¡®w´£¨Ñµ¹ irc ¦øªA¾¹ªº IP ¬O 206.6.177.200¡D ¬°§ä¥X¾÷¾¹ªº¦WºÙ§Ú
   ­Ì­n¬d¸ß 200.177.6.206.in-addr.arpa¡DDNS ¦øªA¾¹­º¥ý§ä¨ì­t³d arpa. ªº¦ø
   ªA¾¹¡D µM«á§ä¨ì in-addr.arpa. ªº¦øªA¾¹¡A¦A¨Ó¬O¤Ï¹L¨Óªº 206¡AµM«á¬O 6¡A
   ³Ì«á§ä¨ì¦b LAND-5 ­t³d 177.6.206.in-addr.arpa °Ï°ìªº¦øªA¾¹¡D ¥Ñ¦¹§Ú­Ì
   ±o¨ì 200.177.6.206.in-addr.arpa ªºµª®×¬O 'PTR ws_177200.land-5.com' °O
   ¿ý¡A ·N«ü¾Ö¦³ IP 206.6.177.200 ªº¦WºÙ¬O ws_177200.land-5.com¡D ¤£¹L´N
   ¹³¦b¸ÑÄÀ prep.ai.mit.edu ¦p¦ó¬d¸ß®É©Ò»¡¡A³o¹Lµ{µy·L¦³ÂI¤£¹ï¡D

   ¦^¨ì irc ¦øªA¾¹ªº¨Ò¤l¡Dirc ¦øªA¾¹¥u±µ¦A¨Ó¦Û´µ³ô¦a¨ººû¨È°ê®aªº³s½u¡A¤]
   ´N¬O¡A *.no, *.se, *.dk¡Dws_177200.land-5.com ³o­Ó¦W¦rÅãµM¨Ã¤£²Å¦X¥ô¦ó
   ³o¨Ç¡D ¦]¦¹¦øªA¾¹·|©Úµ´³s½u¡D¦pªG¨S¦³¸g¥Ñ in-addr.arpa °Ï°ì¨ì
   206.2.177.200 ªº¤Ï¦V¹ïÀ³¡A ¦øªA¾¹±NµLªk¬d¨ì¾÷¾¹¦WºÙ¦Ó±N·|®³
   206.2.177.200 ¨Ó©M *.no, *.se ¤Î *.dk ¤ñ¸û¡A·íµM§ä¤£¨ì²Å¦Xªº¡D

   ¦³¨Ç¤H·|§i¶D§A¤Ï¦V¹ïÀ³¬d¸ß¥u¹ï¦øªA¾¹­«­n¡A©Î¬O¤@ÂI¤]¤£­«­n¡D ·íµM¤£¬O:
   ³\¦h ftp, news, irc ¬Æ¦Ü http ¦øªA¾¹±N¤£±µ¨üµLªk¬d¨ì¦WºÙªº¾÷¾¹³s½u¡D
   ¦]¦¹¨Æ¹ê¤W¾÷¾¹ªº¤Ï¦V¦WºÙ¹ïÀ³¬O¥²¶·ªº¡D

6. ºûÅ@¤u§@

   ºû«ù¥¦ªº¹B§@¡D

   ºû«ù¥¦­ÌªºÄ~Äò°õ¦æ¤§¥~¡A¹ï©ó named §AÁÙ¦³­ÓºûÅ@ªº¥ô°È±o­n°µ¡D ¨º´N¬Oºû
   «ù root.cache Àɮתº§ó·s¡D³Ì²³æªº¤èªk¬O¨Ï¥Î dig µ{¦¡¡A ­º¥ý¤£¥[¥ô¦ó°Ñ
   ¼Æ°õ¦æ dig µ{¦¡¡A§A±N·|¨ú±o±q§A¦Û¤v¦øªA¾¹±o¨ìªº root.cache¡D µM«á¥H
   dig @rootserver . ns ¬d°Ý©Ò¦C¥Xªº®Ú¦øªA¾¹¨ä¤¤¤§¤@¡D §A±N·|ª`·N¨ì³o¥÷¿é
   ¥X¬Ý°_¨Ó«D±`¦a¹³¤@­Ó root.cache ÀɮסA°£¤F¤@°ïÃB¥~ªº¼Æ¦r¥H¥~¡D³o¨Ç¼Æ¦r
   ¤£·|¦³¤°»ò§«Ãª¡D §â¥¦¦s©ñ¨ìÀɮ׸Ì(dig @e.root-servers.net . ns
   >root.cache.new)¨Ã¥B¥Î¥¦¨Ó¨ú¥N­ì¥»Âªº root.cache ÀɮסD

   ¨ú¥N¤F­ì¥ýªºÀɮפ§«á­n°O±o­«·s±Ò°Ê named µ{¦¡¡D

   Al Longyear ±Hµ¹§Ú³o­Ó«ü¥O½Z¡A¥¦¥i¥H¦Û°Ê°õ¦æ¨Ó§ó·s named.cache¡A¬°¥¦¦w
   ¸Ë­Ó crontab ¶µ¥ØµM«á§Ñ¤F¥¦¡D ³o­Ó«ü¥O½Z°²³]§Aªº¹q¤l¶l¥ó¥i¥H¹B§@¦Ó¥B
   `hostmaster' ³o­Ó¶l¥ó§O¦W¦³©w¸q¡D§AÀ³¸Ó­×­q¥¦¥H«K²Å¦X§Aªº³]©w¡D
     _________________________________________________________________

#!/bin/sh
#
# Update the nameserver cache information file once per month.
# This is run automatically by a cron entry.
#
(
 echo "To: hostmaster <hostmaster>"
 echo "From: system <root>"
 echo "Subject: Automatic update of the named.boot file"
 echo

 export PATH=/sbin:/usr/sbin:/bin:/usr/bin:
 cd /var/named

 dig @rs.internic.net . ns >root.cache.new

 echo "The named.boot file has been updated to contain the following informatio
n:"
 echo
 cat root.cache.new

 chown root.root root.cache.new
 chmod 444 root.cache.new
 rm -f root.cache.old
 mv root.cache root.cache.old
 mv root.cache.new root.cache
 ndc restart
 echo
 echo "The nameserver has been restarted to ensure that the update is complete.
"
 echo "The previous root.cache file is now called /var/named/root.cache.old."
) 2>&1 | /usr/lib/sendmail -t
exit 0
     _________________________________________________________________

   ¦³¨Ç¤H¥i¯à¥Î ftp ±q Internic ±o¨ì root.cache ÀɮסD ½Ð¤£­n¥Î ftp ¨Ó§ó
   ·s root.cache¡A¤W­±´£¨ìªº¤èªk§ó¬°«K§Q¡D

7. Bind version 8

   Bind version 8 ¬O³Ì·sªº bind §Þ³N¡D§ÚÁÙ¨S¦³¹Á¸Õ¨Ï¥Î¡A¦ý David E. Smith
   < [14]dave@bureau42.ml.org> ¦³¡D¥L¼g¤F³o¤p¸`ªº¨ä¾l³¡¥÷¡D

   ¨S¦³¤Ó¦hªº¤£¦P¡D°£¤F¨Ï¥Î named.conf ¦Ó¤£¬O named.boot, ¨ä¾l³£¬Û¦P¡D ¦Ó
   ¥B bind 8 ¥]§t¤F¤@­Ó perl «ü¥O½Z¨Ó±N®榡ªºÀÉ®×Âà´«¦¨·sªº¡D ¨Ò¦p¤@¥÷
   ¼È¦s±M¥Î¦WºÙ¦øªA¾¹ªº named.boot (®榡):
     _________________________________________________________________

directory /var/named
cache   .                                       root.hint
primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
primary localhost                               localhost.zone
     _________________________________________________________________

   ¦b«ü¥O¦C¤U¡A©ó bind8/src/bin/named ¥Ø¿ý¤¤Áä¤J:
     _________________________________________________________________

named-bootconf.pl < named.boot > named.conf
     _________________________________________________________________

   ³o·|²£¥Í named.conf:
     _________________________________________________________________

// generated by named-bootconf.pl

options {
        directory "/var/named";
};

zone "." {
        type hint;
        file "root.hint";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "127.0.0.zone";
};

zone "localhost" {
        type master;
        file "localhost.zone";
};
     _________________________________________________________________

   ¥¦±N named.boot ¤¤ªº¨C¼ËªF¦è³£Âà´«¹L¨Ó¡AµM¦Ó¥¦¨Ã¥¼¥[¤J©Ò¦³ bind 8 ©Ò¤¹
   ³\ªº·s±j¤Æ¤Î°t¸m¿ï¶µ¡D ³o¸Ì¦³¥÷¸û§¹¾ãªº named.conf °µ¦P¼Ëªº¨Æ¡A¦ý¬O®Ä
   ²v§ó¦n¤@ÂI¡D
     _________________________________________________________________

// This is a configuration file for named (from BIND 8.1 or later).
// It would normally be installed as /etc/named.conf.
// The only change made from the `stock' named.conf (aside from this
// comment :) is that the directory line was uncommented, since I
// already had the zone files in /var/named.

options {
        directory "/var/named";
        check-names master warn;                /* default. */
        datasize 20M;
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "127.0.0.zone";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };
};

zone "." IN {
        type hint;
        file "root.hint";
};
     _________________________________________________________________

   bind8/src/bin/named/test ¸Ì¦³³o­Ó½d¨Ò¡A¥H¤Î»â°ìÀɮתº«þ¨©¡A³\¦h¤H¥i¥H
   ª½±µ®³¨Ó­×§ï¨Ï¥Î¡D

   »â°ìÀɮפΠroot.hint (root.cache) §¹¥þ¬Û¦P¡A§ó·s¥¦­Ìªº«ü¥O¤]¬O¡D

8. ¼·±µ³s½uªº¦Û°Ê³]©w

   ³o¤@¸`¸ÑÄÀ§Ú¦p¦ó³]©w¥H«KÅý¨C­Ó¹Lµ{¦Û°Ê¤Æ¡D §Úªº¤èªk¥i¯à¤@ÂI³£¤£¾A¦X§A
   ¡A¦ý¬O§A¥i¯à±q§Ú©Ò§@ªº¤@¨Ç¨Æ±¡¸Ì±o¨ì¤@¨ÇÂI¤l¡D ¦P®É¡A§Ú¨Ï¥Î PPP ¼·±µ¡A
   µM¦Ó¦³³\¦h¤H¨Ï¥Î slip ©Î¬O cslip ³s½u¤è¦¡¡A ©Ò¥H§Aªº³]©w¸Ì´X¥G¨C­Ó¦a¤è
   ³£¥i¯à¸ò§Úªº¤£¦P¡D ¦ý¬O slip ¨Ï¥Îªº dip µ{¦¡À³¸Ó¯à°÷§¹¦¨§Ú©Ò§@ªº³\¦h¨Æ
   ±¡¡D

   ¤@¯ë¨Ó»¡¡A·í§Ú¨S¦³³s¤Wºô¸ô®É§Úªº resolv.conf Àɮ׳æ¯Â¦a¥]§t³o¤@¦æ

domain uio.no

   ³o½T«O§Ú¤£¥²µ¥«Ý¥D¾÷¦WºÙ¸ÑªR¨ç¦¡®w¥h¹Á¸ÕÁpô¬Y¥x¤£¥i¯àÀ°§U§Úªº¦WºÙ¦øªA
   ¾¹¡D ¦ý¬O·í§Ú³s¤W½uªº®É­Ô§Ú·Q­n°_©l§Úªº named ¨Ã¥B¾Ö¦³¤@­Ó¬Ý°_¨Ó¹³«e­±
   ©Ò´y­zªº resolv.conf ÀɮסD §ÚÂǥѫO«ù¨â¥÷ resolv.conf ªº¡¥¼ËªO¡¦ÀÉ®×
   ¡Aresolv.conf.local ¥H¤Î resolv.conf.connected ¨Ó¸Ñ¨M°ÝÃD¡D «á­±³o¤@­Ó
   ¬Ý°_¨Ó¹³«e­±©Ò´y­z¹Lªº resolv.conf ÀɮסD

   ­n¦Û°Ê¤Æ³s½u¨ìºô¸ôªº¹Lµ{§Ú°õ¦æ¤@­ÓºÙ¬° `ppp-on' ªº«ü¥O½Z:
     _________________________________________________________________

#!/bin/sh
echo calling...
pppd
     _________________________________________________________________

   pppd ¦³­ÓºÙ¬° options ªºÀɮסA¥¦§i¶D pppd ¦p¦ó¨ú±o³s½uªº¤@¨Ç¯S®í¨Æ¶µ¡D
   ¤@¥¹§Úªº ppp ³s½u§¹¦¨«á pppd °_©l¤@­ÓºÙ¬° ip-up ªº«ü¥O(³o¦b pppd ªº½u
   ¤W¨Ï¥Î¤â¥U¸Ì¦³´y­z)¡D ³o¸Ì¬O¸Ó«ü¥O½Z¸Ì­±ªº¤@³¡¥÷:
     _________________________________________________________________

#!/bin/sh
interface="$1"
device="$2"
speed="$3"
myip="$4"
upip="$5"
 ...
cp -v /etc/resolv.conf.connected /etc/resolv.conf
 ...
/usr/sbin/named
     _________________________________________________________________

   ´«¥y¸Ü»¡¡A§Ú¦b³o¸Ì°_©l§Úªº named µ{¦¡¡D·í ppp Â÷½u®É pppd °õ¦æ¤@­ÓºÙ¬°
   ip-down ªº«ü¥O½Z:
     _________________________________________________________________

#!/bin/sh
cp /etc/resolv.conf.local /etc/resolv.conf
read namedpid < /var/run/named.pid
kill $namedpid
     _________________________________________________________________

   ©Ò¥H³o¦b³s½u®É°t¸m¨Ã³]©w¬ÛÃö¨Æ©y¨Ã¥B¦bÂ÷½u®É¸Ñ°£¸Ó°t¸m¨Ãµ²§ô¬ÛÃöµ{¦¡¡D

   ¬Y¨Çµ{¦¡¡A¨Ò¦p§Ú·Q°_ irc »P talk¡A°µ¤F¹L¦hªº°²©w¡A¬°¤FÅý¨ä¤u§@¥¿±`§A¥²
   ¶·­×§ï§Aªº hosts ÀɮסD §Ú¦b ip-up ¤W¥[¤J
     _________________________________________________________________

cp /etc/hosts.ppp /etc/hosts
echo $myip      roke >>/etc/hosts
     _________________________________________________________________

   hosts.ppp ¬O²³æ¦a¥]§t¤F
     _________________________________________________________________

127.0.0.1       localhost
     _________________________________________________________________

   ¦Ó echo «ü¥O´¡¤J¤F§Ú¦¬¨ìªº IP ¸¹½X°µ¬°§Ú¾÷¾¹ªº¦WºÙ(roke)¡D §AÀ³¸Ó§ï¥Î
   §A¦Û¤v¾÷¾¹ªº¦WºÙ¡A¥i¥H¥Î hostname «ü¥O¬d¥X¡D

   ·í§A¨S¦³³s½u¨ìºô¸ô¤W®É°õ¦æ named ¥i¯à¨Ã¤£Áo©ú¡A ³o¬O¦]¬° named ±N·|¹Á
   ¸Õ°e¥X¬d¸ß¨ìºô¸ô¤W¦Ó¥B¨ä²×¤î®É­­(timeout)«Üªø¡A ¦Ó¨C¦¸¦³¬Y¨Ç­Óµ{¦¡¹Á¸Õ
   ¸ÑªR¤@­Ó¦WºÙªº®É­Ô§A´N±oµ¥«Ý¨ì³o­Ó²×¤î®É­­¡D ¦pªG§A¨Ï¥Î¼·±µªº¸Ü§AÀ³¸Ó
   ¦b³s¤Wºô®É°_©l named ¨Ã¥B¦bÂ÷½u®É±þ±¼¥¦¡D ¤£¹L½Ð°Ñ¦Ò [15]FAQ ¤@¸`ªº´£
   ¥Ü¡D

   ¬Y¨Ç¤H³ßÅw¦bºC³tªº³s½u¤W¨Ï¥Î forwarders «ü¥O¡D ¦pªG§Aªººô»Úºô¸ô´£¨ÑªÌ
   ¦b 1.2.3.4 ¥H¤Î 1.2.3.5 ³]¦³ DNS ¦øªA¾¹¨º»ò§A¥i¥H´¡¤J³o»ò¤@¦æ
     _________________________________________________________________

forwarders 1.2.3.4 1.2.3.5
     _________________________________________________________________

   ¨ì named.boot Àɮ׸̥h¡D ³o±N·|´î§C·½¦Û§A¥D¾÷ªº IP ¬y¶q¡A¥i¯àµy·L´£ª@
   ³t«×¡D¦pªG§A¬O¨Ì½u¸ôªº¸ê®Æ¶q¥I¶Oªº¸Ü³oÂI¯S§O­«­n¡D ³oÁÙ¦³­Óªþ¥[»ù­È¡A
   Åý§A²æÂ÷§@¬°¤@­Ó¼È¦sªº named ºûÅ@ªÌ©ÒÀ³­t°_ªº³d¥ô: §A¤£»Ý­n¥h§ó·s¤@­Ó
   ªÅªº root.cache ÀɮסD

9. ±`¨£°ÝÃD¸Ñµª

   ¥»¸`¤¤§Ú±N¦C¥X¤@¨ÇÃö©ó DNS ¥H¤Î¥»¤å¥ó³Ì±`³Q´£¥Xªº°ÝÃD¡DÁÙ¦³¸Ñµª :-) ¦b
   ¼g«Hµ¹§Ú«e½Ð¥ý¾\Ū¹L¥»¸`¡D

    1. ¦p¦ó¦b¨¾¤õÀ𤧤º¨Ï¥Î DNS ?
       ¤@¨Ç´£¥Ü: `forwarders', `slave', ¥H¤Î°Ñ¦Ò¥»¤å¥ó³Ì«á­±ªº¤åÄm¦Cªí¡D
    2. ¦p¦ó§Q¥Î DNS ´£¨Ñªº¥i¥Î¦ì§}©ó¬Y¤@ªA°È¡A¦p www.busy.site¡A ¥HÀò±o­t
       ²ü¥­¿Å©ÎÃþ¦üªº®ÄªG?
       ¬° www.busy.site ¥[¤W³\¦h A °O¿ý¡A¦Ó¥B¨Ï¥Î bind 4.9.3 ©Î¥H«áªºª©¥»
       ¡D ³o¼Ë bind ·|¨Ï¥Î round-robin ºtºâªk§ä´Mµª®×¡D³o¤£¯à¦b§ó¦­ª©¥»ªº
       bind ¤W¤u§@¡D
    3. §Ú·Q¦b¤@«Ê³¬ªº Intranet ¤W¬[³] DNS¡D§Ú¸Ó«ç»ò°µ?
       §â¼È¦sÀɮץᱼ¥u¯d°Ï°ìÀɮסD³o¤]ªí¥Ü§A±N¤£»Ý­n§ó·s¼È¦sÀɮסD
    4. §Úªº¨t²Î¨S¦³ ndc µ{¦¡¡D§Ú¸Ó«ç»ò¿ì?
       §Aªº¨t²Î¦w¸Ë¹L¤@ªº¡A¥i¯à¹L´Áªº bind µ{¦¡¡D ¦pªG¦w¥þ©Ê¹ï§A«Ü­«­n:
       ¥ß¨è±N bind ¤É¯Å¡D¦pªG¤£¬O¡A§A¤]¥i¥H¥Î³oªº¡D §A¥iª½±µ°õ¦æ named
       ¦Ó¤£¬O ndc start¡D ndc reload Åܦ¨ named.reload ¦Ó ndc restart ÅÜ
       ¦¨ named.restart¡D ©Ò¦³³o¨Çµ{¦¡¥i¯à³£¦b /usr/sbin ¸Ì¡D
    5. ¦p¦ó«Ø¥ß¦¸­n¦WºÙ¦øªA¾¹?
       ¦pªG¥D­n¦WºÙ¦øªA¾¹ªº¦a§}¬O 127.0.0.1¡A ¦b§Aªº¦¸­n¦WºÙ¦øªA¾¹ªº
       named.boot Àɮפ¤©ñ¤@¦æ:
         _____________________________________________________________

  secondary     linux.bogus             127.0.0.1       sz/linux.bogus
         _____________________________________________________________

    6. §Ú§Æ±æÂ÷½u®É bind ¤´Ä~Äò°õ¦æ¡D
       §Ú¦¬¨ì¨Ó¦Û Ian Clark < [16]ic@deakin.edu.au> ªº«H¥ó¸ÑÄÀ¥L¦p¦ó¿ì¨ì
       ³oÂI¡D

I run named on my 'Masquerading' machine here. I have
two root.cache files, one called root.cache.real which contains
the real root server names and the other called root.cache.fake
which contains...

--------------
; root.cache.fake
; this file contains no information
--------------

When I go off line I copy the root.cache.fake file to root.cache and
restart named.

When I go online I copy root.cache.real to root.cache and restart
named.

This is done from ip-down & ip-up respectively.

The first time I do a query off line on a domain name named doesn't
have details for it puts an entry like this in messages..

Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

which I can live with.

It certainly seems to work for me. I can use the nameserver for
local machines while off the 'net without the timeout delay for
external domain names and I while on the 'net queries for external
domains work normally

    7. ¦WºÙ¦øªA¾¹±N¼È¦s¸ê®Æ«O¦s¦b¨º¨à? ¦³¥ô¦ó¤èªk¥i¥H±±¨î¥¦ªº¤j¤p¶Ü?
       ©Ò¦³ªº¼È¦s¸ê®Æ³£«O¦s¦b°O¾ÐÅ餤¡A¥ô¦ó®É¨è¥¦³£¤£·|³Q¼g¤JºÏºÐ¤¤¡D ¨C
       ¦¸§A±þ±¼ named ®É³o¨Ç¼È¦s¸ê®Æ´N¨S¦³¤F¡D¨S¦³¥ô¦ó¤èªk¥i¥H±±¨î¼È¦s¸ê
       ®Æ¡D named ¥Î¤@¨Ç²³æªºªk«h¨ÓºÞ²z¥¦¡D§A¤£¯à¥Î¥ô¦ó²z¥Ñ¥ô¦ó¤èªk±±¨î
       ¼È¦s¸ê®Æ©Î¨ä¤j¤p¡D ¦pªG§A§Æ±æ¦p¦¹§A¥i¥H¦Û¤v¥h§ï named ªºµ{¦¡¡D¤£¹L
       ³Ì¦n§O³o»ò°µ¡D
    8. ¦p¦ó¦b­«·s°_©l named ¤§¶¡«O¦s¼È¦s¸ê®Æ? §Ú¥i¥H§â¥¦¦s¤U¨Ó¶Ü?
       ¤£! named ³Q±þ±¼®É¤£·|«O¯d¼È¦s¸ê®Æ¡D ³o´N¬O»¡¼È¦s¸ê®Æ¥²¶·¦b¨C¦¸§A
       ±þ±¼¨Ã­«·s°_©l named «á­«·s«Ø¥ß¡D ¨S¦³¿ìªkÅý named ±N¼È¦s¸ê®Æ¦s¨ì
       Àɮ׸̡D ¦pªG§A§Æ±æ¦p¦¹§A¥i¥H¦Û¤v¥h§ï named ªºµ{¦¡¡D¤£¹L³Ì¦n§O³o»ò
       °µ¡D

10. ¦p¦ó¦¨¬°¤@­Ó¤j«¬ªº DNS ºÞ²zªÌ

   ¤å¥ó¥H¤Î¤u¨ã

   ¦s¦b¯u¥¿ªº¤å¥ó¡D¦b½u¤Wªº©Î¬O¦L¦nªº¡D­n¸ó¥X¥Ñ¤p«¬ DNS ¨ì¤j«¬ DNS ºÞ²zªÌ
   ªº¤@¨B¾\Ū´X¥÷³o¨Ç¤å¥ó¬O¥²­nªº¡D ¦L¦nªº¼Ð·Ç°Ñ¦Ò®Ñ¬O DNS and BIND by C.
   Liu and P. Albitz from O'Reilly & Associates, Sebastopol, CA, ISBN
   0-937175-82-X¡D §ÚŪ¹L¡A¥¦«Ü´Î¡D¦b¥t¤@¥» TCP/IP Network
   Administration, by Craig Hunt from O'Reilly..., ISBN 0-937175-82-X ¦³
   ¤@¸`¬OÃö©ó DNS ªº¡D¥t¤@¥»¹ïºÞ²z DNS «Ü¦nªº(©ÎªÌ¬O¹ï¥ô¦ó³o¤@Ãþ¤u§@³£«Ü
   ¦n)®Ñ«h¬O Zen and the Art of Motorcycle Maintenance, §@ªÌ Robert M.
   Prisig ®Ñ¸¹ ISBN 0688052304¡D

   ½u¤Wªº¸ê®Æ§A¥i¥H¦b³o¸Ì§ä¨ì [17]http://www.dns.net/dnsrd/, [18]
   http://www.isc.org/bind.html; ±`¨£°ÝÃD¶°¡A°Ñ¦Ò¤â¥U(BOG; Bind
   Operations Guide)¬O¨ó©wªº©w¸q¥H¤Î DNS ¬ã¨sªº¤åÄm¡D ³o¨Ç¤å¥ó§Ú¤j³¡¤À¨S
   ¦³¾\Ū¹L¡A¦ý¬O¦]¦¹§Ú¤£¬O­Ó¤j«¬ DNS ºÞ²zªÌ¡D ¥t¤@¤è­± Arnt Gulbrandsen
   ¤w¸gŪ¹L BOG ¦Ó¥B¹ï¦¹«Ü¼ô¸Z :-)¡D ºô¸ô·s»D°Q½×¸s [19]
   comp.protocols.tcp-ip.domains ¬O¦³Ãö DNS ªº°Q½×¸s¡D ¦¹¥~ÁÙ¦³¦n´X¥÷Ãö©ó
   DNS ªº RFCs¡A³Ì­«­nªº¥i¯à¬O³o¨Ç:

   RFC 2052
          A. Gulbrandsen, P. Vixie, A DNS RR for specifying the location
          of services (DNS SRV), October 1996

   RFC 1918
          Y. Rekhter, R. Moskowitz, D. Karrenberg, G. de Groot, E. Lear,
          Address Allocation for Private Internets, 02/29/1996.

   RFC 1912
          D. Barr, Common DNS Operational and Configuration Errors,
          02/28/1996.

   RFC 1713
          A. Romao, Tools for DNS debugging, 11/03/1994.

   RFC 1712
          C. Farrell, M. Schulze, S. Pleitner, D. Baldoni, DNS Encoding
          of Geographical Location, 11/01/1994.

   RFC 1183
          R. Ullmann, P. Mockapetris, L. Mamakos, C. Everhart, New DNS RR
          Definitions, 10/08/1990.

   RFC 1035
          P. Mockapetris, Domain names - implementation and
          specification, 11/01/1987.

   RFC 1034
          P. Mockapetris, Domain names - concepts and facilities,
          11/01/1987.

   RFC 1033
          M. Lottor, Domain administrators operations guide, 11/01/1987.

   RFC 1032
          M. Stahl, Domain administrators guide, 11/01/1987.

   RFC 974
          C. Partridge, Mail routing and the domain system, 01/01/1986.

References

   1. mailto:janl@math.uio.no
   2. http://ultima.ncnu.edu.tw/~asdchen/
   3. http://www.phys.ntu.edu.tw/~cwhuang/pub/
   4. mailto:janl@ifi.uio.no
   5. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#qanda
   6. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#qanda
   7. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#bigger
   8. file://localhost/tmp/zh-sgmltools.20633/PPP-HOWTO.html
   9. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#qanda
  10. ftp://ftp.vix.com/pub/bind/
  11. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#maint
  12. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#qanda
  13. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#auto
  14. mailto:dave@bureau42.ml.org
  15. file://localhost/tmp/zh-sgmltools.20633/DNS-HOWTO.txt.html#qanda
  16. mailto:ic@deakin.edu.au
  17. http://www.dns.net/dnsrd/
  18. http://www.isc.org/bind.html
  19. news:comp.protocols.tcp-ip.domains