6.
. , named.
named. , . /etc/named.boot. BOOTFILE named named.
:
domain Berkeley.Edu
". ", . , " (default domain) " . domain , , . , . - , /etc/resolv.conf ( ). domain .
directory , . directory , .
directory /var/named
, named, /var/named directory. - , named , $INCLUDE, named , (dump core) .
, :
primary Berkeley.Edu ucbhosts
, , . , .
, , IN. , /class , class - . , hesiod :
primary/HS Berkeley.Edu hesiod.data
, , IN .
, ( ), .
secondary Berkeley.Edu 128.32.0.10 128.32.0.4 ucbhosts.bak
, . , . , , , - IP/DNS , . , . secondary, , , . . . , . , , , , , . , -- , , , ; .
, IN, /class secondary, secondary/HS.
. ( 4.9.3.)
stub Berkeley.Edu 128.32.0.10 128.32.0.4 ucbhosts.bak
, .
, , NS . , "". NS , .
primary CSIRO.AU csiro.dat stub dms.CSIRO.AU 130.155.16.1 dms.stub stub dap.CSIRO.AU 130.155.98.1 dap.stub
, " " , :
cache . root.cache
.
- named . - , , -, - .
, IN cache /class, class/HS.
. - . forwarders internet:
forwarders 128.32.0.10 128.32.0.4
, .
, - IP Internet, . - , . , , , .
" " , , . , NS . , slave , .
, - - - , .
options forward-only
, . , , , , . , .
, forwardres " " , options forward-only " " , forwarders. options forward-only , , , .
options forward-only . , slave.
BIND () () , , . , ( ) , " ".
options no-recursion
, , - , , , .
NS RR, resolv.conf.
, syslog ,
options query-log
, Perl AWK , .
BIND , , , nslookup. , , "operation not implemented", named ; , , ,
options fake-iquery
: , ISO8859 ([ ]), - . , - .
, , BIND. :
limit <name> <value>
:
limit transfers-in 10
named-xfer BIND . , , , . : max-fetch NN.
limit transfers-per-ns 2
named-xfer, BIND . . , transfers-per-ns . , .
limit datasize <system-dependent>
, " ", BIND . BIND ( ) . , , BIND limit datasize NN. k 1024X, m (1024^2)X, g (1024^3)X. 1995., limit datasize 64m.
, Inernet, . "" , PTR " " " , . , xfrnets.
, forwarders, , . , A 16,
xfrnets 16.0.0.0
, BIND , . , , , , , , , , . ,
xfrnets 16.1.0.2&255.255.255.255
16.1.0.2 . , "& ", .
xfrnets BIND 4.9. tcplist.
, , BIND, BIND , " ". "" ; - , . , , . , named.boot sortlist, . sortlist , forwarders, xfrnets, bogusns - xxx.xxx.xxx.xxx, "" . sortlist , .
C, B Internet, , B sortlist. "" "". , , , BIND 4.9.
sortlist , BIND A , , sortlist . , , A " " (LIFO); , , "" . .
, , ; , "" , "" . BIND , "" , "", . BIND, , (, ) , , . "multihomed" , - , . , , , .
, "". , bogusns named.boot. forwarders, xfrnets, sortlist - Internet xxx.xxx.xxx.xxx. , , ; .
, named.boot , - ( directory, sortlist, xfrnets cache), , ( primary , secondary - - , , ). include, . . , , directory, , .
6.2.
/etc/resolv.conf. , . localhost, . , - , , . , , .
resolv.conf , , :
; # domain local-domain search search-list nameserver server-address sortlist sort-list options option-list
domain search , . search, (search-list) local-domain. nameserver ; nameserver . ";" "#", ; , ( BIND 4.9) - , .
Local-domain , ".". local-domain LOCALDOMAIN. , local-domain .
Search-list - , , , , ".". search-list . , "LOCALDOMAIN" search-list .
(server-address) , . , , . , ( ) nslookup. , , Internet, 127.0.0.1 0.0.0.0. - BSD SOCK_DGRAM. , 127.0.0.1 0.0.0.0 ( "0"), , , BSD, , -. IP (loopback) , ( /etc/rc.local) :
route add myhost.domain.name localhost 1
Sort-list - IP . gethostbyname . , . , , .
Option-list - , - . :
debug
RES_DEBUG _res.options.
ndots:n
( " ") res query(), , local-domain search-list. "1".
6.3.1. root.cache
, . , . . ( Masterfile Format) .
. hosts host.rev. , . , ; , , / .
6.4.1. hosts
. .
IN-ADDR.ARPA. , . Internet , , . IN-ADDR.ARPA , . Internet. , . Internet 128.32.0.4 4.0.32.128.IN-ADDR.ARPA. , .
PTR (loopback interface), local-host, 127.0.0.1. . , 127.0.0.1 PTR "localhost.". PTR "1.0.0.127.IN-ADDR.ARPA". , , "localhost" ( hosts.equiv ~/.rhosts). PTR, , "localhost.my.dom.ain" A ( 127.0.0.1). "localhost." , 1.0.0.127.in-addr.arpa; DEFNAMES / DNSRCH "localhost" .
. (The Standard Resource Record Format (RR)) RFC1035. :
{name}; {ttl} addr-class Record-Type Record-Specific-data
, . . RR , ; RR. - (ttl). . , (Start Of Authority)( ). - ; : IN internet . HS, MIT/Athena "Hesiod". . . . .
:
"."
.
"@"
@ .
"\X"
X - (0-9), , . , "\." , .
"\DDD"
D - , , DDD. .
"( )"
. , . ( , SOA .)
";"
; . , .
"*"
. , , . ( MX), , .
- - - ".", (@). , , , , . : , , ".".
6.5.1. $INCLUDE
$INCLUDE, , , , , $ORIGIN . , , . :
$INCLUDE /usr/local/adm/named/data/mail-exchanges
/usr/local/adm/named/data/mail-exchanges. $INCLUDE . . " $ORIGIN" - .
$INCLUDE . , . $INCLUDE.
(origin) - . . , , . , . , $ORIGIN " " - .
{name} {ttl} addr-class SOA Origin Person in charge @ IN SOA ucbvax.Berkeley.Edu. kjd.ucbvax.Berkeley.Edu. ( 1995122103 ; Serial 10800 ; Refresh 1800 ; Retry 3600000 ; Expire 259200 ) ; Minimum
. SOA, . - "@", $ORIGIN SOA . Origin - ( , (primary master) ). (Person in charge) - , "@" ".". (serial number) - , . , . "." ; n.m "n000m", "n*1000+m" ( 1.234 1000234 1234). - , , . , "YYYYMMDDNN" 100 4294 . , . perl RCS . Refresh ( ) , , ? Retry ( ) . Expire , , - . Minimum - , (ttl) . , - (RR) . SOA.
6.5.4. NS -
, NS, , . . . , A, . , - . A. , HINFO, . This lists the , . , ( ""). HINFO, - HINFO. . 6.5.7. WKS - (Well Known Services) , WKS, , . /etc/services. WKS. RFC1123 WKS: 2.2 ... WKS , WKS Internet. , , . ... 5.2.12 WKS MX: RFC-974, . 5 RFC-974 [SMTP:3] WKS (" "), , SMTP. , WKS , WKS MX . ... 6.1.3.6 Status of RR Types ... TXT WKS Internet; , TXT WKS . (Canonical Name), CNAME, , , . . , . , (, NS MX) , . , A CNAME, , MX NS - . (CNAME) CNAME, . , . , CNAME, , . (Domain Name Pointer), PTR, - . PTR IN-ADDR.ARPA. hosts.rev. PTR gethostbyaddr. "." BIND $ORIGIN . Mail eXchange, MX, , . , MX, - , MX "" 0 . , , MX , . , , . , Seismo.CSS.GOV. - , Munnari.OZ.AU.. . "preference value" - , .
, , MX . RFC974. "*" ( ) MX. , , , (relay). : IL RELAY.CS.NET. "wildcard", , *.IL MX RELAY.CS.NET. MX "wildcard" - , , , MX . - , , , "wildcard". MX "wildcard" " " "" , , "" , " ". - , MX " " "wildcard", " ", . MX "wildcard" - , . TXT . , ; TXT . MIT Hesiod - . " ", RP, . , , . , , . , mbox-domain-name - , . DNS , , SOA (Person-in-charge). , mbox-domain-name "<ben@franklin.berkeley.edu>". ( "."), , . , TXT-domain-name - TXT. TXT TXT-domain-name. , DNS. TXT-domain-name ( ".") , TXT. "sysadmins.berkeley.edu." - TXT, .
RP . RP, TTL. RP ; . AFSDB , , . subtype ( "preference" MX) , . Subtype 1 , AFS (R) AFS . Subtype 2 , DCE (R) . , jack.toaster.com jill.toaster.com AFS toaster.com, AFS toaster.com . tracker.toaster.com DCE toaster.com, DCE, DCE tracker.toaster.com . DCE TXT , DCE. RFC1183 . AFSDB ; . PX ( X.400/RFC822) X.400 O/R RFC822 ( ). RFC1327. 3 : 1) X.400 RFC822 ( "table 1 rules" RFC1327) 2) RFC822 X.400 ( "table 2 rules" RFC1327) 3) RFC822 X.400 ( "gate table" RFC1327) PX DNS, , name : 1, name - X.400 DNS, 2 3 name RFC822. , X.400 DNS X42D, RFC-1664. RFC1327 DNS. Preference Preference MX: 50. 822-dom RFC822, X.400-dom X.400 ( DNS). name (wildcarded), RFC1327 "wildcard" . , , RFC1327 DNS PX. X.400 RFC822 X.400 DNS, SOA NS . RFC822 X.400 name. : RFC1664. , , DNS RFC1327 DNS. , RFC1664, PX, , DNS RFC1327. PX ; . (Time To Live) RRset . "", TTL. Minimum SOA . BIND . . TTL . Refresh SOA. , TTL 0.5 7 . TTL , (86400 ) (259200 ). . , Minimum , TTL . ( ) TTL . , , TTL SOA Refresh, - . " ". , . , , named SECURE_ZONES secure_zone TXT. secure_zone, . secure_zone TXT : addr-class HS IN. TXT "network address:netmask" "host IP address:H". "network address:netmask" . , named . "host IP address:H" . "H" ":" . secure_zone TXT. , , Hesiod B 130.215.0.0 128.23.10.56, TXT: Hesiod internet (firewall) named . , (loopback) (127.0.0.1) secure_zone, . Hesiod, MIT Project Athena - , BIND. Sun' NIS: , , , , . , BIND , Hesiod NIS , Hesiod , , . Hesiod BIND; . Hesiod anonymous FTP ATHENA-DIST.MIT.EDU tar /pub/ATHENA/hesiod.tar.Z. named BIND 4.9. Hesiod Athena /pub/ATHENA/usenix/athena-changes.PS FTP . tar Hesiod. Hesiod , IN, TXT CNAME. , Hesiod . , BIND HS, , IN . . . 6.9.1.
{name} {ttl} addr-class NS Name-servers-name
IN NS ucbarpa.Berkeley.Edu.
{name} {ttl} addr-class A address
ucbarpa IN A 128.32.0.4
IN A 10.0.0.78
{name} {ttl} addr-class HINFO Hardware OS
IN HINFO VAX-11/780 UNIX
{name} {ttl} addr-class WKS address protocol list-of-services
IN WKS 128.32.0.10 UDP who route timed domain
IN WKS 128.32.0.10 TCP ( echo telnet discard
sunrpc sftp uucp-path systat daytime netstat qotd nntp link chargen ftp auth
time whois mtp pop rje finger smtp supdup hostnames domain nameserver )
alias {ttl} addr-class CNAME Canonical-name
ucbmonet IN CNAME monet
name {ttl} addr-class PTR real-name
7.0 IN PTR monet.Berkeley. Edu.
name {ttl} addr-class MX preference value mail exchange
Munnari.OZ.AU. IN MX 0 Seismo.CSS.GOV.
*.IL. IN MX 0 RELAY.CS.NET.
name {ttl} addr-class TXT string
Munnari.OZ.AU. IN TXT "foo"
owner {ttl} addr-class RP mbox-domain-name TXT-domain-name
franklin IN RP ben.franklin.berkeley.edu. sysadmins.berkeley.edu.
name {ttl} addr-class AFSDB subtype server-host-name
toaster.com. IN AFSDB 1 jack.toaster.com.
toaster.com. IN AFSDB 1 jill.toaster.com.
toaster.com. IN AFSDB 2 tracker.toaster.com.
name {ttl} addr-class PX prefer 822-dom X.400-dom
*.ADMD-garr.X42D.it. IN PX 50 it. ADMD-garr.C-it.
*.infn.it. IN PX 50 infn.it. O.PRMD-infn.ADMD-garr.C-it.
*.it. IN PX 50 it. O-gate.PRMD-garr.ADMD-garr.C-it.
secure_zone addr-class TXT string
secure_zone HS TXT "130.215.0.0:255.255.0.0"
secure_zone HS TXT "128.23.10.56:H"
;
; Boot file for Primary Name Server
;
;type domain source file or host
;
directory /usr/local/adm/named
primary Berkeley.Edu ucbhosts
primary 32.128.in-addr.arpa ucbhosts.rev
primary 0.0.127.in-addr.arpa named.local
cache; . root.cache
;
; Boot file for Secondary Name Server
;
; ; Boot file for Caching Only Name Server ; ;type domain source file or host ; directory /usr/local/adm/named cache . root.cache primary 0.0.127.in-addr.arpa named.local
6.9.2.1. /etc/resolv.conf
domain Berkeley.Edu nameserver 128.32.0.4 nameserver 128.32.0.10 sortlist 130.155.160.0/255.255.240.0 130.155.0.0
; ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . <file>" ; configuration file of BIND domain name servers). ; ; This file is made available by InterNIC registration services ; under anonymous FTP as ; file /domain/named.root ; on server FTP.RS.INTERNIC.NET ; -OR- under Gopher at RS.INTERNIC.NET ; under menu InterNIC Registration Services (NSI) ; submenu InterNIC Registration Archives ; file named.root ; ; last update: Oct 5, 1994 ; related version of root zone: 1994100500 ; . 604800 IN NS NS.INTERNIC.NET. NS.INTERNIC.NET. 604800 IN A 198.41.0.4 . 604800 IN NS NS1.ISI.EDU. NS1.ISI.EDU. 604800 IN A 128.9.0.107 . 604800 IN NS C.PSI.NET. C.PSI.NET. 604800 IN A 192.33.4.12 . 604800 IN NS TERP.UMD.EDU. TERP.UMD.EDU. 604800 IN A 128.8.10.90 . 604800 IN NS NS.NASA.GOV. NS.NASA.GOV. 604800 IN A 128.102.16.10 604800 IN A 192.52.195.10 . 604800 IN NS NS.ISC.ORG. NS.ISC.ORG. 604800 IN A 192.5.5.241 . 604800 IN NS NS.NIC.DDN.MIL. NS.NIC.DDN.MIL. 604800 IN A 192.112.36.4 . 604800 IN NS AOS.ARL.ARMY.MIL. AOS.ARL.ARMY.MIL. 604800 IN A 128.63.4.82 604800 IN A 192.5.25.82 . 604800 IN NS NIC.NORDU.NET. NIC.NORDU.NET. 604800 IN A 192.36.148.17 ; End of File
@ IN SOA ucbvax.Berkeley.Edu. kjd.ucbvax.Berkeley.Edu. ( 1994072100 ; Serial 10800 ; Refresh 1800 ; Retry 3600000 ; Expire 259200 ) ; Minimum IN NS ucbvax.Berkeley.Edu. ; pedantic 1 IN PTR localhost.
; ; @(#)ucb-hosts.rev 1.1 (Berkeley) 86/02/05 ; @ IN SOA ucbvax.Berkeley.Edu. kjd.monet.Berkeley.Edu. ( 1986020501 ; Serial 10800 ; Refresh 1800 ; Retry 3600000 ; Expire 259200 ) ; Minimum IN NS ucbarpa.Berkeley.Edu. IN NS ucbvax.Berkeley.Edu. 0.0 IN PTR Berkeley-net.Berkeley.EDU. IN A 255.255.255.0 0.130 IN PTR csdiv-net.Berkeley.EDU. 4.0 IN PTR ucbarpa.Berkeley.Edu. 6.0 IN PTR ernie.Berkeley.Edu. 7.0 IN PTR monet.Berkeley.Edu. 10.0 IN PTR ucbvax.Berkeley.Edu. 6.130 IN PTR monet.Berkeley.Edu.
; ; @(#)ucb-hosts 1.2 (berkeley) 88/02/05 ; @ IN SOA ucbvax.Berkeley.Edu. kjd.monet.Berkeley.Edu. ( 1988020501 ; Serial 10800 ; Refresh 1800 ; Retry 3600000 ; Expire 259200 ) ; Minimum IN NS ucbarpa.Berkeley.Edu. IN NS ucbvax.Berkeley.Edu. localhost IN A 127.1 ; note that 127.1 is the same as 127.0.0.1; see inet(3n) ucbarpa IN A 128.32.4 IN A 10.0.0.78 IN HINFO VAX-11/780 UNIX arpa IN CNAME ucbarpa ernie IN A 128.32.6 IN HINFO VAX-11/780 UNIX Ucbernie IN CNAME ernie monet IN A 128.32.7 IN A 128.32.130.6 IN HINFO VAX-11/750 UNIX Ucbmonet IN CNAME monet ucbvax IN A 10.2.0.78 ; 128.32.10 means 128.32.0.10; see inet(3n) IN A 128.32.10 ; HINFO and WKS are widely unused, ; but we'll show them as examples. IN HINFO VAX-11/750 UNIX IN WKS 128.32.0.10 TCP ( echo telnet discard sunrpc sftp uucp-path systat daytime netstat qotd nntp link chargen ftp auth time whois mtp pop rje finger smtp supdup hostnames domain nameserver ) vax IN CNAME ucbvax toybox IN A 128.32.131.119 IN HINFO Pro350 RT11 toybox IN MX 0 monet.Berkeley.Edu. csrg IN MX 0 Ralph.CS IN MX 0 Zhou.CS IN MX 0 Painter.CS IN MX 0 Riggle.CS IN MX 0 Terry.CS IN MX 0 Kevin.CS