ager as central nameserver: nameserver 191.72.1.1 vale, , vale.vbrew.com, vale.com. 7.1.4 . LAN , , . , , . : , LAN , - . login X-terminals, , .. - 110 - , , , . One - , hostnames , hostnames . , , . , LAN /etc/hosts. /etc/host.conf "order bind hosts" , , . 7.2 named. , Unix named. BSD , ,, . Linux , BIND- 4.8.3. , BIND-4.9.3, , Linux. Domain Name System. , 3., DNS. Named , . /etc/named.boot, , . zone files. . named, : # /usr/sbin/named - 111 - named, named.boot zone file, . id /var/run/named.pid ASCII, zone files , listening 53 DNS. (1) 7.2.1 named.boot. named.boot , , zone , . . , named.boot , vlager 7.2.1. (2) , named. , . DNS , . 1. named binaries Linux FTP sites, , . pid , /tmp /var/tmp. 2. , . named named.boot , . BIND-4.9.3, , . ; ; /etc/named.boot file for vlager.vbrew.com ; directory /var/named ; ; domain file ;--------------------------------------------------- - 112 - cache . named.ca primary vbrew.com named.hosts primary 0.0.127.in-addr.arpa named.local primary 72.191.in-addr.arpa named.rev 9. Named.boot vlager. , named , . , , named vbrew.com, zone named.hosts. , zone files /var/named. , . - : named , hints (named.ca ). hints . , named.boot: directory - , zone files . . directory. Linux filesystem, /var/named. primary - , named . , named zone . , boot-, 127.0.0.0, . - 113 - secondary - , , . . , , . IP , , named() . , , , . , .named . SOA . cache - . hints, , . NS . , ,- . : boot-, named . , . , named , , . - ( ). forwarders - . IP , named , . , . slave - . , forwarders . - 114 - , , sortlist domain. , , zone . - $INCLUDE $ORIGIN. , . 7.2.2 DNS . named, named.hosts, , origin. - . . , , , , origin. rigin , "@". , , Rrs(resource records) . DNS. . , IP , CNAME . , 7.2.3 116, named.hosts virtual brewery. : [domain] [ttl] [class] type rdata . , " , . - . domain . , RR RR. ttl - 115 - , RR "time to live'', ttl . ttl . information , . - . ttl , SOA . class - , IN IP , HS Hesoid . TCP/IP , IN. , RR. type RR. : A, SOA, PTR, NS. RR. rdata RR. RR. , RR . following - RR, DNS . , . , , . SOA (SOA " Start of Authority''). SOA RR . , SOA . : origin - . . - 116 - contact - email , "@" . , Virtual Brewery - janet, janet.vbrew.com. serial - , . , , . , , . , SOA , SOA . , . refresh , , SOA . - . , , , . retry , . , . , , . expire - - , . . Craig Hunt (GETS "hunt - tcpip"]) 42 . - 117 - minimum - ttl , . , RR - . . minimum , LANs, . . , Rrs , ttl. A IP hostname. dotted quad notation. . Hostname hostname. hostnames - hostname CNAME . NS . , , NS , 3.6. hostname . hostname A , glue, IP . CNAME hostname. hostname - , ; CNAME , . - 118 - PTR , , Addr.arpa hostnaoes. IP hostnames. hostname hostname. MX RR . , 14.4.1 14.. MX : [domain] [ttl] [class] MX preference host host . , . , , , MX , . , , ( -preference value). HINFO . : [domain] [ttl] [class] HINFO hardware software , . , . "Assigned Numbers'' (RF 1340). , . . , "Assigned Numbers'' RFC. 7.2.3 . - 119 - 7.2.3, 7.2.3, 7.2.3, 7.2.3 brewery, vlager. ( ), - . , named, "DNS and BIND'' by Cricket Liu and Paul Albitz ([GETST "liu-dns"]). & " named.ca, 7.2.3, hint root name . , . root , nslookup, .(3) ; ; /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 10. named.ca. 7.2.4 (Name Server Setup). 3. , root , - root server hints: 22! , nslookup , 7.2.3, . - 120 - ; ; /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: ong howr 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 11. named.hosts. - 121 - (server setup). nslookup, . , nslookup hostname , resolv.conf, hostname. ( , nslookup - ) ; ; /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 ; minimum: 100 hrs ) IN NS vlager.vbrew.com. 1 IN PTR localhost. 12. named.local. , . , DNS , . , nslookup , . " > " (prompt), . , A , IP - 122 - . , "set type=type", type() , 7.2, ANY. , : ; ; /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. 13. named.rev. - 123 - $ nslookup Default Name Server: rs10.hrz.th-darmstadt.de Address: 130.83.56.60 > sunsite.unc.edu Name Server: rs10.hrz.th-darmstadt.de Address: 130.83.56.60 Non-authoritative answer: Name: sunsite.unc.edu Address: 152.2.22.81 , IP , DNS , nslookup : "No type A records found''. , ( ), "set type" . , SOA unc.edu, : > unc.edu *** No address (A) records available for unc.edu Name Server: rs10.hrz.th-darmstadt.de Address: 130.83.56.60 > set type=SOA > unc.edu Name Server: rs10.hrz.th-darmstadt.de Address: 130.83.56.60 Non-authoritative answer: unc.edu origin = ns.unc.edu & mcil addr = shava.ns.unc.edu serial = 930408 refresh = 28800 (8 hours) - 124 - retry = 3600 (1 hour) expire = 1209600 (14 days) minimum ttl = 86400 (1 day) Authoritative answers can be found from: UNC.EDU nameserver = SAMBA.ACS.UNC.EDU SAMBA.ACS.UNC.EDU internet address = 128.109.157.30 MX , .. ANY , . > set type=MX > unc.edu Non-authoritative answer: unc.edu preference = 10, mail exchanger = lambada.oit.unc.edu lambada.oit.unc.edu internet address = 152.2.22.80 Authoritative answers can be found from: UNC.EDU nameserver = SAMBA.ACS.UNC.EDU SAMBA.ACS.UNC.EDU internet address = 128.109.157.30 nslookup, , - root named.ca. , NS , root : > set typ=NS > . Name Server: fb0430.mathematik.th-darmstadt.de Address: 130.83.2.30 Non-authoritative answer: (root) nameserver = NS.INTERNIC.NET (root) nameserver = AOS.ARL.ARMY.MIL (root) nameserver = C.NYSER.NET - 125 - (root) nameserver = TERP.UMD.EDU (root) nameserver = NS.NASA.GOV (root) nameserver = NIC.NORDU.NET (root) nameserver = NS.NIC.DDN.MIL Authoritative answers can be found from: (root) nameserver = NS.INTERNIC.NET (root) nameserver = AOS.ARL.ARMY.MIL (root) nameserver = C.NYSER.NET (root) nameserver = TERP.UMD.EDU (root) nameserver = NS.NASA.GOV (root) nameserver = NIC.NORDU.NET (root) nameserver = NS.NIC.DDN.MIL NS.INTERNIC.NET internet address = 198.41.0.4 AOS.ARL.ARMY.MIL internet address = 128.63.4.82 AOS.ARL.ARMY.MIL internet address = 192.5.25.82 AOS.ARL.ARMY.MIL internet address = 26.3.0.29 C.NYSER.NET internet address = 192.33.4.12 TERP.UMD.EDU internet address = 128.8.10.90 NS.NASA.GOV internet address = 128.102.16.10 NS.NASA.GOV internet address = 192.52.195.10 NS.NASA.GOV internet address = 45.13.10.121 NIC.NORDU.NET internet address = 192.36.148.17 NS.NIC.DDN.MIL internet address = 192.112.36.4 , nslookup help nslookup. 7.2.5 , BIND . . , , . hostcvt - , - 126 - BIND , /etc/hosts named. (A) (PTR), .. , , SOA , , MX .. . Hostcvt - BIND , Linux FTP . , . (, ) dnswalk, perl-based DNS , . Dnswalk comp.sources.misc , FTP, . 8. IP , SLIP PPP, Internet connectivity . FIFO , . - mailbox, , IP . Linux- SLIP PPP. SLIP , . PPP MIchael Callahan Al Longyear. . 8.1 . , SLIP PPP, , - 127 - . looback interface, name resolution. Internet, DNS. - resolv.conf ; SLIP . , , SLIP/PPP . , , cache-only . , DNS , . - , , , . Named.boot cache-only , : ; named.boot file for caching-only server directory /var/named primary 0.0.127.in-addr.arpa db.127.0.0 ; loopback net cache . db.cache ; root servers , db.cache root . " ". 8.2 SLIP . IP SLIP account(). login account, ; script - SLIP interface. . - 128 - , SLIP -- user-space ; Linux, - , . , , SLIP . tty line discipline, SLIPDISC. tty line discipline (DISC0), , normal read (2) write(2) , SLIP - tty, , , SLIP . SLIP SLIP . SLIP, CSLIP, Van Jacobson header compression IP .(1) , - . SLIP - slattach. , /dev/cua3, SLIP . : #slattach /dev/cua3 & line discipline cua3 SLIPDISC, interface SLIP . SLIP , sl0; sl1, . SLIP . 1. Van Jacobson header compression RFC 1441. , slattach - CSLIP. , -p . , normal SLIP (no compression), # slattach -p slip /dev/cua3 & - 129 - - cslip, slip6, cslip6 ( - Slip()), adaptive SLIP. , , SLIP remote end. , , peer. , cowslip CSLIP, . , ping . pings , "Can't build ICMP header'' . - adaptive SLIP. , slattach SLIP, , , PPP KISS ( , ham radio). , slattach . 8. SLIP , interface. , ifconfig route . , vlager crowslip. : # ifconfig sl0 vlager pointopoint cowslip # route add cowslip # route add default gw cowslip interface point-to-point cowslip, route cowslip , cowslip . SLIP , cowslip, route c del , interface, slatch hangup( ). hangup , : - 130 - # route del default # route del cowslip # ifconfig sl0 down # kill -HUP 516 8.3 dip . , , , , . - , dip. (2) - 3.3.7. , dip . "" . Dip , , SLIP , interface. , . dip() . SLIP interface, dip root . , dip setuid root, SLIP root . , interface() dip . , SLIP , . , SLIP , SLIP , dip script(), . setuid root. (3) 8.3.1 Script(). - 131 - script 8.3.1. cowslip, dip script : 2. Dip Dialup IP. Fred van Kempen. 3. Diplogin ( ) setuid(). . . # Sample dip script for dialing up cowslip # Set local and remote name and address get $local vlager get $remote cowslip " port cua3 # choose a serial port speed 38400 # set speed to max modem HAYES # set modem type reset # reset modem and tty flush # flush out modem response # Prepare for dialing. send ATQ0V1E1X1\r wait OK 2 if $errlvl != 0 goto error dial 41988 if $errlvl != 0 goto error wait CONNECT 60 if $errlvl != 0 goto error # Okay, we're connected now sleep 3 send \r\n\r\n wait ogin: 10 if $errlvl != 0 goto error send Svlager\n wait ssword: 5 - 132 - if $errlvl != 0 goto error send hey-jude\n wait running 30 if $errlvl != 0 goto error # We have logged in, and the remote side is firing up SLIP. print Connected to $remote with address $rmtip default # Make this link our default route mode SLIP # We go to SLIP mode, too # fall through in case of error error: print SLIP to $remote failed. 14. dip script. # dip cowslip.dip DIP: Dialup IP Protocol Driver version 3.3.7 (12/13/93) Written by Fred N. van Kempen, MicroWalt Corporation. connected to cowslip.moo.com with addr 193.174.7.129 # cowslip SLIP, dip SL