DNS HOWTO

Nicolai Langfeldt janl@math.uio.no, ÐÅÒÅ×ÏÄ Alex Ott ott@phtd.tpu.edu.ru

v2.0.8, 25 á×ÇÕÓÔÁ 1998


ëÁË ÓÔÁÔØ ÚÁ ËÏÒÏÔËÏÅ ×ÒÅÍÑ ÁÄÍÉÎÉÓÔÒÁÔÏÒÏÍ DNS.

ðÒÉÍÅÞÁÎÉÅ ÐÅÒÅ×ÏÄÞÉËÁ: ûÌÉÔÅ ÍÎÅ ÌÀÂÙÅ ËÏÍÍÅÎÔÁÒÉÉ É ÚÁÍÅÞÁÎÉÑ, ÄÁÖÅ ÎÅÂÏÌØÛÉÅ.

1. ðÒÅÁÍÂÕÌÁ

ëÌÀÞÅ×ÙÅ ÓÌÏ×Á: DNS, bind, bind-4, bind-8, named, dialup, ppp, slip, isdn, Internet, ÄÏÍÅÎ (domain), ÉÍÑ (name), ÓÅÒ×ÅÒÁ (hosts), ÒÁÚÒÅÛÅÎÉÅ ÉÍÅÎ (resolving)

1.1 ïÆÉÃÉÁÌØÎÁÑ ÞÁÓÔØ

á×ÔÏÒÓËÉÅ ÐÒÁ×Á (c) Nicolai Langfeldt, 1995. îÅ ÉÓÐÒÁ×ÌÑÔØ ÂÅÚ ÉÚÍÅÎÅÎÉÑ Á×ÔÏÒÓËÉÈ ÐÒÁ×, ÒÁÓÐÒÏÓÔÒÁÎÑÅÔÓÑ Ó×ÏÂÏÄÎÏ ÐÒÉ ÓÏÈÒÁÎÅÎÉÉ Õ×ÅÄÏÍÌÅÎÉÑ Ï Á×ÔÏÒÓËÉÈ ÐÒÁ×ÁÈ.

1.2 ðÒÉÚÎÁÔÅÌØÎÏÓÔÉ É ÚÁÐÒÏÓ Ï ÐÏÍÏÝÉ

ñ ÈÏÞÕ ÐÏÂÌÁÇÏÄÁÒÉÔØ Arnt Gulbrandsen, ËÏÔÏÒÙÊ ÐÏÓÔÏÑÎÎÏ ÞÉÔÁÅÔ ÞÅÒÎÏ×ÉËÉ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ É ÄÁÅÔ ÍÎÏÇÏ ÓÏ×ÅÔÏ× É ÒÅËÏÍÅÎÄÁÃÉÊ. ñ ÔÁËÖÅ ÈÏÞÕ ÐÏÂÌÁÇÏÄÁÒÉÔØ ÌÀÄÅÊ, ËÏÔÏÒÙÅ ÐÒÉÓÌÁÌÉ ÍÎÅ Ó×ÏÉ ÐÒÅÄÌÏÖÅÎÉÑ É ÚÁÍÅÞÁÎÉÑ.

üÔÏÔ ÄÏËÕÍÅÎÔ ÎÉËÏÇÄÁ ÎÅ ÂÕÄÅÔ ÚÁËÏÎÞÅÎ, ÐÏÖÁÌÕÊÓÔÁ ÐÏÓÙÌÁÊÔÅ ÍÎÅ ÓÏÏÂÝÅÎÉÑ Ï ×ÁÛÉÈ ÕÓÐÅÈÁÈ É ÎÅÕÄÁÞÁÈ -- ÜÔÏ ÓÄÅÌÁÅÔ ÄÁÎÎÙÊ ÄÏËÕÍÅÎÔ ÌÕÞÛÅ. ôÁËÖÅ ÐÏÓÙÌÁÊÔÅ ÄÅÎØÇÉ, ËÏÍÍÅÎÔÁÒÉÉ É/ÉÌÉ ×ÏÐÒÏÓÙ ÎÁ ÁÄÒÅÓ janl@math.uio.no. åÓÌÉ ×Ù ÐÏÓÙÌÁÅÔÅ ÓÏÏÂÝÅÎÉÅ É ÈÏÔÉÔÅ ÐÏÌÕÞÉÔØ ÏÔ×ÅÔ, ÔÏ ÐÏÖÁÌÕÊÓÔÁ ÐÒÏÑ×ÉÔÅ ×ÅÖÌÉ×ÏÓÔØ É ÕÂÅÄÉÔÅÓØ, ÞÔÏ ÏÂÒÁÔÎÙÊ ÁÄÒÅÓ Ñ×ÌÑÅÔÓÑ ÐÒÁ×ÉÌØÎÙÍ É ÒÁÂÏÔÁÅÔ. ôÁËÖÅ ÐÏÖÁÌÕÊÓÔÁ ÐÒÏÞÉÔÁÊÔÅ ÒÁÚÄÅÌ ÷ÏÐÒÏÓÙ É ÏÔ×ÅÔÙ ÄÏ ÔÏÇÏ ËÁË ÐÏÓÙÌÁÔØ ÓÏÏÂÝÅÎÉÅ.

åÓÌÉ ×Ù ÈÏÔÉÔÅ ÐÅÒÅ×ÅÓÔÉ ÜÔÏÔ ÄÏËÕÍÅÎÔ, ÔÏ ÐÏÖÁÌÕÊÓÔÁ ÓÏÏÂÝÉÔÅ ÍÎÅ Ï ÜÔÏÍ, ÞÔÏ ÂÙ Ñ ÍÏÇ ÏÔÓÌÅÖÉ×ÁÔØ ÎÁ ËÁËÉÈ ÑÚÙËÁÈ Ñ ÂÙÌ ÏÐÕÂÌÉËÏ×ÁÎ, É ÔÁËÖÅ ÞÔÏÂÙ Ñ ÍÏÇ ÉÚ×ÅÓÔÉÔØ ×ÁÓ, ËÏÇÄÁ ÜÔÏÔ ÄÏËÕÍÅÎÔ ÂÕÄÅÔ ÏÂÎÏ×ÌÅÎ.

1.3 ðÏÓ×ÑÝÅÎÉÅ

üÔÏÔ ÄÏËÕÍÅÎÔ ÐÏÓ×ÑÝÅÎ Anne Line Norheim Langfeldt. èÏÔÑ ÏÎÁ ×ÅÒÏÑÔÎÏ ÎÉËÏÇÄÁ ÅÇÏ ÎÅ ÐÒÏÞÉÔÁÅÔ, ÐÏÓËÏÌØËÕ ÏÎÁ ÎÅ ÏÔÎÏÓÉÔÓÑ Ë ËÌÁÓÓÕ ÄÅ×ÕÛÅË, Õ×ÌÅÞÅÎÎÙÈ ÄÁÎÎÏÊ ÐÒÏÂÌÅÍÏÊ.

2. ÷×ÅÄÅÎÉÅ

þÔÏ ÜÔÏ ÔÁËÏÅ, É ÞÅÍ ÜÔÏÔ ÄÏËÕÍÅÎÔ ÎÅ Ñ×ÌÑÅÔÓÑ

äÌÑ ÎÁÞÉÎÁÀÝÉÈ, DNS -- ÜÔÏ äÏÍÅÎÎÁÑ óÉÓÔÅÍÁ éÍÅÎ (Domain Name System). DNS ÐÒÅÏÂÒÁÚÕÅÔ ÉÍÅÎÁ ÍÁÛÉÎ × IP-ÎÏÍÅÒÁ, ËÏÔÏÒÙÅ Ñ×ÌÑÀÔÓÑ ÁÄÒÅÓÁÍÉ ÍÁÛÉÎ, ÏÎÁ ÐÒÅÏÂÒÁÚÕÅÔ ÉÚ ÉÍÅÎ × ÁÄÒÅÓÁ É ÉÚ ÁÄÒÅÓÏ× × ÉÍÅÎÁ. üÔÏÔ ÄÏËÕÍÅÎÔ ÐÏËÁÚÙ×ÁÅÔ ËÁË ÏÐÒÅÄÅÌÉÔØ ÔÁËÉÅ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÑ, ÉÓÐÏÌØÚÕÑ ÓÉÓÔÅÍÕ ÎÁ ÂÁÚÅ Linux. ðÒÅÏÂÒÁÚÏ×ÁÎÉÅ -- ÜÔÏ ÐÒÏÓÔÏ ÓÏÚÄÁÎÉÅ ÁÓÓÏÃÉÁÃÉÉ ÍÅÖÄÕ Ä×ÕÍÑ ×ÅÝÁÍÉ, × ÎÁÛÅÍ ÓÌÕÞÁÅ ÍÅÖÄÕ ÉÍÅÎÅÍ ÍÁÛÉÎÙ, ÔÁËÉÍ ËÁË ftp.linux.org, É ÎÏÍÅÒÏÍ IP ÜÔÏÊ ÍÁÛÉÎÙ, ÎÁÐÒÉÍÅÒ 199.249.150.4.

DNS Ñ×ÌÑÅÔÓÑ, ÄÌÑ ÎÅÐÏÓ×ÑÝÅÎÎÙÈ (ÄÌÑ ×ÁÓ ;-), ÏÄÎÏÊ ÉÚ ÓÁÍÙÈ ÎÅÐÒÏÚÒÁÞÎÙÈ ÏÂÌÁÓÔÅÊ ÓÅÔÅ×ÏÇÏ ÁÄÍÉÎÉÓÔÒÉÒÏ×ÁÎÉÑ. üÔÏÔ ÄÏËÕÍÅÎÔ ÐÏÓÔÁÒÁÅÔÓÑ ÓÄÅÌÁÔØ ÎÅËÏÔÏÒÙÅ ×ÅÝÉ ÐÏÎÑÔÎÅÅ. úÄÅÓØ ÏÐÉÓÙ×ÁÅÔÓÑ ËÁË ÎÁÓÔÒÏÉÔØ ÐÒÏÓÔÏÊ ÓÅÒ×ÅÒ DNS. îÁÞÁ× Ó ÎÁÓÔÒÏÊËÉ ËÜÛÉÒÕÀÝÅÇÏ ÓÅÒ×ÅÒÁ, ÍÙ ÐÅÒÅÊÄÅÍ Ë ÎÁÓÔÒÏÊËÅ ÏÓÎÏ×ÎÏÇÏ ÓÅÒ×ÅÒÁ DNS ÄÌÑ ÄÏÍÅÎÁ. äÌÑ ÂÏÌÅÅ ÓÌÏÖÎÙÈ ÎÁÓÔÒÏÅË ×Ù ÍÏÖÅÔÅ ÐÏÓÍÏÔÒÅÔØ ÒÁÚÄÅÌ ÷ÏÐÒÏÓÙ É ÏÔ×ÅÔÙ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ. åÓÌÉ ÏÎ ÎÅ ÏÐÉÓÙ×ÁÅÔ, ÔÏ ÞÔÏ ×ÁÍ ÎÕÖÎÏ, ÔÏ ×ÁÍ ÐÏÎÁÄÏÂÉÔÓÑ ÐÒÏÞÉÔÁÔØ ÐÏÌÎÕÀ ÄÏËÕÍÅÎÔÁÃÉÀ. ñ ×ÏÚ×ÒÁÝÕÓØ Ë ÔÏÍÕ ÉÚ ÞÅÇÏ ÓÏÓÔÏÉÔ ÜÔÁ ÐÏÌÎÁÑ ÄÏËÕÍÅÎÔÁÃÉÑ × ÐÏÓÌÅÄÎËÊ ÇÌÁ×Å.

äÏ ÎÁÞÁÌÁ ÜÔÏÇÏ ÐÒÏÃÅÓÓÁ, ×Ù ÄÏÌÖÎÙ ÎÁÓÔÒÏÉÔØ ×ÁÛÕ ÍÁÛÉÎÕ ÔÁË, ÞÔÏÂÙ ×Ù ÍÏÇÌÉ ×ÙÐÏÌÎÑÔØ ËÏÍÁÎÄÕ telnet ÎÁ ÎÅÅ/Ó ÎÅÅ, É ÐÒÏÉÚ×ÏÄÉÔØ ÌÀÂÙÅ ÓÅÔÅ×ÙÅ ÓÏÅÄÉÎÅÎÉÑ, É ×ÁÍ ÓÏ×ÅÒÛÅÎÎÏ ÎÅÏÂÈÏÄÉÍÏ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ ×ÙÐÏÌÎÑÔØ ËÏÍÁÎÄÕ telnet 127.0.0.1 É ×ÈÏÄÉÔØ ÎÁ Ó×ÏÀ ÓÏÂÓÔ×ÅÎÎÕÀ ÍÁÛÉÎÕ (ÐÒÏÔÅÓÔÉÒÕÊÔÅ ÜÔÏ ÓÅÊÞÁÓ!). ÷ÁÍ ÔÁËÖÅ ÎÅÏÂÈÏÄÉÍÏ ÉÍÅÔØ ÐÒÁ×ÉÌØÎÏ ÎÁÓÔÒÏÅÎÎÙÅ ÆÁÊÌÙ /etc/nsswitch.conf (ÉÌÉ /etc/host.conf), /etc/resolv.conf É /etc/hosts, ÐÏÓËÏÌØËÕ Ñ ÎÅ ÂÕÄÕ ÏÂßÑÓÎÑÔØ ÉÈ ÆÕÎËÃÉÉ × ÜÔÏÍ ÄÏËÕÍÅÎÔÅ. åÓÌÉ ÒÁÂÏÔÁ ÓÅÔÉ Õ ×ÁÓ ÅÝÅ ÎÅ ÎÁÓÔÒÏÅÎÁ, ÔÏ × NET-3-HOWTO É/ÉÌÉ PPP-HOWTO ×ÁÍ ÏÂßÑÓÎÑÔ ËÁË ÜÔÏ ÓÄÅÌÁÔØ. ðÒÏÞÉÔÁÊÔÅ ÉÈ.

ëÏÇÄÁ Ñ ÇÏ×ÏÒÀ `×ÁÛÁ ÍÁÛÉÎÁ' Ñ ÐÏÄÒÁÚÕÍÅ×ÁÀ ÔÕ ÍÁÛÉÎÕ, ÎÁ ËÏÔÏÒÏÊ ×Ù ÐÙÔÁÅÔÅÓØ ÎÁÓÔÒÏÉÔØ DNS. á ÎÉ ËÁËÁÑ ÄÒÕÇÁÑ ÍÁÛÉÎÁ, ËÏÔÏÒÕÀ ×Ù ÍÏÇÌÉ ×Ï×ÌÅÞØ × ×ÁÛÉ ÓÅÔÅ×ÙÅ ÜËÓÐÅÒÉÍÅÎÔÙ.

ñ ÐÒÅÄÐÏÌÁÇÁÀ, ÞÔÏ ×Ù ÎÅ ÎÁÈÏÄÉÔÅÓØ ÚÁ firewall ÌÀÂÏÇÏ ÔÉÐÁ, ËÏÔÏÒÙÊ ÂÌÏËÉÒÕÅÔ ÚÁÐÒÏÓ ÉÍÅÎ. åÓÌÉ ×Ù ×ÓÅ-ÔÁËÉ ÎÁÈÏÄÉÔÅÓØ ÚÁ firewall, ÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÁ ÓÐÅÃÉÁÌØÎÁÑ ÎÁÓÔÒÏÊËÁ, ÓÍÏÔÒÉÔÅ ÒÁÚÄÅÌ ÷ÏÐÒÏÓÙ É ÏÔ×ÅÔÙ.

÷ Unix ÚÁÄÁÞÁ ÒÁÚÒÅÛÅÎÉÑ ÉÍÅÎ ×ÙÐÏÌÎÑÅÔÓÑ ÐÒÏÇÒÁÍÍÏÊ, ÎÁÚÙ×ÁÅÍÏÊ named. ïÎÁ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ ÐÁËÅÔÁ bind, ËÏÔÏÒÙÊ ÓÏÐÒÏ×ÏÖÄÁÅÔÓÑ Paul Vixie ÄÌÑ Internet Software Consortium. Named ×ËÌÀÞÅÎ × ÂÏÌØÛÉÎÓÔ×Ï ÄÉÓÔÒÉÂÕÔÉ×Ï× Linux, É ÏÂÙÞÎÏ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ËÁË /usr/sbin/named. åÓÌÉ Õ ×ÁÓ ÅÓÔØ named, ÔÏ ×Ù ×ÅÒÏÑÔÎÏ ÓÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÅÇÏ; åÓÌÉ Õ ×ÁÓ ÅÇÏ ÎÅÔ, ÔÏ ×Ù ÍÏÖÅÔÅ ÐÏÌÕÞÉÔØ ÉÓÐÏÌÎÑÅÍÙÅ ÆÁÊÌÙ Ó ÏÓÎÏ×ÎÙÈ ftp ÓÅÒ×ÅÒÏ× Linux, ÉÌÉ ×ÚÑÔØ ÐÏÓÌÅÄÎÀÀ É ÎÁÉÌÕÞÛÕÀ ×ÅÒÓÉÀ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× Ó ftp.isc.org:/isc/bind/src/cur/bind-8/. üÔÏÔ ÄÏËÕÍÅÎÔ ÏÐÉÓÙ×ÁÅÔ bind ×ÅÒÓÉÉ 8. óÔÁÒÙÅ ×ÅÒÓÉÉ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ, ÏÐÉÓÙ×ÁÀÝÉÅ bind ×ÅÒÓÉÉ 4, ÅÝÅ ÄÏÓÔÕÐÎÙ ÐÏ ÁÄÒÅÓÕ http://www.math.uio.no/~janl/DNS/, × ÔÏÍ ÓÌÕÞÁÅ, ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ bind 4. åÓÌÉ ÓÐÒÁ×ÏÞÎÁÑ ÓÔÒÁÎÉÃÁ named ÓÓÙÌÁÅÔÓÑ ÎÁ ÆÁÊÌ named.conf, ÔÏ Õ ×ÁÓ ÓÔÏÉÔ bind 8, ÅÓÌÉ ÏÎÁ ÓÓÙÌÁÅÔÓÑ ÎÁ named.boot, ÔÏ Õ ×ÁÓ bind 4. åÓÌÉ Õ ×ÁÓ ÕÓÔÁÎÏ×ÌÅÎ bind ×ÅÒÓÉÉ 4 É ×Ù ÏÓÏÓÚÎÁÅÔÅ ÎÅÏÂÈÏÄÉÍÏÓÔØ ÓÏÈÒÁÎÅÎÉÑ ÂÅÚÏÐÁÓÎÏÓÔÉ, ÔÏ ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÄÏÌÖÎÙ ÏÂÎÏ×ÉÔØ ×ÁÛÕ ×ÅÒÓÉÀ ÄÏ ×ÅÒÓÉÉ 8.

DNS Ñ×ÌÑÅÔÓÑ ÂÁÚÏÊ ÄÁÎÎÙÈ ×Ï ×ÓÅÍÉÒÎÏÊ ÓÅÔÉ. ðÏÜÔÏÍÕ ÚÁÂÏÔØÔÅÓØ Ï ÔÏÍ, ÞÔÏ ×Ù ÐÏÍÅÝÁÅÔÅ × ÎÅÅ. åÓÌÉ ×Ù ÂÕÄÅÔÅ ÐÏÍÅÝÁÔØ × ÎÅÅ ×ÓÑËÉÊ ÈÌÁÍ, ÔÏ É ×Ù É ÄÒÕÇÉÅ ÌÀÄÉ ÔÁËÖÅ ÐÏÌÕÞÁÔ ×ÓÑËÉÊ ÈÌÁÍ. èÒÁÎÉÔÅ ×ÁÛÕ ÂÁÚÕ DNS × ÁËËÕÒÁÔÎÏÓÔÉ É ×Ù ÐÏÌÕÞÉÔÅ ÈÏÒÏÛÅÅ ÏÂÓÌÕÖÉ×ÁÎÉÅ Ó ÅÅ ÓÔÏÒÏÎÙ. õÞÉÔÅÓØ ËÁË ÉÓÐÏÌØÚÏ×ÁÔØ ÅÅ, ÁÄÍÉÎÉÓÔÒÉÒÏ×ÁÔØ É ÏÔÌÁÖÉ×ÁÔØ, É ×Ù ÂÕÄÅÔÅ ÅÝÅ ÏÄÎÉÍ ÈÏÒÏÛÉÍ ÁÄÍÉÎÉÓÔÒÁÔÏÒÏÍ, ÈÒÁÎÑÝÉÍ ÓÅÔØ ÏÔ ÓÂÏÅ× × ÒÅÚÕÌØÔÁÔÅ ÎÅÕÍÅÌÏÇÏ ÕÐÒÁ×ÌÅÎÉÑ.

÷ ÜÔÏÍ ÄÏËÕÍÅÎÔÅ Ñ ËÏÎÓÔÁÔÉÒÕÀ ÎÁÂÏÒ ×ÅÝÅÊ, ËÏÔÏÒÙÅ × ÓÁÍÏÍ ÄÅÌÅ ÎÅ Ñ×ÌÑÀÔÓÑ ÐÏÌÎÏÓÔØÀ ÐÒÁ×ÉÌØÎÙÍÉ (ÏÎÉ Ñ×ÌÑÀÔÓÑ ÐÏ ËÒÁÊÎÅÊ ÍÅÒÅ ÎÁÐÏÌÏ×ÉÎÕ ÐÒÁ×ÉÌØÎÙÍÉ). ÷ÓÅ ÜÔÏ ÓÄÅÌÁÎÏ × ÃÅÌÑÈ ÕÐÒÏÝÅÎÉÑ. üÔÉ ×ÅÝÉ (×ÅÒÏÑÔÎÏ ;-) ÂÕÄÕÔ ÒÁÂÏÔÁÔØ, ÅÓÌÉ ×Ù ÐÏ×ÅÒÉÔÅ, ÔÏÍÕ ÞÔÏ Ñ ÓËÁÖÕ.

óÏ×ÅÔ: óÄÅÌÁÊÔÅ ÒÅÚÅÒ×ÎÙÅ ËÏÐÉÉ ×ÓÅÈ ÆÁÊÌÏ×, ËÏÔÏÒÙÅ Ñ ÂÕÄÕ ÓÏ×ÅÔÏ×ÁÔØ ÉÚÍÅÎÉÔØ, ÅÓÌÉ Õ ×ÁÓ ÏÎÉ ÕÖÅ ÅÓÔØ, ÔÁË ÞÔÏ ÅÓÌÉ ÎÉÞÅÇÏ ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ, ÔÏ ×Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ ÎÁÚÁÄ Ë ÒÁÂÏÞÅÊ ËÏÎÆÉÇÕÒÁÃÉÉ.

3. îÁÓÔÒÏÊËÁ ËÅÛÉÒÕÀÝÅÇÏ ÓÅÒ×ÅÒÁ ÉÍÅÎ.

üÔÏ ÐÅÒ×ÙÊ ÛÁÇ × ÎÁÓÔÒÏÊËÅ DNS, ÏÞÅÎØ ÐÏÌÅÚÎÙÊ ÄÌÑ dialup ÐÏÌØÚÏ×ÁÔÅÌÅÊ

ëÅÛÉÒÕÀÝÉÊ ÓÅÒ×ÅÒ ÎÁÊÄÅÔ ÏÔ×ÅÔ ÎÁ ÚÁÐÒÏÓ Ï ÉÍÅÎÉ ÍÁÛÉÎÙ É ÚÁÐÏÍÎÉÔ ÅÇÏ, ÞÔÏÂÙ ÏÔ×ÅÔÉÔØ, ËÏÇÄÁ ×Ù ÚÁÐÒÏÓÉÔÅ ÜÔÕ ÖÅ ÉÎÆÏÒÍÁÃÉÀ × ÓÌÅÄÕÀÝÉÊ ÒÁÚ. üÔÏ ÚÎÁÞÉÔÅÌØÎÏ ÕÍÅÎØÛÉÔ ×ÒÅÍÑ ÏÖÉÄÁÎÉÑ ÏÔ×ÅÔÁ ÐÒÉ ÓÌÅÄÕÀÝÅÍ ÚÁÐÒÏÓÅ, ÏÓÏÂÅÎÎÏ ÅÓÌÉ Õ ×ÁÓ ÍÅÄÌÅÎÎÏÅ ÓÏÅÄÉÎÅÎÉÅ.

äÄÑ ÎÁÞÁÌÁ ×ÁÍ ÎÕÖÅÎ ÆÁÊÌ, ÎÁÚ×ÁÎÎÙÊ /etc/named.conf. éÚ ÎÅÇÏ named ÞÉÔÁÅÔ ÉÎÆÏÒÍÁÃÉÀ ÐÒÉ ÓÔÁÒÔÅ. óÅÊÞÁÓ ÏÎ ÄÏÌÖÅÎ ÐÒÏÓÔÏ ÓÏÄÅÒÖÁÔØ ÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ:


// æÁÊÌ ÎÁÓÔÒÏÅË ÄÌÑ ÔÏÌØËÏ ËÅÛÉÒÕÀÝÅÇÏ ÓÅÒ×ÅÒÁ

options {
        directory "/var/named";

        // òÁÓËÏÍÍÅÎÔÉÒÕÊÔÅ ÓÌÅÄÕÀÝÕÀ ÓÔÒÏËÕ, ÅÓÌÉ ×Ù
        // ÒÁÂÏÔÁÅÔÅ ÞÅÒÅÚ firewall É ÓÉÓÔÅÍÁ ÎÅ ÒÁÂÏÔÁÅÔ:

        // query-source address * port 53;
};

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

zone "0.0.127.in-addr.arpa" {
        type master;
        file "pz/127.0.0";
};

óÔÒÏËÁ `directory' ÚÁÄÁÅÔ ÇÄÅ ÉÓËÁÔØ ÆÁÊÌÙ. ÷ÓÅ ÆÁÊÌÙ ÉÓÐÏÌØÚÕÅÍÙÅ ×ÐÏÓÌÅÄÓÔ×ÉÉ, ÂÕÄÕÔ ÉÍÅÎÏ×ÁÔØÓÑ ÏÔÎÏÓÉÔÅÌØÎÏ ÜÔÏÊ ÄÉÒÅËÔÏÒÉÉ. ôÁËÉÍ ÏÂÒÁÚÏÍ pz -- ÜÔÏ ÄÉÒÅËÔÏÒÉÑ × ÄÉÒÅËÔÏÒÉÉ /var/named, Ô.Å., /var/named/pz. /var/named -- ÜÔÏ ÐÒÁ×ÉÌØÎÁÑ ÄÉÒÅËÔÏÒÉÑ ÓÏÇÌÁÓÎÏ Linux File system Standard (óÔÁÎÄÁÒÔÕ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÙ Linux).

æÁÊÌ ÎÁÚ×ÁÎÎÙÊ /var/named/root.hints ÄÏÌÖÅÎ ÎÁÈÏÄÉÔÓÑ × ÕËÁÚÁÎÎÏÊ ÄÉÒÅËÔÏÒÉÉ. ïÎ ÄÏÌÖÅÎ ÓÏÄÅÒÖÁÔØ ÓÌÅÄÕÀÝÕÀ ÉÎÆÏÒÍÁÃÉÀ:


.                       6D IN NS        G.ROOT-SERVERS.NET.
.                       6D IN NS        J.ROOT-SERVERS.NET.
.                       6D IN NS        K.ROOT-SERVERS.NET.
.                       6D IN NS        L.ROOT-SERVERS.NET.
.                       6D IN NS        M.ROOT-SERVERS.NET.
.                       6D IN NS        A.ROOT-SERVERS.NET.
.                       6D IN NS        H.ROOT-SERVERS.NET.
.                       6D IN NS        B.ROOT-SERVERS.NET.
.                       6D IN NS        C.ROOT-SERVERS.NET.
.                       6D IN NS        D.ROOT-SERVERS.NET.
.                       6D IN NS        E.ROOT-SERVERS.NET.
.                       6D IN NS        I.ROOT-SERVERS.NET.
.                       6D IN NS        F.ROOT-SERVERS.NET.

G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241

üÔÏÔ ÆÁÊÌ ÏÐÉÓÙ×ÁÅÔ ÉÍÅÎÁ ËÏÒÎÅ×ÙÈ ÓÅÒ×ÅÒÏ× ÉÍÅÎ ÐÏ ×ÓÅÍÕ ÍÉÒÕ. éÈ ÓÐÉÓÏË ÉÚÍÅÎÑÅÔÓÑ ×ÒÅÍÑ ÏÔ ×ÒÅÍÅÎÉ É ÜÔÁ ÞÁÓÔØ × ÄÁÌØÎÅÊÛÅÍ ÄÏÌÖÎÁ ÓÏÐÒÏ×ÏÖÄÁÔØÓÑ. óÍÏÔÒÉÔÅ ÒÁÚÄÅÌ ÐÏ ÓÏÐÒÏ×ÏÖÄÅÎÉÀ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÕÚÎÁÔØ ËÁË ÈÒÁÎÉÔØ ÜÔÕ ÉÎÆÏÒÍÁÃÉÀ ÓÏÏÔ×ÅÔÓ×ÕÀÝÅÊ ÄÅÊÓÔ×ÉÔÅÌØÎÏÓÔÉ. óÌÅÄÕÀÝÉÊ ÒÁÚÄÅÌ × named.conf -- ÜÔÏ ÐÏÓÌÅÄÎÑÑ ÚÏÎÁ. ñ ÏÂßÑÓÎÀ ËÁË ÏÎÁ ÉÓÐÏÌØÚÕÅÔÓÑ × ÓÌÅÄÕÀÝÉÈ ÒÁÚÄÅÌÁÈ, ÓÅÊÞÁÓ ÐÒÏÓÔÏ ÓÏÚÄÁÊÔÅ ÆÁÊÌ, ÎÁÚ×ÁÎÎÙÊ 127.0.0 × ÐÏÄÄÉÒÅËÔÏÒÉÉ pz:


@               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                1       ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                1W      ; Expire
                                1D)     ; Minimum TTL
                        NS      ns.linux.bogus.
1                       PTR     localhost.

äÁÌÅÅ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ, ÞÔÏÂÙ ×ÁÛ ÆÁÊÌ /etc/resolv.conf ×ÙÇÌÑÄÅÌ ÐÒÉÍÅÒÎÏ ÔÁË:


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

óÔÒÏËÁ `search' ÚÁÄÁÅÔ × ËÁËÉÈ ÄÏÍÅÎÁÈ ÄÏÌÖÅÎ ÉÄÔÉ ÐÏÉÓË ÍÁÛÉÎ Ó ËÏËÔÏÒÙÍÉ ×Ù ÈÏÔÉÔÅ ÓÏÅÄÉÎÉÔØÓÑ. óÔÒÏËÁ `nameserver' ÕËÁÚÙ×ÁÅÔ ÁÄÒÅÓ ×ÁÛÅÇÏ ÓÅÒ×ÅÒÁ ÉÍÅÎ, × ÎÁÛÅÍ ÓÌÕÞÁÅ ÜÔÏ ×ÁÛÁ ÓÏÂÓÔ×ÅÎÎÁÑ ÍÁÛÉÎÁ, ÐÏÓËÏÌØËÕ ÎÁ ÎÅÊ ÚÁÐÕÝÅÎ named (127.0.0.1 ÜÔÏ ÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ, ÔÁËÖÅ ÎÉËÁËÉÈ ÐÒÏÂÌÅÍ, ÅÓÌÉ ×ÁÛÁ ÍÁÛÉÎÁ ÉÍÅÅÔ ÄÒÕÇÏÊ ÁÄÒÅÓ). åÓÌÉ ×Ù ÈÏÔÉÔÅ ÐÅÒÅÞÉÓÌÉÔÅ ÎÅÓËÏÌØËÏ ÓÅÒ×ÅÒÏ× ÉÍÅÎ, ÔÏ ÐÏÍÅÓÔÉÔÅ ÉÈ ÐÏ ÏÄÎÏÍÕ × ÓÔÒÏËÕ ÓÏ ÓÌÏ×ÏÍ `nameserver' ÄÌÑ ËÁÖÄÏÇÏ. (úÁÍÅÞÁÎÉÅ: Named ÎÉËÏÇÄÁ ÎÅ ÞÉÔÁÅÔ ÜÔÏÔ ÆÁÊÌ, ÜÔÏ ÄÅÌÁÅÔ ÐÒÏÇÒÁÍÍÁ resolver, ËÏÔÏÒÁÑ ÉÓÐÏÌØÚÕÅÔ named).

ðÒÏÉÌÌÀÓÔÒÉÒÕÅÍ ËÁË ÜÔÏ ÒÁÂÏÔÁÅÔ: åÓÌÉ ËÌÉÅÎÔ ÐÙÔÁÅÔÓÑ ÎÁÊÔÉ ÍÁÛÉÎÕ Ó ÉÍÅÎÅÍ foo, ÔÏ ÓÎÁÞÁÌÁ ÐÒÏÇÒÁÍÍÁ ÐÙÔÁÅÔÓÑ ÎÁÊÔÉ ÍÁÛÉÎÕ Ó ÐÏÌÎÙÍ ÉÍÅÎÅÍ foo.subdomain.your-domain.edu, ÚÁÔÅÍ Ó ÉÍÅÎÅÍ foo.your-fomain.edu, É × ËÏÎÃÅ ËÏÎÃÏ× foo. åÓÌÉ ËÌÉÅÎÔ ÐÙÔÁÅÔÓÑ ÎÁÊÔÉ sunsite.unc.edu, ÔÏ ÓÎÁÞÁÌÁ ÐÒÏÂÕÅÔÓÑ sunsite.unc.edu.subdomain.your-domain.edu (ÄÁ ÜÔÏ ÇÌÕÐÏ, ÎÏ ×ÏÔ ÔÁË ÜÔÏ ÒÁÂÏÔÁÅÔ), ÚÁÔÅÍ sunsite.unc.edu.your-domain.edu, É × ËÏÎÃÅ ËÏÎÃÏ× sunsite.unc.edu. ÷Ù ÍÏÖÅÔÅ ÎÅ ÐÏÍÅÝÁÔØ ÓÌÉÛËÏÍ ÍÎÏÇÏ ÄÏÍÅÎÏ× × ÓÔÒÏËÕ ÐÏÉÓËÁ, ÐÏÓËÏÌØËÕ ÐÏÉÓË × ÎÉÈ ÚÁÊÍÅÔ ÓÌÉÛËÏÍ ÍÎÏÇÏ ×ÒÅÍÅÎÉ.

ðÒÉÍÅÒ ÐÒÅÄÐÏÌÁÇÁÅÔ, ÞÔÏ ×Ù ÎÁÈÏÄÉÔÅÓØ × ÄÏÍÅÎÅ subdomain.your-domain.edu, É ×ÁÛÁ ÍÁÛÉÎÁ ×ÅÒÏÑÔÎÏ ÎÁÚÙ×ÁÅÔÓÑ your-machine.subdomain.your-domain.edu. óÔÒÏËÁ ÐÏÉÓËÁ ÎÅ ÄÏÌÖÎÁ ÓÏÄÅÒÖÁÔØ ×ÁÛ TLD (Top Level Domain (äÏÍÅÎ ÷ÅÒÈÎÅÇÏ õÒÏ×ÎÑ), `edu' × ÎÁÛÅÍ ÓÌÕÞÁÅ). åÓÌÉ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÞÁÓÔÏ ÓÏÅÄÉÎÑÔØÓÑ Ó ÍÁÛÉÎÏÊ × ÄÒÕÇÏÍ ÄÏÍÅÎÅ, ÔÏ ×Ù ÍÏÖÅÔÅ ÄÏÂÁ×ÉÔØ ÜÔÏÔ ÄÏÍÅÎ × ÓÔÒÏËÕ ÐÏÉÓËÁ, ÐÒÉÍÅÒÎÏ ×ÏÔ ÔÁË:


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

É ÔÁË ÄÁÌÅÅ. ïÞÅ×ÉÄÎÏ, ÞÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÐÏÍÅÓÔÉÔØ × ÜÔÕ ÓÔÒÏËÕ ÉÍÅÎÁ ÎÁÓÔÏÑÝÉÈ ÄÏÍÅÎÏ×, ×ÍÅÓÔÏ ×ÙÛÅÐÒÉ×ÅÄÅÎÎÙÈ. ðÏÖÁÌÕÊÓÔÁ ÚÁÍÅÔØÔÅ ÏÔÓÕÔÓÔ×ÉÅ ÔÏÞËÉ × ËÏÎÃÅ ÉÍÅÎÉ ÄÏÍÅÎÁ.

äÁÌÅÅ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ×ÁÛÅÊ ×ÅÒÓÉÉ libc ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ×ÎÏÓÉÔØ ÉÓÐÒÁ×ÌÅÎÉÑ ÌÉÂÏ × ÆÁÊÌ /etc/nsswitch.conf, ÌÉÂÏ × ÆÁÊÌ /etc/host.conf. åÓÌÉ Õ ×ÁÓ ÕÖÅ ÅÓÔØ ÆÁÊÌ nsswitch.conf, ÔÏ ÚÎÁÞÉÔ ÍÙ ÂÕÄÅÍ ×ÎÏÓÉÔØ ÉÓÐÒÁ×ÌÅÎÉÑ × ÎÅÇÏ, ÅÓÌÉ ÖÅ ÅÇÏ ÎÅÔ, ÔÏ ÍÙ ÂÕÄÅÍ ×ÎÏÓÉÔØ ÉÚÍÅÎÅÎÉÑ × ÆÁÊÌ host.conf.

/etc/nsswitch.conf

üÔÏ ÄÌÉÎÎÙÊ ÆÁÊÌ ÏÐÉÓÙ×ÁÀÝÉÊ ËÁË ÐÏÌÕÞÉÔØ ÒÁÚÎÙÅ ÔÉÐÙ ÄÁÎÎÙÈ, ÉÚ ËÁËÏÇÏ ÆÁÊÌÁ ÉÌÉ ÂÁÚÙ ÄÁÎÎÙÈ. ÷ ÎÁÞÁÌÅ ÏÎ ÏÂÙÞÎÏ ÓÏÄÅÒÖÉÔ ÐÏÌÅÚÎÙÅ ËÏÍÍÅÎÔÁÒÉÉ, ËÏÔÏÒÙÅ ×Ù ÄÏÌÖÎÙ ÕÞÅÓÔØ ÐÒÉ ÞÔÅÎÉÉ ÜÔÏÇÏ ÆÁÊÌÁ. ðÏÓÌÅ ÔÏÇÏ, ËÁË ×Ù ÎÁÊÄÅÔÅ ÓÔÒÏËÕ ÎÁÞÉÎÁÀÝÕÀÓÑ Ó `hosts:', ×Ù ÄÏÌÖÎÙ Õ×ÉÄÅÔØ:


hosts:      files dns

åÓÌÉ × ÜÔÏÍ ÆÁÊÌÅ ÎÅÔ ÓÔÒÏËÉ ÎÁÞÉÎÁÀÝÅÊÓÑ Ó `hosts:', ÔÏ ÐÏÍÅÓÔÉÔÅ ×ÙÛÅÐÒÉ×ÅÄÅÎÎÕÀ ÓÔÒÏËÕ × ÆÁÊÌ. üÔÁ ÓÔÒÏËÁ ÕËÁÚÙ×ÁÅÔ ÐÒÏÇÒÁÍÍÁÍ ÓÎÁÞÁÌÁ ×ÙÐÏÌÎÑÔØ ÐÏÉÓË × ÆÁÊÌÅ /etc/hosts, Á ÚÁÔÅÍ ÐÒÏÓÍÁÔÒÉ×ÁÔØ DNS × ÓÏÏÔ×ÅÔÓÔ×ÉÉ Ó ÐÏÒÑÄËÏÍ ÕËÁÚÁÎÏÍ × ÆÁÊÌÅ resolv.conf.

/etc/host.conf

üÔÏÔ ÆÁÊÌ ×ÅÒÏÑÔÎÏ ÓÏÄÅÒÖÉÔ ÒÁÚÎÙÅ ÄÁÎÎÙÅ, ÏÄÎÁ ÉÚ ÓÔÒÏË ÄÏÌÖÎÁ ÎÁÞÉÎÁÔØÓÑ ÓÏ ÓÌÏ×Á order É ×ÙÇÌÑÄÅÔØ ÐÒÉÍÅÒÎÏ ÔÁË:


order hosts,bind

åÓÌÉ ÓÔÒÏËÉ Ó `order' ÎÅÔ, ÔÏ ×Ù ÄÏÌÖÎÙ ÅÅ ×ÓÔÁ×ÉÔØ. ïÎÁ ÚÁÓÔÁ×ÌÑÅÔ ÐÏÄÐÒÏÇÒÁÍÍÕ ÒÁÚÒÅÛÅÎÉÑ ÉÍÅÎ ÓÎÁÞÁÌÁ ÐÏÓÍÏÔÒÅÔØ × ÆÁÊÌÅ /etc/hosts, Á ÚÁÔÅÍ ÓÄÅÌÁÔØ ÚÁÐÒÏÓ Ë ÓÅÒ×ÅÒÕ ÉÍÅÎ (ËÏÔÏÒÙÊ × resolv.conf ÕËÁÚÁÎ ËÁË ÍÁÛÉÎÁ Ó ÁÄÒÅÓÏÍ 127.0.0.1). üÔÉ Ä×Á ÐÏÓÌÅÄÎÉÈ ÆÁÊÌÁ ÏÐÉÓÁÎÙ × ÒÁÚÄÅÌÅ (8) ÓÐÒÁ×ÏÞÎÏÊ ÓÉÓÔÅÍÙ (×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ `man 8 resolv') × ÂÏÌØÛÉÎÓÔ×Å ÄÉÓÔÒÉÂÕÔÉ×Ï× Linux. ðÏ ÍÏÅÍÕ ÍÎÅÎÉÀ ÜÔÏ ×ÐÏÌÎÅ ÞÉÔÁÅÍÁÑ ÓÐÒÁ×ÏÞÎÁÑ ÓÔÒÁÎÉÃÁ, É ËÁÖÄÙÊ ÞÅÌÏ×ÅË, ÏÓÏÂÅÎÎÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÙ DNS, ÄÏÌÖÎÙ ÐÒÏÞÉÔÁÔØ ÅÅ ÈÏÔÑ ÂÙ ÒÁÚ. óÄÅÌÁÊÔÅ ÜÔÏ ÓÅÊÞÁÓ! åÓÌÉ ×Ù ÓËÁÖÅÔÅ ÓÅÂÅ "Ñ ÓÄÅÌÁÀ ÜÔÏ ÐÏÚÖÅ", ÔÏ ×Ù ÎÉËÏÇÄÁ ÜÔÏ ÎÅ ÓÄÅÌÁÅÔÅ.

3.1 úÁÐÕÓË named

ðÏÓÌÅ ÜÔÉÈ ÐÒÉÇÏÔÏ×ÌÅÎÉÊ ÐÒÉÛÌÏ ×ÒÅÍÑ ÚÁÐÕÓËÁ named. åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ dialup ÓÏÅÄÉÎÅÎÉÅ, ÔÏ ÓÎÁÞÁÌÁ ÐÒÏÉÚ×ÅÄÉÔÅ ÐÏÄËÌÀÞÅÎÉÅ. îÁÂÅÒÉÔÅ `ndc start' ÂÅÚ ÏÐÃÉÊ, É ÎÁÖÍÉÔÅ ËÌÁ×ÉÛÕ return. åÓÌÉ ÎÉËÁËÏÇÏ ÒÅÚÕÌØÔÁÔÁ ÎÅÔ, ÔÏ ÐÏÐÒÏÂÕÊÔÅ ÓÌÅÄÕÀÝÕÀ ËÏÍÁÎÄÕ `/usr/sbin/ndc start'. åÓÌÉ ÏÐÑÔØ ÐÏÐÙÔËÁ ÎÅ ÕÄÁÌÁÓØ, ÔÏ ÓÍÏÔÒÉÔÅ ÒÁÚÄÅÌ ÷ÏÐÒÏÓÙ É ÏÔ×ÅÔÙ. ôÅÐÅÒØ ÍÙ ÍÏÖÅÍ ÐÒÏÔÅÓÔÉÒÏ×ÁÔØ ÎÁÛÕ ÎÁÓÔÒÏÊËÕ. åÓÌÉ ×Ù ÐÏÓÍÏÔÒÉÔÅ × ÆÁÊÌ ÓÏÏÂÝÅÎÉÊ syslog (ÏÂÙÞÎÏ ÎÁÚ×ÁÎÎÙÊ /var/adm/messages, ÎÏ ÍÏÖÅÔ ÂÙÔØ ÄÒÕÇÁÑ ÄÉÒÅËÔÏÒÉÑ /var/log É ÄÒÕÇÏÊ ÆÁÊÌ syslog × ËÏÔÏÒÙÅ ÎÅÏÂÈÏÄÉÍÏ ÐÏÓÍÏÔÒÅÔØ) ×Ï ×ÒÅÍÑ ÚÁÐÕÓËÁ named (×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ tail -f /var/log/messages), ÔÏ ×Ù ÄÏÌÖÎÙ Õ×ÉÄÅÔØ ÞÔÏ-ÔÏ ÐÏÄÏÂÎÏÅ ÓÌÅÄÕÀÝÅÍÕ:

(ÓÔÒÏËÉ ÚÁËÁÎÞÉ×ÁÀÝÉÅÓÑ ÎÁ \ ÐÒÏÄÏÌÖÁÀÔÓÑ ÎÁ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÅ)

Feb 15 01:26:17 roke named[6091]: starting.  named 8.1.1 Sat Feb 14 \
  00:18:20 MET 1998 ^Ijanl@roke.uio.no:/var/tmp/bind-8.1.1/src/bin/named
Feb 15 01:26:17 roke named[6091]: cache zone "" (IN) loaded (serial 0)
Feb 15 01:26:17 roke named[6091]: master zone "0.0.127.in-addr.arpa" \
  (IN) loaded (serial 1)
Feb 15 01:26:17 roke named[6091]: listening [127.0.0.1].53 (lo)
Feb 15 01:26:17 roke named[6091]: listening [129.240.230.92].53 (ippp0)
Feb 15 01:26:17 roke named[6091]: Forwarding source address is [0.0.0.0].1040
Feb 15 01:26:17 roke named[6092]: Ready to answer queries.

åÓÌÉ ÅÓÔØ ËÁËÉÅ-ÎÉÂÕÄØ ÓÏÏÂÝÅÎÉÑ Ï ÏÛÉÂËÁÈ, ÔÏ ÚÎÁÞÉÔ ×Ù ÞÔÏ-ÔÏ ÓÄÅÌÁÌÉ ÎÅÐÒÁ×ÉÌØÎÏ. Named ÕËÁÖÅÔ × ËÁËÏÍ ÆÁÊÌÅ ÏÛÉÂËÁ (Ñ ÎÁÄÅÀÓØ, ÞÔÏ ÜÔÏ ÏÄÉÎ ÉÚ ÆÁÊÌÏ× named.conf É root.hints :-). úÁ×ÅÒÛÉÔÅ ×ÙÐÏÌÎÅÎÉÅ named É ÐÒÏ×ÅÒØÔÅ ÆÁÊÌÙ ËÏÎÆÉÇÕÒÁÃÉÉ.

ôÅÐÅÒØ ÐÏÒÁ ÚÁÐÕÓÔÉÔØ nslookup É ÐÒÏ×ÅÒÉÔØ ÒÅÚÕÌØÔÁÔÙ ×ÁÛÅÊ ÒÁÂÏÔÙ.

$ nslookup
Default Server:  localhost
Address:  127.0.0.1

>

åÓÌÉ ÜÔÏ ×ÙÇÌÑÄÉÔ ÔÁË, ÔÏ ÚÎÁÞÉÔ ×Ù ÚÁÓÔÁ×ÉÌÉ ÓÉÓÔÅÍÕ ÒÁÂÏÔÁÔØ. íÙ ÔÁË ÎÁÄÅÅÍÓÑ. åÓÌÉ ÞÔÏ-ÔÏ ÄÒÕÇÏÅ, ÔÏ ×ÅÒÎÉÔÅÓØ ÎÁÚÁÄ É ×ÓÅ ÐÒÏ×ÅÒØÔÅ. ëÁÖÄÙÊ ÒÁÚ ËÏÇÄÁ ×Ù ÉÚÍÅÎÑÅÔÅ ÆÁÊÌ named.conf, ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÐÅÒÅÚÁÐÕÓÔÉÔØ named, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ ndc restart.

ôÅÐÅÒØ ÍÙ ÍÏÖÅÍ ××ÅÓÔÉ ÚÁÐÒÏÓ ÎÁ ÐÏÉÓË ÉÎÆÏÒÍÁÃÉÉ. ðÏÐÒÏÂÕÊÔÅ ÎÁÊÔÉ ÍÁÛÉÎÕ ÂÌÉÚËÕÀ Ë ×ÁÍ. pat.uio.no ÎÁÈÏÄÉÔÓÑ ÂÌÉÚËÏ ÏÔ ÍÅÎÑ, × õÎÉ×ÅÒÓÉÔÅÔÅ ïÓÌÏ:

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

Name:    pat.uio.no
Address:  129.240.130.16

óÅÊÞÁÓ nslookup ÐÏÐÒÏÓÉÔ ×ÁÛ named ÐÏÓÍÏÔÒÅÔØ ÉÎÆÏÒÍÁÃÉÀ Ï ÍÁÛÉÎÅ pat.uio.no. úÁÔÅÍ ÏÎ ÓÏÅÄÉÎÉÔÓÑ Ó ÏÄÎÉÍ ÉÚ ÓÅÒ×ÅÒÏ× ÉÍÅÎ, ÐÅÒÅÞÉÓÌÅÎÎÙÈ × ×ÁÛÅÍ ÆÁÊÌÅ root.hints, É ÚÁÐÒÏÓÉÔ Õ ÎÅÇÏ ÐÕÔØ Ë ÄÁÎÎÏÊ ÍÁÛÉÎÅ. üÔÏ ÍÏÖÅÔ ÚÁÎÑÔØ ËÁËÏÅ-ÔÏ ×ÒÅÍÑ, ÄÏ ÔÏÇÏ ËÁË ×Ù ÐÏÌÕÞÉÔÅ ÒÅÚÕÌØÔÁÔÙ, ÐÏÓËÏÌØËÕ ÓÉÓÔÅÍÁ ÓÎÁÞÁÌÁ ÉÝÅÔ ÚÁÄÁÎÎÕÀ ÍÁÛÉÎÕ ×Ï ×ÓÅÈ ÄÏÍÅÎÁÈ ÐÅÒÅÞÉÓÌÅÎÎÙÈ × ×ÁÛÅÍ ÆÁÊÌÅ /etc/resolv.conf.

åÓÌÉ ×Ù ÚÁÐÒÏÓÉÔÅ ÔÏ ÖÅ ÓÁÍÏÅ, ÔÏ ×Ù ÐÏÌÕÞÉÔÅ ÔÁËÏÊ ÏÔ×ÅÔ:

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

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

úÁÍÅÔÉÍ, ÞÔÏ ÍÙ × ÜÔÏ ÒÁÚ ÐÏÌÕÞÉÌÉ ÓÏÏÂÝÅÎÉÅ `Non-authoritative answer:'. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ named × ÜÔÏÔ ÒÁÚ ÎÅ ÄÅÌÁÌ ÚÁÐÒÏÓ Ë ×ÎÅÛÎÉÍ ÓÅÒ×ÅÒÁÍ ÉÍÅÎ, Á ×ÍÅÓÔÏ ÜÔÏÇÏ ÐÒÏÉÚ×ÅÌ ÐÏÉÓË × Ó×ÏÅÍ ËÅÛÅ É ÎÁÛÅÌ ÔÁÍ ÏÔ×ÅÔ. îÏ ËÅÛÉÒÏ×ÁÎÎÁÑ ÉÎÆÏÒÍÁÃÉÑ ÍÏÖÅÔ ÂÙÔØ ÕÓÔÁÒÅ×ÛÅÊ. ôÁË ÞÔÏ ÏÎ ×ÁÓ ÉÎÆÏÒÍÉÒÕÀÔ Ï ÜÔÏÊ (×ÅÓØÍÁ ÎÅÚÎÁÞÉÔÅÌØÎÏÊ) ÏÐÁÓÎÏÓÔÉ ÓÏÏÂÝÅÎÉÅÍ `Non-authorative answer:'. nslookup ×ÙÄÁÅÔ ÜÔÏ ÓÏÏÂÝÅÎÉÅ, ËÏÇÄÁ ×Ù ×ÔÏÒÏÊ ÒÁÚ ÚÁÐÒÁÛÉ×ÁÅÔÅ Ï ÏÄÎÏÊ É ÔÏÊ ÖÅ ÍÁÛÉÎÅ -- ÜÔÏ ÚÎÁË ÔÏÇÏ, ÞÔÏ named ËÅÛÉÒÕÅÔ ÉÎÆÏÒÍÁÃÉÀ É ÜÔÏ ÚÎÁÞÉÔ, ÞÔÏ ÏÎ ÒÁÂÏÔÁÅÔ ÐÒÁ×ÉÌØÎÏ. ÷Ù ÍÏÖÅÔÅ ÚÁ×ÅÒÛÉÔØ ÒÁÂÏÔÕ nslookup ÄÁ× ËÏÍÁÎÄÕ `exit'.

ôÅÐÅÒØ ×Ù ÚÎÁÅÔÅ ËÁË ÕÓÔÁÎÏ×ÉÔØ ËÅÛÉÒÕÀÝÉÊ ÓÅÒ×ÅÒ ÉÍÅÎ. ÷ÏÚØÍÉÔÅ ÐÉ×Á, ÍÏÌÏËÁ ÉÌÉ ÔÏÇÏ, ÞÔÏ ×Ù ÐÒÅÄÐÏÞÉÔÁÅÔÅ É ÏÔÐÒÁÚÄÎÕÊÔÅ ÜÔÏ.

4. ðÒÏÓÔÏÊ ÄÏÍÅÎ.

ëÁË ÕÓÔÁÎÏ×ÉÔØ Ó×ÏÊ ÓÏÂÓÔ×ÅÎÎÙÊ ÄÏÍÅÎ

4.1 îÏ ÓÎÁÞÁÌÁ ÎÅËÏÔÏÒÏÅ ËÏÌÉÞÅÓÔ×Ï ÓÕÈÏÊ ÔÅÏÒÉÉ

äÏ ÔÏÇÏ ËÁË ÍÙ × ÄÅÊÓÔ×ÉÔÅÌØÎÏÓÔÉ ÎÁÞÎÅÍ ÜÔÏÔ ÒÁÚÄÅÌ, Ñ ÈÏÞÕ ÄÁÔØ ×ÁÍ ÎÅËÏÔÏÒÙÅ ÔÅÏÒÅÔÉÞÅÓËÉÅ Ó×ÅÄÅÎÉÑ Ï ÔÏÍ ËÁË ÒÁÂÏÔÁÅÔ DNS. é ×Ù ÄÏÌÖÎÙ ÞÉÔÁÔØ ÄÁÌØÛÅ, ÐÏÔÏÍÕ ÞÔÏ ÜÔÏ ÐÏÌÅÚÎÏ ÄÌÑ ×ÁÓ. åÓÌÉ ×Ù ÎÅ `ÈÏÔÉÔÅ' ÄÅÌÁÔØ ÜÔÏ, ÔÏ ×Ù ÐÏ ËÒÁÊÎÅÊ ÍÅÒÅ ÄÏÌÖÎÙ ÂÙÓÔÒÏ ÐÒÏÓÍÏÔÒÅÔØ ÅÇÏ. ïÓÔÁÎÏ×ÉÔÅÓØ, ËÏÇÄÁ ×Ù Õ×ÉÄÉÔÅ ÕËÁÚÁÎÉÑ Ï ÔÏÍ, ÞÔÏ ×Ù ÄÏÌÖÎÙ ÄÅÌÁÔØ Ó ×ÁÛÉÍ ÆÁÊÌÏÍ named.conf.

DNS -- ÜÔÏ ÉÅÒÁÒÈÉÞÅÓËÁÑ ÓÉÓÔÅÍÁ. ÷ÅÒÛÉÎÁ ÚÁÐÉÓÙ×ÁÅÔÓÑ ËÁË `.' É ÐÒÏÉÚÎÏÓÉÔÓÑ ËÁË `root (ËÏÒÅÎØ)'. ÷ . ÓÕÝÅÓÔ×ÕÅÔ ÎÅËÏÔÏÒÏÅ ËÏÌÉÞÅÓÔ×Ï äÏÍÅÎÏ× ×ÅÒÈÎÅÇÏ ÕÒÏ×ÎÑ (Top Level Domains, TLDs), ÎÁÉÂÏÌÅÅ ÉÚ×ÅÓÔÎÙÍÉ ÉÚ ËÏÔÏÒÙÈ Ñ×ÌÑÀÔÓÑ ORG, COM, EDU É NET, ÎÏ ÎÁ ÓÁÍÏÍ ÄÅÌÅ ÉÈ ÎÁÍÎÏÇÏ ÂÏÌØÛÅ.

ðÒÉ ÐÏÉÓËÅ ÍÁÛÉÎÙ, ÚÁÐÒÏÓ ÏÂÒÁÂÁÔÙ×ÁÅÔÓÑ ÒÅËÕÒÓÉ×ÎÏ, ÎÁÞÉÎÁÑ Ó ËÏÒÎÑ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ ÁÄÒÅÓ ÍÁÛÉÎÙ prep.ai.mit.edu, ÔÏ ×ÁÛ ÓÅÒ×ÅÒ ÉÍÅÎ ÄÏÌÖÅÎ ÎÁÊÔÉ ÓÅÒ×ÅÒ ÉÍÅÎ, ËÏÔÏÒÙÊ ÏÂÓÌÕÖÉ×ÁÅÔ edu. ïÎ ÚÁÐÒÁÛÉ×ÁÅÔ ËÏÒÎÅ×ÏÊ ÓÅÒ×ÅÒ (.) (ÏÎ ÕÖÅ ÚÎÁÅÔ ËÏÒÎÅ×ÙÅ . ÓÅÒ×ÅÒÁ -- ÏÎÉ ÐÅÒÅÞÉÓÌÅÎÙ × ÆÁÊÌÅ root.hints), ËÏÒÎÅ×ÏÊ ÓÅÒ×ÅÒ . ÄÁÅÔ ÓÐÉÓÏË ÓÅÒ×ÅÒÏ× edu:

$ nslookup
Default Server:  localhost
Address:  127.0.0.1
úÁÐÒÏÓÉÔÅ ËÏÒÎÅ×ÏÊ ÓÅÒ×ÅÒ:
> server c.root-servers.net.
Default Server:  c.root-servers.net
Address:  192.33.4.12
õÓÔÁÎÏ×ÉÔÅ ÔÉÐ ÚÁÐÒÏÓÁ (Query type) × NS (ÚÁÐÉÓÉ Ï ÓÅÒ×ÅÒÁÈ ÉÍÅÎ):
> set q=ns
úÁÐÒÏÓÉÔÅ ÅÇÏ Ï edu:
> edu.
úÁËÌÀÞÉÔÅÌØÎÁÑ ÔÏÞËÁ . ÏÞÅÎØ ×ÁÖÎÁ, ÏÎÁ ÓÏÏÂÝÁÅÔ ÓÅÒ×ÅÒÕ, ÞÔÏ ÍÙ ÚÁÐÒÁÛÉ×ÁÅÍ Ï edu ÎÁÈÏÄÑÝÅÍÓÑ ÐÒÑÍÏ ÐÏÄ ËÏÒÎÅ×ÙÍ ÓÅÒ×ÅÒÏÍ . (ÜÔÏ ÏÇÒÁÎÉÞÉ×ÁÅÔ ÐÏÉÓË).
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

üÔÏ ÄÁÅÔ ÎÁÍ ÉÎÆÏÒÍÁÃÉÀ Ï ÔÏÍ, ÞÔÏ *.root-servers.net ÏÂÓÌÕÖÉ×ÁÀÔ edu., ÔÁË ÞÔÏ ÍÙ ÍÏÖÅÍ ÐÒÏÄÏÌÖÁÔØ ÏÐÒÁÛÉ×ÁÔØ ÓÅÒ×ÅÒ c. ôÅÐÅÒØ ÍÙ ÈÏÔÉÍ ÚÎÁÔØ ËÔÏ ÏÂÓÌÕÖÉ×ÁÅÔ ÓÌÅÄÕÀÝÉÊ ÕÒÏ×ÅÎØ ÉÍÅÎÉ ÄÏÍÅÎÁ: mit.edu.:

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

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

Authoritative answers can be found from:
W20NS.mit.edu   internet address = 18.70.0.160
BITSY.mit.edu   internet address = 18.72.0.3
STRAWB.mit.edu  internet address = 18.71.0.151
óÅÒ×ÅÒÁ steawb, w20ns É bitsy ÏÂÓÌÕÖÉ×ÁÀÔ mit, ×ÙÂÅÒÉÔÅ ÏÄÉÎ ÉÚ ÎÉÈ É ÚÁÐÒÏÓÉÔÅ Õ ÎÅÇÏ ÉÎÆÏÒÍÁÃÉÀ Ï ai.mit.edu:
> server W20NS.mit.edu.
éÍÅÎÁ ÍÁÛÉÎ ÎÅ ÚÁ×ÉÓÑÔ ÏÔ ÒÅÇÉÓÔÒÁ, ÎÏ Ñ ÐÒÏÓÔÏ ÉÓÐÏÌØÚÕÀ ÍÙÛØ ÄÌÑ ×ÙÒÅÚÁÎÉÑ É ×ÓÔÁ×ËÉ ÔÅËÓÔÁ, ÔÁË ÞÔÏ Ñ ÐÏÌÕÞÁÀ ÉÈ ÔÁËÉÍÉ ÖÅ, ËÁË ÏÎÉ ÎÁÐÉÓÁÎÙ ÎÁ ÜËÒÁÎÅ.
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 = 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
ai.mit.edu      nameserver = LIFE.AI.MIT.EDU
ai.mit.edu      nameserver = BEET-CHEX.AI.MIT.EDU
ai.mit.edu      nameserver = MINI-WHEATS.AI.MIT.EDU
ai.mit.edu      nameserver = COUNT-CHOCULA.AI.MIT.EDU
ai.mit.edu      nameserver = MINTAKA.LCS.MIT.EDU

Authoritative answers can be found from:
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
AI.MIT.EDU      nameserver = LIFE.AI.MIT.EDU
AI.MIT.EDU      nameserver = BEET-CHEX.AI.MIT.EDU
AI.MIT.EDU      nameserver = MINI-WHEATS.AI.MIT.EDU
AI.MIT.EDU      nameserver = COUNT-CHOCULA.AI.MIT.EDU
AI.MIT.EDU      nameserver = MINTAKA.LCS.MIT.EDU
ALPHA-BITS.AI.MIT.EDU   internet address = 128.52.32.5
GRAPE-NUTS.AI.MIT.EDU   internet address = 128.52.36.4
TRIX.AI.MIT.EDU internet address = 128.52.37.6
MUESLI.AI.MIT.EDU       internet address = 128.52.39.7
LIFE.AI.MIT.EDU internet address = 128.52.32.80
BEET-CHEX.AI.MIT.EDU    internet address = 128.52.32.22
MINI-WHEATS.AI.MIT.EDU  internet address = 128.52.54.11
COUNT-CHOCULA.AI.MIT.EDU        internet address = 128.52.38.22
MINTAKA.LCS.MIT.EDU     internet address = 18.26.0.36

ôÁË ÞÔÏ museli.ai.mit.edu Ñ×ÌÑÅÔÓÑ ÓÅÒ×ÅÒÏÍ ÉÍÅÎ ÄÌÑ ai.mit.edu:

> server MUESLI.AI.MIT.EDU
Default Server:  MUESLI.AI.MIT.EDU
Address:  128.52.39.7

ôÅÐÅÒØ Ñ ÉÚÍÅÎÉÌ ÔÉÐ ÚÁÐÒÏÓÁ, ÐÏÓËÏÌØËÕ ÍÙ ÎÁÛÌÉ ÓÅÒ×ÅÒ ÉÍÅÎ É ÍÏÖÅÍ ÏÐÒÁÛÉ×ÁÔØ ÅÇÏ ÔÏÍ, ÞÔÏ ÍÙ ÈÏÔÉÍ ÚÎÁÔØ Ï prep.ai.mit.edu.

> set q=any
> prep.ai.mit.edu.
Server:  MUESLI.AI.MIT.EDU
Address:  128.52.39.7

prep.ai.mit.edu CPU = dec/decstation-5000.25    OS = unix
prep.ai.mit.edu
        inet address = 18.159.0.42, protocol = tcp
          ftp  telnet  smtp  finger
prep.ai.mit.edu preference = 1, mail exchanger = gnu-life.ai.mit.edu
prep.ai.mit.edu internet address = 18.159.0.42
ai.mit.edu      nameserver = beet-chex.ai.mit.edu
ai.mit.edu      nameserver = alpha-bits.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 = mintaka.lcs.mit.edu
ai.mit.edu      nameserver = life.ai.mit.edu
gnu-life.ai.mit.edu     internet address = 128.52.32.60
beet-chex.ai.mit.edu    internet address = 128.52.32.22
alpha-bits.ai.mit.edu   internet address = 128.52.32.5
mini-wheats.ai.mit.edu  internet address = 128.52.54.11
trix.ai.mit.edu internet address = 128.52.37.6
muesli.ai.mit.edu       internet address = 128.52.39.7
count-chocula.ai.mit.edu        internet address = 128.52.38.22
mintaka.lcs.mit.edu     internet address = 18.26.0.36
life.ai.mit.edu internet address = 128.52.32.80

ôÁË ÎÁÞÉÎÁÑ ÏÔ ËÏÒÎÑ ., ÍÙ ÎÁÛÌÉ ÎÕÖÎÙÅ ÓÅÒ×ÅÒÁ ÉÍÅÎ ÄÌÑ ËÁÖÄÏÇÏ ÕÒÏ×ÎÑ, ÕËÁÚÁÎÎÙÈ × ÉÍÅÎÉ ÄÏÍÅÎÁ. åÓÌÉ ÂÙ ×Ù ÉÓÐÏÌØÚÏ×ÁÌÉ ×ÁÛ ÓÏÂÓÔ×ÅÎÎÙÊ ÓÅÒ×ÅÒ DNS ×ÍÅÓÔÏ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ×ÓÅÈ ÐÅÒÅÞÉÓÌÅÎÎÙÈ ÓÅÒ×ÅÒÏ×, ÔÏ ×ÁÛ ÓÅÒ×ÅÒ ËÏÎÅÞÎÏ ÖÅ ËÅÛÉÒÏ×ÁÌ ÂÙ ×ÓÀ ÉÎÆÏÒÍÁÃÉÀ, ËÏÔÏÒÕÀ ÏÎ ÎÁÈÏÄÉÌ ×Ï ×ÒÅÍÑ ÐÒÏÈÏÖÄÅÎÉÑ ÜÔÏÇÏ ÐÕÔÉ, É ÔÏÇÄÁ ÂÙ ÏÎ ÂÏÌØÛÅ ÎÅ ÚÁÐÒÁÛÉ×ÁÌ ÜÔÕ ÉÎÆÏÒÍÁÃÉÀ ÐÒÉ ÐÏ×ÔÏÒÎÏÍ ÏÂÒÁÝÅÎÉÉ.

íÅÎÅÅ ÏÂÓÕÖÄÁÅÍÙÍ, ÎÏ ×ÓÅ ÒÁ×ÎÏ ×ÁÖÎÙÍ Ñ×ÌÑÅÔÓÑ ÄÏÍÅÎ in-addr.arpa. ïÎ ÔÁËÖÅ ÉÍÅÅÔ ÉÅÒÁÒÈÉÞÅÓËÕÀ ÓÔÒÕËÔÕÒÕ, ÐÏÄÏÂÎÏ `ÏÂÙÞÎÙÍ' ÄÏÍÅÎÁÍ. in-addr.arpa ÐÏÚ×ÏÌÑÅÔ ÎÁÍ ÐÏÌÕÞÉÔØ ÉÍÑ ÍÁÛÉÎÙ, ÐÏ ÅÅ ÁÄÒÅÓÕ. îÅÏÂÈÏÄÉÍÏ ÚÁÍÅÔÉÔØ, ÔÏ ÞÔÏ ip-ÁÄÒÅÓÁ × ÄÏÍÅÎÅ in-addr.arpa ÚÁÐÉÓÁÎÙ × ÏÂÒÁÔÎÏÍ ÐÏÒÑÄËÅ. îÁÐÒÉÍÅÒ, åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÍÁÛÉÎÁ Ó ÁÄÒÅÓÏÍ: 192.128.52.43, ÔÏ named ÏÂÒÁÂÁÔÙ×ÁÅÔ ÅÅ ÔÏÞÎÏ ÔÁËÖÅ ËÁË × ÐÒÉÍÅÒÅ ÄÌÑ prep.ai.mit.edu: ÎÁÈÏÄÉÔ ÓÅÒ×ÅÒÁ arpa.. îÁÈÏÄÉÔ ÓÅÒ×ÅÒÁ ÄÌÑ ÄÏÍÅÎÁ in-addr.arpa., ÎÁÈÏÄÉÔ ÓÅÒ×ÅÒÁ 192.in-addr.arpa., ÎÁÈÏÄÉÔ ÓÅÒ×ÅÒÁ ÄÌÑ 128.192.in-addr.arpa., ÓÅÒ×ÅÒÁ ÄÌÑ 52.128.192.in-addr.arpa.. á ÐÏÔÏÍ ÕÖÅ ÎÁÈÏÄÉÔ ÎÅÏÂÈÏÄÉÍÙÅ ÚÁÐÉÓÉ Ï 43.52.128.192.in-addr.arpa. ìÏ×ËÏ? (ÓËÁÖÉÔÅ 'ÄÁ'). èÏÔÑ ÏÂÒÁÔÎÙÊ ÐÏÒÑÄÏË ÍÏÖÅÔ ÓÍÕÝÁÔØ, ÎÏ ÜÔÏ ÔÏÌØËÏ ÐÅÒ×ÙÅ Ä×Á ÇÏÄÁ.

ñ ×ÁÍ ÓÏÌÇÁÌ. DNS ÎÅ ÒÁÂÏÔÁÅÔ ÔÏÞÎÏ ÔÁË, ËÁË Ñ ÜÔÏ ÏÐÉÓÁÌ. îÏ ÄÏÓÔÁÔÏÞÎÏ ÂÌÉÚËÏ Ë ÏÐÉÓÁÎÎÏÍÕ ÐÒÏÃÅÓÓÕ.

4.2 îÁÛ ÓÏÂÓÔ×ÅÎÎÙÊ ÄÏÍÅÎ

ôÅÐÅÒØ ÏÐÒÅÄÅÌÉÍ ÎÁÛ ÓÏÂÓÔ×ÅÎÎÙÊ ÄÏÍÅÎ. íÙ ÂÕÄÅÍ ÄÅÌÁÔØ ÄÏÍÅÎ linux.bogus É ÏÐÒÅÄÅÌÉÍ ÍÁÛÉÎÙ × ÎÅÍ. ñ ÉÓÐÏÌØÚÕÀ ÐÏÌÎÏÓÔØÀ ÐÏÄÄÅÌØÎÏÅ ÉÍÑ ÄÏÍÅÎÁ, ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÂÙÔØ Õ×ÅÒÅÎÎÙÍ, ÞÔÏ ÍÙ ÎÅ ÐÏÂÅÓÐÏËÏÉÍ ÎÉËÏÇÏ ×Ï ×ÎÅÛÎÅÍ ÍÉÒÅ.

ïÄÎÏ ×ÁÖÎÏÅ ÚÁÍÅÞÁÎÉÅ ÄÏ ÔÏÇÏ ËÁË ÍÙ ÎÁÞÎÅÍ: îÅ ×ÓÅ ÓÉÍ×ÏÌÙ ÒÁÚÒÅÛÅÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ × ÉÍÅÎÁÈ ÍÁÛÉÎ. íÙ ÏÇÒÁÎÉÞÉÍÓÑ ÓÉÍ×ÏÌÁÍÉ ÁÎÇÌÉÊÓËÏÇÏ ÁÌÆÁ×ÉÔÁ: a-z, ÃÉÆÒÁÍÉ: 0-9 É ÓÉÍ×ÏÌÏÍ '-' (ÔÉÒÅ). ðÒÉÄÅÒÖÉ×ÁÊÔÅÓØ ÓÉÐÏÌØÚÏ×ÁÎÉÑ ÜÔÉÈ ÓÉÍ×ÏÌÏ×. ðÒÏÐÉÓÎÙÅ É ÓÔÒÏÞÎÙÅ ÓÉÍ×ÏÌÙ ÎÅ ÒÁÚÌÉÞÁÀÔÓÑ DNS, ÔÁË ÞÔÏ pat.uio.no Ñ×ÌÑÅÔÓÑ ÒÁ×ÎÙÍ Pat.UiO.No.

íÙ ÕÖÅ ÎÁÞÁÌÉ ÜÔÕ ÞÁÓÔØ ÓÔÒÏËÏÊ × named.conf:


zone "0.0.127.in-addr.arpa" {
        type master;
        file "pz/127.0.0";
};

úÁÍÅÔØÔÅ ÏÔÓÕÔÓÔ×ÉÅ `.' × ËÏÎÃÅ ÉÍÅÎ ÄÏÍÅÎÏ× × ÜÔÏÍ ÆÁÊÌÅ. üÔÏ ÕËÁÚÙ×ÁÅÔ, ÞÔÏ ÍÙ ÓÅÊÞÁÓ ÂÕÄÅÍ ÏÐÒÅÄÅÌÑÔØ ÚÏÎÕ 0.0.127.in-addr.arpa, É ÞÔÏ ÍÙ ÂÕÄÅÍ ÏÓÎÏ×ÎÙÍ ÓÅÒ×ÅÒÏÍ ÄÌÑ ÎÅÅ, Á ÔÁËÖÅ ÔÏ, ÞÔÏ ÏÎÁ ÈÒÁÎÉÔÓÑ × ÆÁÊÌÅ, ÎÁÚ×ÁÎÎÏÍ pz/127.0.0. íÙ ÕÖÅ ÓÄÅÌÁÌÉ ÜÔÏÔ ÆÁÊÌ, × ÎÅÍ ÚÁÐÉÓÁÎÏ:


@               IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                                1       ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                1W      ; Expire
                                1D)     ; Minimum TTL
                        NS      ns.linux.bogus.
1                       PTR     localhost.

úÁÍÅÔØÔÅ ÎÁÌÉÞÉÅ ÓÉÍ×ÏÌÁ `.' × ËÏÎÃÅ ÐÏÌÎÙÈ ÉÍÅÎ ÄÏÍÅÎÏ× × ÜÔÏÍ ÆÁÊÌÅ, × ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÓÔØ ×ÙÛÅÐÒÉ×ÅÄÅÎÎÏÍÕ ÆÁÊÌÕ named.conf. îÅËÏÔÏÒÙÅ ÌÀÄÉ ÌÀÂÑÔ ÎÁÞÉÎÁÔØ ËÁÖÄÙÊ ÆÁÊÌ ÚÏÎ Ó ÄÉÒÅËÔÉ×Ù $ORIGIN, ÎÏ ÜÔÏ Ñ×ÌÑÅÔÓÑ ÉÚÌÉÛÎÉÍ. òÁÓÐÏÌÏÖÅÎÉÅ (origin) (ÍÅÓÔÏ ÚÏÎÙ × ÉÅÒÁÒÈÉÉ DNS) ÆÁÊÌÁ ÚÏÎÙ ÕËÁÚÙ×ÁÅÔÓÑ × ÒÁÚÄÅÌÅ ÚÏÎ × ÆÁÊÌÅ named.conf, × ÄÁÎÎÏÍ ÓÌÕÞÁÅ ÜÔÏ 0.0.127.in-addr.arpa.

üÔÏÔ `ÆÁÊÌ ÚÏÎÙ' ÓÏÄÅÒÖÉÔ 3 `ÚÁÐÉÓÉ ÒÅÓÕÒÓÏ× (resource records)' (RRs): A SOA RR, A NS RR É PTR RR. SOA ÜÔÏ ÓÏËÒÁÝÅÎÉÅ ÄÌÑ îÁÞÁÌÁ ðÏÌÎÏÍÏÞÉÊ (Start Of Authority). óÉÍ×ÏÌ `@' ÜÔÏ ÓÐÅÃÉÁÌØÎÙÊ ÓÉÍ×ÏÌ ÏÂÏÚÎÁÞÁÀÝÉÊ ÒÁÓÐÏÌÏÖÅÎÉÅ, É ÐÏÓËÏÌØËÕ × ËÏÌÏÎËÅ `ÄÏÍÅÎ (domain)' ÄÌÑ ÜÔÏÇÏ ÆÁÊÌÁ ÚÁÐÉÓÁÎÏ 0.0.127.in-addr.arpa, ÔÏ ÐÅÒ×ÁÑ ÓÔÒÏËÁ ÎÁ ÓÁÍÏÍ ÄÅÌÅ ÚÎÁÞÉÔ

0.0.127.in-addr.arpa.   IN      SOA ...

NS ÜÔÏ RR ÄÌÑ ÓÅÒ×ÅÒÁ ÉÍÅÎ (Name Server). ÷ ÎÁÞÁÌÅ ÓÔÒÏËÉ ÓÉÍ×ÏÌ '@' ÎÅ ÕËÁÚÙ×ÁÅÔÓÑ, ÜÔÏ ÐÏÄÒÁÚÕÍÅ×ÁÅÔÓÑ, ÐÏÓËÏÌØËÕ ÐÒÅÄÙÄÕÝÁÑ ÓÔÒÏËÁ ÎÁÞÉÎÁÌÁÓØ Ó ÓÉÍ×ÏÌÁ '@'. üÔÏ ÓßÜËÏÎÏÍÉÔ ÎÁÍ ÎÅÓËÏÌØËÏ ÎÁÖÁÔÉÊ ÎÁ ËÌÁ×ÉÛÉ. ôÁË ÞÔÏ ÓÔÒÏËÁ NS × ÄÅÊÓÔ×ÉÔÅÌØÎÏÓÔÉ ÞÉÔÁÅÔÓÑ ËÁË

0.0.127.in-addr.arpa.   IN      NS      ns.linux.bogus

üÔÁ ÓÔÒÏËÁ ÓÏÏÂÝÁÅÔ DNS, ÞÔÏ ÍÁÛÉÎÁ Ñ×ÌÑÅÔÓÑ ÓÅÒ×ÅÒÏÍ ÉÍÅÎ ÄÏÍÅÎÁ 0.0.127.in-addr.arpa, ÜÔÏ ns.linux.bogus. 'ns' ÔÒÁÄÉÃÉÏÎÎÏÅ ÉÍÑ ÄÌÑ ÓÅÒ×ÅÒÏ× ÉÍÅÎ, ÎÏ ËÁË É ÄÌÑ web-ÓÅÒ×ÅÒÏ×, ÞØÉÍ ÔÒÁÄÉÃÉÏÎÎÙÍ ÉÍÅÎÅÍ Ñ×ÌÑÅÔÓÑ www.ÞÔÏ-ÎÉÂÕÄØ, ÄÁÎÎÏÅ ÉÍÑ ÍÏÖÅÔ ÂÙÔØ ÌÀÂÙÍ.

é × × ÏËÏÎÞÁÎÉÅ - ÚÁÐÉÓØ PTR ÇÌÁÓÉÔ, ÞÔÏ ÍÁÛÉÎÁ Ó ÁÄÒÅÓÏÍ 1 × ÐÏÄÓÅÔÉ 0.0.127.in-addr.arpa, ÎÁÐÒÉÍÅÒ, 127.0.0.1 ÎÁÚÙ×ÁÅÔÓÑ localhost.

úÁÐÉÓØ SOA ÎÁÈÏÄÉÔÓÑ × ÐÒÅÁÍÂÕÌÅ ËÁÖÄÏÇÏ ÉÚ ÆÁÊÌÏ× ÚÏÎ, É ÏÎÁ ÄÏÌÖÎÁ ÐÅÒ×ÏÊ ÚÁÐÉÓØÀ × ÆÁÊÌÅ. ïÎÁ ÏÐÉÓÙ×ÁÅÔ ÚÏÎÕ -- ÏÔËÕÄÁ ÏÎÁ ÐÏÑ×ÌÑÅÔÓÑ (ÍÁÛÉÎÁ, ÎÁÚ×ÁÎÎÁÑ ns.linux.bogus), ËÔÏ ÏÔ×ÅÞÁÅÔ ÚÁ ÓÏÄÅÒÖÉÍÏÅ ÚÏÎÙ (hostmaster@linux.bogus), ËÁËÁÑ ×ÅÒÓÉÑ ÆÁÊÌÁ ÚÏÎÙ ÔÅËÕÝÁÑ (serial: 1), É ÄÒÕÇÉÅ ×ÅÝÉ, ËÏÔÏÒÙÅ ÎÁÄÏ ÓÄÅÌÁÔØ ÄÌÑ ËÅÛÉÒÕÀÝÉÈ É ×ÔÏÒÉÞÎÙÈ ÓÅÒ×ÅÒÏ× DNS. äÌÑ ÐÏÌÅÊ refresh, retry, expire É minimum ÉÓÐÏÌØÚÕÊÔÅ ÞÉÓÌÁ ÐÒÉ×ÅÄÅÎÎÙÅ × ÜÔÏÍ ÄÏËÕÍÅÎÔÅ É ×Ù ÄÏÌÖÎÙ ÂÙÔØ × ÂÅÚÏÐÁÓÎÏÓÔÉ, ÉÓÐÏÌØÚÕÑ ÉÈ.

úÁÔÅÍ ÐÅÒÅÚÁÐÕÓÔÉÔÅ ×ÁÛ named (ËÏÍÁÎÄÁ ndc restart) É ÉÓÐÏÌØÚÕÊÔÅ ÐÒÏÇÒÁÍÍÕ nslookup ÄÌÑ ÐÒÏ×ÅÒËÉ ÔÏÇÏ, ÞÔÏ ÓÄÅÌÁÎÏ:

$ 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
ÍÙ ×ÉÄÉÍ, ÞÔÏ named ÒÁÂÏÔÁÅÔ É ÍÏÖÎÏ ÐÏÌÕÞÉÔØ ÄÁÎÎÙÅ Ï localhost ÉÚ ÄÏÍÅÎÁ 127.0.0.1, ÜÔÏ ÏÞÅÎØ ÈÏÒÏÛÏ. ôÅÐÅÒØ ÐÒÉÓÔÕÐÉÍ Ë ÎÁÛÅÊ ÏÓÎÏ×ÎÏÊ ÚÁÄÁÞÅ, ÄÏÍÅÎÕ linux.bogus, ×ÓÔÁ×ÉÍ ÎÏ×ÙÊ ÒÁÚÄÅÌ '(zone)' × ÆÁÊÌ named.conf:
zone "linux.bogus" {
        notify no;
        type master;
        file "pz/linux.bogus";
};

úÁÍÅÔÉÍ, ÞÔÏ ÍÙ ÏÐÑÔØ ÎÅ ÎÁÐÉÓÁÌÉ ÚÁ×ÅÒÛÁÀÝÉÊ ÓÉÍ×ÏÌ `.' × ÉÍÅÎÉ ÄÏÍÅÎÁ × ÆÁÊÌÅ named.conf.

÷ ÆÁÊÌÅ ÚÏÎÙ linux.bogus ÍÙ ÐÏÍÅÓÔÉÍ ÎÅËÏÔÏÒÙÅ ÐÏÄÄÅÌØÎÙÅ ÄÁÎÎÙÅ:


;
; æÁÊÌ ÚÏÎÙ ÄÌÑ linux.bogus
;
; ðÏÌÎÙÊ ÆÁÊÌ ÚÏÎÙ
;
@       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                        199802151       ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        1W              ; expire, seconds
                        1D )            ; minimum, seconds
;
                NS      ns              ; Internet ÁÄÒÅÓ ÓÅÒ×ÅÒÁ ÉÍÅÎ
                MX      10 mail.linux.bogus     ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ
                MX      20 mail.friend.bogus.   ; äÏÐÏÌÎÉÔÅÌØÎÙÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ
;
localhost       A       127.0.0.1
ns              A       192.168.196.2
mail            A       192.168.196.4

îÅÏÂÈÏÄÉÍÏ ÕÐÏÍÑÎÕÔØ Ä×Å ×ÅÝÉ Ï ÚÁÐÉÓÉ SOA. ns.linux.bogus ÄÏÌÖÅÎ ÂÙÔØ ÎÁÓÔÏÑÝÅÊ ÍÁÛÉÎÏÊ Ó ÚÁÐÉÓØÀ A. îÅ ÒÁÚÒÅÛÁÅÔÓÑ ÕËÁÚÙ×ÁÔØ ÍÁÛÉÎÕ Ó ÚÁÐÉÓØÀ CNAME × ÚÁÐÉÓÉ SOA. üÔÏ ÉÍÑ ÎÅ ÏÂÑÚÁÔÅÌØÎÏ ÄÏÌÖÎÏ ÂÙÔØ `ns', ÏÎÏ ÍÏÖÅÔ ÂÙÔØ ÌÀÂÙÍ ÐÒÁ×ÉÌØÎÙÍ ÉÍÅÎÅÍ ÍÁÛÉÎÙ. äÁÌÅÅ, hostmaster.linux.bogus ÄÏÌÖÅÎ ÞÉÔÁÔØÓÑ ËÁË hostmaster@linux.bogus, ÜÔÏ ÄÏÌÖÅÎ ÂÙÔØ ÐÏÞÔÏ×ÙÊ ÐÓÅ×ÄÏÎÉÍ ÉÌÉ ÐÏÞÔÏ×ÙÊ ÑÝÉË ÄÌÑ ÞÅÌÏ×ÅËÁ ÓÏÐÒÏ×ÏÖÄÁÀÝÅÇÏ DNS É ÞÉÔÁÀÝÅÇÏ ÐÏÞÔÕ ÄÏÓÔÁÔÏÞÎÏ ÞÁÓÔÏ. ìÀÂÁÑ ÐÏÞÔÁ, ÏÔÎÏÓÉÔÅÌØÎÏ ÄÏÍÅÎÁ ÂÕÄÅÔ ÐÏÓÙÌÁÔØÓÑ ÎÁ ÁÄÒÅÓ ÕËÁÚÁÎÙÊ ÚÄÅÓØ. éÍÑ ÎÅ ÏÂÑÚÁÔÅÌØÎÏ ÄÏÌÖÎÏ ÂÙÔ `hostmaster', ÜÔÏ ÍÏÖÅÔ ÂÙÔØ ÌÀÂÏÊ ÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ, ÎÏ ÁÄÒÅÓ Ó ÉÍÅÎÅÍ `hostmaster' ËÁË ÏÖÉÄÁÅÔÓÑ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ.

÷ ÜÔÏÍ ÆÁÊÌÅ ÐÒÉ×ÅÄÅÎ ÅÝÅ ÏÄÉÎ ÎÏ×ÙÊ ÔÉÐ ÚÁÐÉÓÉ Ï ÒÅÓÕÒÓÁÈ (RR) -- MX, ÉÌÉ ÚÁÐÉÓØ ÒÅÓÕÒÓÁ ðÏÞÔÏ×ÙÊ óÅÒ×ÅÒ (Mail eXchanger). ïÎÁ ÓÏÏÂÝÁÅÔ ÐÏÞÔÏ×ÏÊ ÓÉÓÔÅÍÅ ËÕÄÁ ÐÏÓÙÌÁÔØ ÐÏÞÔÕ ÁÄÒÅÓÏ×ÁÎÎÕÀ someone@linux.bogus, Á ÉÍÅÎÎÏ ÓÅÒ×ÅÒÁÍ mail.linux.bogus ÉÌÉ mail.friend.bogus. þÉÓÌÏ ÐÅÒÅÄ ËÁÖÄÙÍ ÉÍÅÎÅÍ ÍÁÛÉÎÙ -- ÜÔÏ ÐÒÉÏÒÉÔÅÔ ÚÁÐÉÓÉ MX RR. úÁÐÉÓØ ÒÅÓÕÒÓÁ Ó ÎÁÉÍÅÎØÛÉÍ ÎÏÍÅÒÏÍ (10) -- ÜÔÏ ÍÁÛÉÎÙ ËÕÄÁ ÐÏÞÔÁ ÄÏÌÖÎÁ ÐÏÓÙÌÁÔØÓÑ × ÐÅÒ×ÕÀ ÏÞÅÒÅÄØ. åÓÌÉ ÐÒÏÉÓÈÏÄÉÔ ÏÛÉÂËÁ, ÔÏ ÐÏÞÔÁ ÍÏÖÅÔ ÂÙÔØ ÐÏÓÌÁÎÁ ÎÁ ÍÁÛÉÎÕ Ó ÂÏÌØÛÉÍ ÎÏÍÅÒÏÍ, ×ÔÏÒÉÞÎÏÍÕ ÐÏÞÔÏ×ÏÍÕ ÓÅÒ×ÅÒÕ, ÎÁÐÒÉÍÅÒ, mail.friend.bogus ÄÌÑ ËÏÔÏÒÏÇÏ ÐÒÉÏÒÉÔÅÔ ÕÓÔÁÎÏ×ÌÅÎ ÒÁ×ÎÙÍ 20.

ðÅÒÅÚÁÐÕÓÔÉÔÅ named Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ ndc restart. ðÒÏ×ÅÒØÔÅ ÒÅÚÕÌØÔÁÔÙ ÒÁÂÏÔÙ ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ nslookup:

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

linux.bogus
        origin = ns.linux.bogus
        mail addr = hostmaster.linux.bogus
        serial = 199802151
        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     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
linux.bogus     preference = 20, mail exchanger = mail.friend.bogus
linux.bogus     nameserver = ns.linux.bogus
ns.linux.bogus  internet address = 192.168.196.2
mail.linux.bogus        internet address = 192.168.196.4

ðÒÉ ×ÎÉÍÁÔÅÌØÎÏÍ ÔÅÓÔÉÒÏ×ÁÎÉÉ ×Ù ÏÂÎÁÒÕÖÉÔÅ ÏÛÉÂËÕ. óÔÒÏËÁ

linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus
Ñ×ÌÑÅÔÓÑ ÐÏÌÎÏÓÔØÀ ÎÅÐÒÁ×ÉÌØÎÏÊ. ïÎÁ ÄÏÌÖÎÁ ×ÙÇÌÑÄÅÔØ ÓÌÅÄÕÀÝÉÍ ÏÂÒÁÚÏÍ
linux.bogus     preference = 10, mail exchanger = mail.linux.bogus

ñ ÓÏÚÎÁÔÅÌØÎÏ ÓÄÅÌÁÌ ÏÛÉÂËÕ, ÞÔÏÂÙ ×Ù ÓÍÏÇÌÉ ÐÏÌÕÞÉÔØ ÎÅËÏÔÏÒÙÊ ÏÐÙÔ --:-) çÌÑÄÑ × ÆÁÊÌ ÚÏÎÙ ÍÙ ÏÂÎÁÒÕÖÉÍ, ÞÔÏ × ÓÔÒÏËÅ

                MX      10 mail.linux.bogus     ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ
ÏÔÓÕÔÓÔ×ÕÅÔ ÔÏÞËÁ. éÌÉ ÌÉÛÎÉÊ ÒÁÚ ÎÁÐÉÓÁÎÏ 'linux.bogus'. åÓÌÉ ÉÍÑ ÍÁÛÉÎÙ ÎÅ ÚÁËÁÎÞÉ×ÁÅÔÓÑ ÎÁ ÓÉÍ×ÏÌ ÔÏÞËÉ × ÆÁÊÌÅ ÚÏÎÙ, ÔÏ Ë ËÏÎÃÕ ÜÔÏÇÏ ÉÍÅÎÉ ÄÏÂÁ×ÌÑÅÔÓÑ ÔÅËÕÝÅÅ ÒÁÓÐÏÌÏÖÅÎÉÅ (origin), ×ÙÚÙ×ÁÑ × ÉÔÏÇÅ ÄÕÂÌÉÒÏ×ÁÎÉÅ ÔÅËÓÔÁ linux.bogus.linux.bogus. ôÁË ÚÁÐÉÓØ
                MX      10 mail.linux.bogus.    ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ

ÉÌÉ
                MX      10 mail                 ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ

Ñ×ÌÑÅÔÓÑ ÐÒÁ×ÉÌØÎÏÊ. ñ ÐÒÅÄÐÏÞÉÔÁÀ ÐÏÓÌÅÄÎÀÀ ÆÏÒÍÕ, ÐÏÓËÏÌØËÕ ÎÁÄÏ ÍÅÎØÛÅ ÎÁÂÉÒÁÔØ ÎÁ ËÌÁ×ÉÁÔÕÒÅ. óÕÝÅÓÔ×ÕÀÔ ÐÏÌØÚÏ×ÁÔÅÌÉ bind, ËÏÔÏÒÙÅ ÎÅ ÓÏÇÌÁÓÎÙ Ó ÜÔÉÍ ÐÏÄÈÏÄÏÍ, ÎÏ ÅÓÔØ É ÔÅ, ËÏÔÏÒÙÅ ÓÏÇÌÁÓÎÙ Ó ÜÔÉÍ. ÷ ÆÁÊÌÅ ÚÏÎÙ ÉÍÑ ÄÏÍÅÎÁ ÄÏÌÖÎÏ ÂÙÔØ ÎÁÐÉÓÁÎÏ É ÚÁËÁÞÉ×ÁÔØÓÑ ÎÁ ÓÉÍ×ÏÌ `.' ÉÌÉ ÄÏÍÅÎ ÎÅ ÄÏÌÖÅÎ ÂÙÔØ ÕËÁÚÁÎ, × ÜÔÏÍ ÓÌÕÞÁÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÏÍÅÎÏÍ ÂÕÄÅÔ ÔÅËÕÝÅÅ ÒÁÓÐÏÌÏÖÅÎÉÅ (origin) ÍÁÛÉÎÙ.

ñ ÄÏÌÖÅÎ ÐÏÄÞÅÒËÎÕÔØ, ÞÔÏ × ÆÁÊÌÅ named.conf ÎÅ ÄÏÌÖÎÏ ÂÙÔØ ÓÉÍ×ÏÌÁ `.' ÐÏÓÌÅ ÉÍÅÎ ÄÏÍÅÎÏ×. õ ×ÁÓ ÍÏÖÅÔ ÎÅ ÂÙÔØ ÐÏÎÑÔÉÑ ÐÒÏ ÓÉÍ×ÏÌ `.' -- ÜÔÏ ÓÌÉÛËÏÍ ÞÁÓÔÏ ÉÌÉ ÎÁÏÂÏÒÏÔ ÓÌÉÛËÏÍ ÒÅÄËÏ ÚÁÐÏÌÎÑÅÔ ÒÁÚÎÙÅ ×ÅÝÉ É ÓÍÕÝÁÅÔ ÍÎÏÇÏ ÌÀÄÅÊ.

ôÁË ÞÔÏ ÏÐÉÒÁÑÓØ ÎÁ ÍÏÀ ÔÏÞËÕ ÚÒÅÎÉÑ ÍÙ ÎÁÐÉÛÅÍ ÎÏ×ÙÊ ÆÁÊÌ ÚÏÎÙ, Ó ÎÅËÏÔÏÒÏÊ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÅÊ.


;
; æÁÊÌ ÚÏÎÙ ÄÌÑ linux.bogus
;
; ðÏÌÎÙÊ ÆÁÊÌ ÚÏÎÙ
;
@       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                        199802151       ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        1W              ; expire, seconds
                        1D )            ; minimum, seconds
;
                TXT     "Linux.Bogus, your DNS consultants"
                NS      ns              ; Internet ÁÄÒÅÓ ÓÅÒ×ÅÒÁ ÉÍÅÎ
                NS      ns.friend.bogus.
                MX      10 mail.linux.bogus     ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ
                MX      20 mail.friend.bogus.   ; äÏÐÏÌÎÉÔÅÌØÎÙÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ

localhost       A       127.0.0.1

gw              A       192.168.196.1
                HINFO   "Cisco" "IOS"
                TXT     "The router"

ns              A       192.168.196.2
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "Pentium" "Linux 2.0"
www             CNAME   ns

donald          A       192.168.196.3
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "i486"  "Linux 2.0"
                TXT     "DEK"

mail            A       192.168.196.4
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "386sx" "Linux 1.2"

ftp             A       192.168.196.5
                MX      10 mail
                MX      20 mail.friend.bogus.
                HINFO   "P6" "Linux 2.1.86"

úÄÅÓØ ÐÒÉÓÕÔÓÔ×ÕÅÔ ÎÅÓËÏÌØËÏ ÎÏ×ÙÈ ÚÁÐÉÓÅÊ Ï ÒÅÓÕÒÓÁÈ (RR): ÚÁÐÉÓØ HINFO (éÎÆÏÒÍÁÃÉÑ Ï ÍÁÛÉÎÅ, Host INFOrmation) ÉÍÅÅÔ Ä×Å ÞÁÓÔÉ, ÈÏÒÏÛÅÊ ÐÒÉ×ÙÞËÏÊ Ñ×ÌÑÅÔÓÑ ÚÁËÌÀÞÅÎÉÅ ËÁÖÄÏÊ ÉÚ ÜÔÉÈ ÞÁÓÔÅÊ × ËÁ×ÙÞËÉ. ðÅÒ×ÁÑ ÞÁÓÔØ -- ÜÔÏ ÉÎÆÏÒÍÁÃÉÑ Ï ÏÂÏÒÕÄÏ×ÁÎÉÉ ÍÁÛÉÎÙ, Á ×ÔÏÒÁÑ ÞÁÓÔØ ÏÐÉÓÙ×ÁÅÔ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÏÐÅÒÁÃÉÏÎÎÕÀ ÓÉÓÔÅÍÕ ÄÁÎÎÏÊ ÍÁÛÉÎÙ. íÁÛÉÎÁ, ÎÁÚ×ÁÎÎÁÑ 'ns', ÉÍÅÅÔ ÐÒÏÃÅÓÓÏÒ Pentium É ÒÁÂÏÔÁÅÔ ÐÏÄ ÕÐÒÁ×ÌÅÎÉÅÍ Linux 2.0. CNAME (ëÁÎÏÎÉÞÅÓËÏÅ ÉÍÑ, Canonical NAME) -- ÜÔÏ ÓÐÏÓÏ ÐÒÉÓ×ÏÉÔØ ËÁÖÄÏÊ ÍÁÛÉÎÅ ÎÅÓËÏÌØËÏ ÉÍÅÎ. ôÁË, ÞÔÏ www Ñ×ÌÑÅÔÓÑ ÁÌÉÁÓÏÍ ÄÌÑ ns.

éÓÐÏÌØÚÏ×ÁÎÉÅ ÚÁÐÉÓÉ CNAME Ñ×ÌÑÅÔÓÑ ÎÅÍÎÏÇÏ ÎÅÏÄÎÏÚÎÁÞÎÙÍ. îÏ ÂÅÚÏÐÁÓÎÙÍ ÓÐÏÓÏÂÏÍ ÂÕÄÅÔ ÓÌÅÄÏ×ÁÔØ ÐÒÁ×ÉÌÕ, ÞÔÏ ÚÁÐÉÓÉ MX, CNAME ÉÌÉ SOA ÎÉËÏÇÄÁ ÎÅ ÄÏÌÖÎÙ ÓÓÙÌÁÔØÓÑ ÎÁ ÉÍÑ, ÕËÁÚÁÎÎÏÅ ËÁË ÚÁÐÉÓØ CNAME, ÏÎÉ ÄÏÌÖÎÙ ÓÓÙÌÁÔØÓÑ ÎÁ ÉÍÑ ÏÐÒÅÄÅÌÅÎÎÏÅ ÚÁÐÉÓØÀ A, ÔÁË ÞÔÏ ÂÕÄÅÔ ÎÅÐÒÁ×ÉÌØÎÏ ÚÁÐÉÓÁÔØ


foobar          CNAME   www                     ; NO!

ÎÏ ×ÍÅÓÔÏ ÜÔÏÇÏ ÎÅÏÂÈÏÄÉÍÏ ÚÁÐÉÓÁÔØ
foobar          CNAME   ns                      ; Yes!

ôÁËÖÅ ÌÕÞÛÅ ÓÞÉÔÁÔØ, ÞÔÏ ÚÁÐÉÓØ CNAME ÎÅ Ñ×ÌÑÅÔÓÑ ÎÁÓÔÏÑÝÉÍ ÉÍÅÎÅÍ ÍÁÛÉÎÙ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ × ÁÄÒÅÓÅ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ: ÁÄÒÅÓ webmaster@www.linux.bogus Ñ×ÌÑÅÔÓÑ ÎÅÐÒÁ×ÉÌØÎÙÍ ÁÄÒÅÓÏÍ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ. ÷Ù ÍÏÖÅÔÅ ÏÖÉÄÁÔØ, ÞÔÏ ÎÅËÏÔÏÒÙÅ ÁÄÍÉÎÉÓÔÒÁÔÏÒÙ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ ×Ï ×ÎÅÛÎÅÍ ÍÉÒÅ ÓÌÅÄÑÔ ÚÁ ÍÏÂÌÀÄÅÎÉÅÍ ÜÔÏÇÏ ÐÒÁ×ÉÌÁ, ÄÁÖÅ ÅÓÌÉ Õ ×ÁÓ ×ÓÅ ÒÁÂÏÔÁÅÔ ÎÏÒÍÁÌØÎÏ. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÉÚÂÅÖÁÔØ ÜÔÏÇÏ ÉÓÐÏÌØÚÕÊÔÅ ÚÁÐÉÓØ A (É ×ÏÚÍÏÖÎÏ ÔÁËÖÅ ÎÅËÏÔÏÒÙÅ ÄÒÕÇÉÅ ÚÁÐÉÓÉ, ÔÁËÉÅ ËÁË MX) ×ÍÅÓÔÏ:


www             A       192.168.196.2

îÅËÏÔÏÒÙÅ ÉÚ ÒÁÚÒÁÂÏÔÞÉËÏ× ÁÒÈÉÔÅËÔÕÒÙ bind (arch-bind-wizards), ÒÅËÏÍÅÎÄÕÀÔ ÎÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÚÁÐÉÓØ CNAME. ôÁË, ÞÔÏ ÅÅ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÎÁÄÏ ÒÁÓÓÍÁÔÒÉ×ÁÔØ ÓÅÒØÅÚÎÏ.

îÏ ËÁË ×Ù ×ÉÄÉÔÅ, ÜÔÏÔ ÄÏËÕÍÅÎÔ ÔÁËÖÅ ËÁË É ÍÎÏÖÅÓÔ×Ï ÄÒÕÇÉÈ ÓÅÒ×ÅÒÏ× ÎÅ ÓÌÅÄÕÀÔ ÜÔÏÍÕ ÐÒÁ×ÉÌÕ.

úÁÇÒÕÚÉÔÅ ÎÏ×ÕÀ ÂÁÚÕ ÄÁÎÎÙÈ ×ÙÐÏÌÎÉ× ËÏÍÁÎÄÕ ndc reload, ÜÔÏ ÚÁÓÔÁ×ÉÔ named ÐÅÒÅÞÉÔÁÔØ ÆÁÊÌÙ ÚÏÎ ÚÁÎÏ×Ï.

$ nslookup
Default Server:  localhost
Address:  127.0.0.1

> ls -d linux.bogus

üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÄÏÌÖÎÙ ÂÙÔØ ÐÅÒÅÞÉÓÌÅÎÙ ×ÓÅ ÚÁÐÉÓÉ × ÄÁÎÎÏÍ ÄÏÍÅÎÅ. ÷ ÒÅÚÕÌØÔÁÔÅ ÐÏÌÕÞÉÔÓÑ ÓÌÅÄÕÀÝÅÅ:

[localhost]
$ORIGIN linux.bogus.
@                       1D IN SOA       ns hostmaster (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        ns
                        1D IN NS        ns.friend.bogus.
                        1D IN TXT       "Linux.Bogus, your DNS consultants"
                        1D IN MX        10 mail
                        1D IN MX        20 mail.friend.bogus.
gw                      1D IN A         192.168.196.1
                        1D IN HINFO     "Cisco" "IOS"
                        1D IN TXT       "The router"
mail                    1D IN A         192.168.196.4
                        1D IN MX        10 mail
                        1D IN MX        20 mail.friend.bogus.
                        1D IN HINFO     "386sx" "Linux 1.0.9"
localhost               1D IN A         127.0.0.1
www                     1D IN CNAME     ns
donald                  1D IN A         192.168.196.3
                        1D IN MX        10 mail
                        1D IN MX        20 mail.friend.bogus.
                        1D IN HINFO     "i486" "Linux 1.2"
                        1D IN TXT       "DEK"
ftp                     1D IN A         192.168.196.5
                        1D IN MX        10 mail
                        1D IN MX        20 mail.friend.bogus.
                        1D IN HINFO     "P6" "Linux 1.3.59"
ns                      1D IN A         192.168.196.2
                        1D IN MX        10 mail
                        1D IN MX        20 mail.friend.bogus.
                        1D IN HINFO     "Pentium" "Linux 1.2"
@                       1D IN SOA       ns hostmaster (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

üÔÏ ÈÏÒÏÛÏ. ëÁË ×Ù ×ÉÄÉÔÅ, ÜÔÏ ×ÙÇÌÑÄÉÔ ÐÏÞÔÉ ËÁË ÓÁÍ ÆÁÊÌ ÚÏÎÙ. ôÅÐÅÒØ ÐÒÏ×ÅÒÉÍ ËÁËÏÊ ÂÕÄÅÔ ÏÔ×ÅÔ ÔÏÌØËÏ ÄÌÑ ÍÁÛÉÎÙ Ó ÉÍÅÎÅÍ www:

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

www.linux.bogus canonical name = ns.linux.bogus
linux.bogus     nameserver = ns.linux.bogus
linux.bogus     nameserver = ns.friend.bogus
ns.linux.bogus  internet address = 192.168.196.2

äÒÕÇÉÍÉ ÓÌÏ×ÁÍÉ, ÎÁÓÔÏÑÝÉÍ ÉÍÅÎÅÍ ÄÌÑ www.linux.bogus Ñ×ÌÑÅÔÓÑ ns.linux.bogus, É ÏÎ ÔÁËÖÅ ÄÁÅÔÓÑ ÎÅËÏÔÏÒÁÑ ÄÏÐÏÌÎÉÔÅÌØÎÁÑ ÉÎÆÏÒÍÁÃÉÀ Ï ÍÁÛÉÎÅ ns, ÄÏÓÔÁÔÏÞÎÁÑ, ÞÔÏÂÙ ÓÏÅÄÉÎÉÔØÓÑ Ó ÎÅÊ.

ôÅÐÅÒØ ÍÙ ÎÁÈÏÄÉÍÓÑ ÎÁ ÓÅÒÅÄÉÎÅ ÐÕÔÉ.

4.3 ïÂÒÁÔÎÁÑ (reverse) ÚÏÎÁ

ôÅÐÅÒØ ÐÒÏÇÒÁÍÍÙ ÍÏÇÕÔ ÐÒÅÏÂÒÁÚÏ×Ù×ÁÔØ ÉÍÅÎÁ ÍÁÛÉÎ × ÄÏÍÅÎÅ linux.bogus × ÁÄÒÅÓÁ, ÐÏ ËÏÔÏÒÙÍ ÏÎÉ ÍÏÇÕÔ Ó×ÑÚÁÔØÓÑ Ó ÜÔÉÍÉ ÍÁÛÉÎÁÍÉ. îÏ ÔÁËÖÅ, ËÒÏÍÅ ÜÔÏÇÏ, ÔÒÅÂÕÅÔÓÑ ÏÂÒÁÔÎÁÑ ÚÏÎÁ, ËÏÔÏÒÁÑ ÄÁÅÔ ×ÏÚÍÏÖÎÏÓÔØ DNS ÐÒÅÏÂÒÁÚÏ×Ù×ÁÔØ ÁÄÒÅÓÁ × ÉÍÅÎÁ ÍÁÛÉÎ. üÔÉ ÉÍÅÎÁ ÉÓÐÏÌØÚÕÀÔÓÑ ÄÏÓÔÁÔÏÞÎÙÍ ËÏÌÉÞÅÓÔ×ÏÍ ÓÅÒ×ÅÒÏ× ÒÁÚÌÉÞÎÏÇÏ ÒÏÄÁ (FTP, IRC, WWW É ÄÒÕÇÉÍÉ) ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÒÅÛÉÔØ, ÈÏÔÑÔ ÌÉ ÏÎÉ Ó ×ÁÍÉ ÏÂÝÁÔØÓÑ ÉÌÉ ÎÅÔ, É ÄÁÖÅ ÉÎÏÇÄÁ ÉÍÑ ÍÁÛÉÎÙ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÒÅÛÉÔØ ËÁËÏÊ ÐÒÉÏÒÉÔÅÔ ×ÁÍ ÄÁÔØ. ïÂÒÁÔÎÁÑ ÚÏÎÁ ÔÒÅÂÕÅÔÓÑ ÄÌÑ ÐÏÌÎÏÇÏ ÄÏÓÔÕÐÁ Ë ÒÁÚÌÉÞÎÙÍ ÓÅÒ×ÉÓÁÍ × Internet.

ðÏÍÅÓÔÉÔÅ ÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ × ÆÁÊÌ named.conf:


zone "196.168.192.in-addr.arpa" {
        notify no;
        type master;
        file "pz/192.168.196";
};

üÔÉ ÓÔÒÏËÉ ÐÏÈÏÖÉ ÎÁ ÏÐÉÓÁÎÉÅ ÚÏÎÙ 0.0.127.in-addr.arpa, Á ÆÁÊÌ ÚÏÎÙ ÔÁËÖÅ ÉÍÅÅÔ ÓÈÏÄÎÏÅ ÓÏÄÅÒÖÁÎÉÅ:


@       IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
                        199802151 ; Serial, todays date + todays serial
                        8H      ; Refresh
                        2H      ; Retry
                        1W      ; Expire
                        1D)     ; Minimum TTL
                NS      ns.linux.bogus.

1               PTR     gw.linux.bogus.
2               PTR     ns.linux.bogus.
3               PTR     donald.linux.bogus.
4               PTR     mail.linux.bogus.
5               PTR     ftp.linux.bogus.

ôÅÐÅÒØ ÐÅÒÅÚÁÐÕÓÔÉÔÅ ×ÁÛ named (ndc restart) É ÓÎÏ×Á ÐÒÏ×ÅÒØÔÅ ÅÇÏ ÒÁÂÏÔÕ Ó ÐÏÍÏÝØÀ ÐÒÏÇÒÁÍÍÙ nslookup:


> 192.168.196.4
Server:  localhost
Address:  127.0.0.1

Name:    mail.linux.bogus
Address:  192.168.196.4

ÔÁË, ÜÔÏ ×ÙÇÌÑÄÉÔ ÎÏÒÍÁÌØÎÏ, ÔÅÐÅÒØ ×ÙÄÁÊÔÅ ÐÏÌÎÙÊ ÓÐÉÓÏË ÍÁÛÉÎ × ÄÏÍÅÎÅ, ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÐÒÏ×ÅÒÉÔØ ÐÒÁ×ÉÌØÎÏÓÔØ ÉÎÆÏÒÍÁÃÉÉ:


> ls -d 196.168.192.in-addr.arpa
[localhost]
$ORIGIN 196.168.192.in-addr.arpa.
@                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                        1D IN NS        ns.linux.bogus.
1                       1D IN PTR       gw.linux.bogus.
2                       1D IN PTR       ns.linux.bogus.
3                       1D IN PTR       donald.linux.bogus.
4                       1D IN PTR       mail.linux.bogus.
5                       1D IN PTR       ftp.linux.bogus.
@                       1D IN SOA       ns.linux.bogus. hostmaster.linux.bogus. (
                                        199802151       ; serial
                                        8H              ; refresh
                                        2H              ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

÷ÙÇÌÑÄÉÔ ÈÏÒÏÛÏ!

óÕÝÅÓÔ×ÕÅÔ ÎÅÓËÏÌØËÏ ×ÅÝÅÊ, ËÏÔÏÒÙÅ Ñ ÄÏÌÖÅÎ ÄÏÂÁ×ÉÔØ ÚÄÅÓØ. óÅÔÅ×ÙÅ ÁÄÒÅÓÁ, ÉÓÐÏÌØÚÕÅÍÙÅ ÚÄÅÓØ ×ÚÑÔÙ ÉÚ ÏÄÎÏÇÏ ÉÚ ÂÌÏËÏ× 'ÌÉÞÎÙÈ (private) ÓÅÔÅÊ', ÉÈ ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÐÕÂÌÉÞÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ × internet. ôÁË, ÞÔÏ ÉÈ ÍÏÖÎÏ ÓÐÏËÏÊÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ËÁË ÐÒÉÍÅÒ × ÜÔÏÍ ÄÏËÕÍÅÎÔÅ. ÷ÔÏÒÁÑ ×ÅÝØ ÜÔÏ ÓÔÒÏËÁ notify no;. ïÎÁ ÚÁÓÔÁ×ÌÑÅÔ named ÎÅ ÉÚ×ÅÝÁÔØ ×ÔÏÒÉÞÎÙÅ (×ÅÄÏÍÙÅ) ÓÅÒ×ÅÒÁ, ËÏÇÄÁ ×Ù ÏÂÎÏ×ÌÑÅÔÅ ÏÄÉÎ ÉÚ ÆÁÊÌÏ× ÚÏÎ. ÷ bind-8, named ÍÏÖÅÔ Õ×ÅÄÏÍÌÑÔØ ÄÒÕÇÉÅ ÓÅÒ×ÅÒÁ, ÐÅÒÅÞÉÓÌÅÎÎÙÅ × ÚÁÐÉÓÑÈ NS × ÆÁÊÌÁÈ ÚÏÎ, ËÏÇÄÁ ËÏÎËÒÅÔÎÁÑ ÚÏÎÁ ÏÂÎÏ×ÌÑÅÔÓÑ. üÔÏ Ñ×ÌÑÅÔÓÑ ÕÄÏÂÎÙÍ ÄÌÑ ÏÂÙÞÎÏÇÏ ÉÓÐÏÌØÚÏ×ÁÎÉÑ, ÎÏ ÄÌÑ ÌÉÞÎÙÈ ÜËÓÐÅÒÉÍÅÎÔÏ× Ó ÚÏÎÁÍÉ ÜÔÁ ×ÏÚÍÏÖÎÏÓÔØ ÄÏÌÖÎÁ ÂÙÔØ ÏÔËÌÀÞÅÎÁ, ÍÙ ÖÅ ÎÅ ÈÏÔÉÍ, ÞÔÏÂÙ ÎÁÛ ÜËÓÐÅÒÉÍÅÎÔ ÚÁÇÒÑÚÎÑÌ internet?

é ËÏÎÅÞÎÏ, ÜÔÏÔ ÄÏÍÅÎ Ñ×ÌÑÅÔÓÑ ÆÉËÔÉ×ÎÙÍ, ÔÁËÖÅ ËÁË É ×ÓÅ ÁÄÒÅÓÁ × ÎÅÍ. äÌÑ ÎÁÓÔÏÑÝÅÇÏ ÐÒÉÍÅÒÁ ÄÅÊÓÔ×ÕÀÝÅÇÏ ÄÏÍÅÎÁ ÓÍÏÔÒÉÔÅ ÓÌÅÄÕÀÝÉÊ ÒÁÚÄÅÌ.

5. ðÒÉÍÅÒ ÒÅÁÌØÎÏÇÏ ÄÏÍÅÎÁ

íÙ ÚÄÅÓØ ÐÅÒÅÞÉÓÌÉÍ ÎÅÓËÏÌØËÏ ÎÁÓÔÏÑÝÉÈ ÆÁÊÌÏ× ÚÏÎ

ðÏÌØÚÏ×ÁÔÅÌÉ ÐÒÅÄÌÏÖÉÌÉ, ÞÔÏÂÙ Ñ ×ËÌÀÞÉÌ ÐÒÉÍÅÒ ÎÁÓÔÒÏÅË ÄÅÊÓÔ×ÕÀÝÅÇÏ ÄÏÍÅÎÁ ËÁË ÕÞÅÂÎÏÅ ÐÏÓÏÂÉÅ.

ñ ÉÓÐÏÌØÚÕÀ ÜÔÏÔ ÐÒÉÍÅÒ Ó ÒÁÚÒÅÛÅÎÉÑ David Bullock ÉÚ LAND-5. üÔÉ ÆÁÊÌÙ ÓÏÄÅÒÖÁÔ ÉÎÆÏÒÍÁÃÉÀ, ËÏÔÏÒÁÑ Ñ×ÌÑÌÁÓØ ÒÅÁÌØÎÏÊ ÎÁ 24 óÅÎÔÑÂÒÑ 1996 ÇÏÄÁ, É ÂÙÌÉ ÏÔÒÅÄÁËÔÉÒÏ×ÁÎÙ ÍÎÏÀ ÄÌÑ ÓÏÏÔ×ÅÔÓÔ×ÉÑ ÐÒÁ×ÉÌÁÍ ÓÉÎÔÁËÓÉÓÁ bind-8 É ÉÓÐÏÌØÚÏ×ÁÌÉ ÎÅËÏÔÏÒÙÅ ÍÏÉ ÒÁÓÛÉÒÅÎÉÑ. ôÁË ÞÔÏ, ÔÏ ÞÔÏ ×Ù Õ×ÉÄÉÔÅ ÚÄÅÓØ ÂÕÄÅÔ ÏÔÌÉÞÁÔØÓÑ ÏÔ ÔÏÇÏ, ÞÔÏ ×Ù Õ×ÉÄÉÔÅ ÓÄÅÌÁ× ÚÁÐÒÏÓ ÎÁ ÎÁÓÔÏÑÝÉÊ ÓÅÒ×ÅÒ ÉÍÅÎ LAND-5.

5.1 /etc/named.conf (ÉÌÉ /var/named/named.conf)

úÄÅÓØ ÍÙ ÏÂÎÁÒÕÖÉÍ Ä×Á ÒÁÚÄÅÌÁ ÏÓÎÏ×ÎÙÈ ÚÏÎ ÄÌÑ Ä×ÕÈ ÎÅÏÂÈÏÄÉÍÙÈ ÏÂÒÁÔÎÙÈ ÚÏÎ: ÄÌÑ ÓÅÔÉ 127.0.0, Á ÔÁËÖÅ ÄÌÑ ÄÏÍÅÎÁ LAND-5 Ó ÎÏÍÅÒÏÍ 206.6.177. á ÚÁÐÉÓÉ ÄÌÑ ÏÓÎÏ×ÎÏÊ ÚÏÎÙ ÄÏÍÅÎÁ land-5.com. ôÁËÖÅ ÚÁÍÅÔÉÍ, ÞÔÏ ×ÍÅÓÔÏ ÒÁÚÍÅÝÅÎÉÑ ÆÁÊÌÏ× × ÄÉÒÅËÔÏÒÉÉ ÎÁÚ×ÁÎÎÏÊ pz, ËÁË Ñ ÄÅÌÁÌ ÚÄÅÓØ ÄÏ ÜÔÏÇÏ, ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÐÏÍÅÓÔÉÌ ÜÔÉ ÆÁÊÌÙ × ÄÉÒÅËÔÏÒÉÀ ÎÁÚ×ÁÎÎÕÀ zone.


// úÁÇÒÕÚÏÞÎÙÊ ÆÁÊÌ ÄÌÑ ÓÅÒ×ÅÒÁ ÉÍÅÎ LAND-5

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

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

zone "0.0.127.in-addr.arpa" {
        type master;
        file "zone/127.0.0";
};

zone "land-5.com" {
        type master;
        file "zone/land-5.com";
};

zone "177.6.206.in-addr.arpa" {
        type master;
        file "zone/206.6.177";
};

åÓÌÉ ×Ù ÐÏÍÅÓÔÉÔÅ ÜÔÉ ÄÁÎÎÙÅ × ×ÁÛ ÆÁÊÌ named.conf ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÐÏÜËÓÐÅÒÉÍÅÎÔÉÒÏ×ÁÔØ Ó ÎÉÍÉ, ÔÏ ðïöáìõêóôá ÐÏÍÅÓÔÉÔÅ ÓÔÒÏËÕ notify no; × ÒÁÚÄÅÌ ÚÏÎ, ÐÒÉÎÁÄÌÅÖÁÝÉÈ land-5, ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÉÚÂÅÖÁÔØ ÉÎÃÉÄÅÎÔÏ×.

5.2 /var/named/root.hints

úÁÐÏÍÎÉÔÅ, ÞÔÏ ÜÔÏ ÆÁÊÌ ÎÅ Ñ×ÌÑÅÔÓÑ ÐÏÓÔÏÑÎÎÙÍ, É ÄÁÎÎÙÅ ÏÄÎÏÇ ÉÚ ÐÅÒÅÞÉÓÌÅÎÎÙÈ ÚÄÅÓØ ÓÅÒ×ÅÒÏ× Ñ×ÌÑÀÔÓÑ ÕÓÔÁÒÅ×ÛÉÍÉ. ÷ÁÍ ÌÕÞÛÅ ÉÓÐÏÌØÚÏ×ÁÔØ ×ÍÅÓÔÏ ÐÒÉ×ÅÄÅÎÎÏÇÏ ÆÁÊÌÁ, ÆÁÊÌ ÓÄÅÌÁÎÎÙÊ ÐÅÒÅÄ ÜÔÉÍ ÐÏÍÏÝØÀ ÐÒÏÇÒÁÍÍÙ dig, ËÁË ÜÔÏ ÏÂßÑÓÎÑÌÏÓØ ÒÁÎÅÅ.


; <<>> DiG 8.1 <<>> @A.ROOT-SERVERS.NET. 
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
;; QUERY SECTION:
;;      ., type = NS, class = IN

;; ANSWER SECTION:
.                       6D IN NS        G.ROOT-SERVERS.NET.
.                       6D IN NS        J.ROOT-SERVERS.NET.
.                       6D IN NS        K.ROOT-SERVERS.NET.
.                       6D IN NS        L.ROOT-SERVERS.NET.
.                       6D IN NS        M.ROOT-SERVERS.NET.
.                       6D IN NS        A.ROOT-SERVERS.NET.
.                       6D IN NS        H.ROOT-SERVERS.NET.
.                       6D IN NS        B.ROOT-SERVERS.NET.
.                       6D IN NS        C.ROOT-SERVERS.NET.
.                       6D IN NS        D.ROOT-SERVERS.NET.
.                       6D IN NS        E.ROOT-SERVERS.NET.
.                       6D IN NS        I.ROOT-SERVERS.NET.
.                       6D IN NS        F.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12
M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241

;; Total query time: 215 msec
;; FROM: roke.uio.no to SERVER: A.ROOT-SERVERS.NET.  198.41.0.4
;; WHEN: Sun Feb 15 01:22:51 1998
;; MSG SIZE  sent: 17  rcvd: 436

5.3 /var/named/zone/127.0.0

ëÁË ÏÓÎÏ×Á ÆÁÊÌÁ ÏÂÑÚÁÔÅÌØÎÙÍÉ ÚÁÐÉÓÑÍÉ Ñ×ÌÑÀÔÓÑ ÚÁÐÉÓØ SOA, É ÚÁÐÉÓØ, ËÏÔÏÒÁÑ ÏÂßÑ×ÌÑÅÔ 127.0.0.1 ËÁË localhost. ôÒÅÂÕÅÔÓÑ ÕËÁÚÁÔØ ÏÂÅ ÜÔÉ ÚÁÐÉÓÉ. âÏÌØÛÅ ÎÉÞÅÇÏ ÎÅ ÄÏÌÖÎÏ ÂÙÔØ × ÜÔÏÍ ÆÁÊÌÅ. åÇÏ ÓËÏÒÅÅ ×ÓÅÇÏ ÎÉËÏÇÄÁ ÎÅ ÎÁÄÏ ÂÕÄÅÔ ÏÂÎÏ×ÌÑÔØ, ÄÏ ÔÅÈ ÐÏÒ ÐÏËÁ ÎÅ ÉÚÍÅÎÉÔÓÑ ÁÄÒÅÓ ÓÅÒ×ÅÒÁ ÉÍÅÎ ÉÌÉ ÏÔ×ÅÔÓÔ×ÅÎÎÏÇÏ ÚÁ ÍÁÛÉÎÕ (hostmaster).


@               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

úÄÅÓØ ÍÙ Õ×ÉÄÉÍ ÏÂÑÚÁÔÅÌØÎÕÀ ÚÁÐÉÓØ SOA, É ÎÅÏÂÈÏÄÉÍÙÅ ÚÁÐÉÓÉ NS. íÙ ÍÏÖÅÍ ×ÉÄÅÔØ, ÞÔÏ ÉÍÅÅÔÓÑ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ ÓÅÒ×ÅÒ ÉÍÅÎ ÒÁÓÐÏÌÏÖÅÎÎÙÊ ÐÏ ÁÄÒÅÓÕ ns2.psi.net. ÷ÓÅÇÄÁ ÎÅÏÂÈÏÄÉÍÏ ÉÍÅÔØ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ ÓÅÒ×ÅÒ ÉÍÅÎ ÚÁ ÐÒÅÄÅÌÁÍÉ ÄÏÍÅÎÁ × ËÁÞÅÓÔ×Å ÒÅÚÅÒ×Á. íÙ ÔÁËÖÅ ÍÏÖÅÍ ×ÉÄÅÔØ, ÞÔÏ ÜÔÏÔ ÄÏÍÅÎ ÉÍÅÅÔ ÏÓÎÏ×ÎÏÊ ÓÅÒ×ÅÒ, ÎÁÚ×ÁÎÎÙÊ land-5, ËÏÔÏÒÙÊ ÚÁÂÏÔÉÔÓÑ Ï ÍÎÏÖÅÓÔ×Å ÒÁÚÎÙÈ ÓÅÒ×ÉÓÏ× Internet, ÜÔÏ ÓÄÅÌÁÎÏ ÉÓÐÏÌØÚÕÑ ÚÁÐÉÓÉ CNAME (ËÁË ÁÌØÔÅÒÎÁÔÉ×Á ÉÓÐÏÌØÚÏ×ÁÎÉÀ ÚÁÐÉÓÅÊ A).

ëÁË ×Ù ×ÉÄÉÔÅ ÉÚ ÚÁÐÉÓÉ SOA, ÆÁÊÌ ÚÏÎÙ ÒÁÓÐÏÌÏÖÅÎ × ÄÏÍÅÎÅ land-5.com, ÏÔ×ÅÔÓÔ×ÅÎÎÙÍ ÌÉÃÏÍ Ñ×ÌÑÅÔÓÑ root@land-5.com. hostmaster -- ÜÔÏ ÄÒÕÇÏÊ ÞÁÓÔÏ ÉÓÐÏÌØÚÕÅÍÙÊ ÁÄÒÅÓ ÄÌÑ ÏÔ×ÅÓÔ×ÅÎÎÏÇÏ ÚÁ ÜÔÕ ÒÁÂÏÔÕ ÞÅÌÏ×ÅËÁ. óÅÒÉÊÎÙÊ ÎÏÍÅÒ ÚÁÐÉÓÁÎ × ÐÒÉ×ÙÞÎÏÍ ÆÏÒÍÁÔÅ yyyymmdd É ÄÏÐÏÌÎÅÎ ÓÅÒÉÊÎÙÍ ÎÏÍÅÒÏÍ ÄÌÑ ÔÅËÕÝÅÇÏ ÄÎÑ; ÜÔÏ ÐÒÉÍÅÒÎÏ 6-Ñ ×ÅÒÓÉÑ ÆÁÊÌÁ ÚÏÎÙ ÎÁ 20 ÓÅÎÔÑÂÒÑ 1996. ðÏÍÎÉÔÅ, ÞÔÏ ÓÅÒÉÊÎÙÊ ÎÏÍÅÒ ÄÏÌÖÅÎ Õ×ÅÌÉÞÉ×ÁÔØÓÑ ÍÏÎÏÔÏÎÎÏ, ÚÄÅÓØ ÔÏÌØËÏ ÏÄÎÁ ÃÉÆÒÁ ÄÌÑ ÓÅÒÉÊÎÏÇÏ ÎÏÍÅÒÁ ÔÅËÕÝÅÇÏ ÄÎÑ, ÔÁË ÞÔÏ ÐÏÓÌÅ 9 ÐÏÐÒÁ×ÏË ÍÙ ÄÏÌÖÎÙ ÖÄÁÔØ ÚÁ×ÔÒÁÛÎÅÇÏ ÄÎÑ, ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÄÁÌØÛÅ ÐÒÏÄÏÌÖÉÔØ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÆÁÊÌ. òÁÓÓÍÏÔÒÉÔÅ ×ÏÚÍÏÖÎÏÓÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ä×ÕÈ ÃÉÆÒ ÄÌÑ ÎÏÍÅÒÁ ×ÍÅÓÔÏ ÏÄÎÏÊ.


@       IN      SOA     land-5.com. root.land-5.com. (
                        199609206       ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        1W              ; expire, seconds
                        1D )            ; minimum, seconds
                NS      land-5.com.
                NS      ns2.psi.net.
                MX      10 land-5.com.  ; ïÓÎÏ×ÎÏÊ ÐÏÞÔÏ×ÙÊ ÓÅÒ×ÅÒ

localhost       A       127.0.0.1

router          A       206.6.177.1
        
land-5.com.     A       206.6.177.2
ns              A       206.6.177.3
www             A       207.159.141.192

ftp             CNAME   land-5.com.
mail            CNAME   land-5.com.
news            CNAME   land-5.com.

funn            A       206.6.177.2
@               TXT     "LAND-5 Corporation"

;
;       òÁÂÏÞÉÅ ÓÔÁÎÃÉÉ
;
ws-177200       A       206.6.177.200
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177201       A       206.6.177.201
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177202       A       206.6.177.202
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177203       A       206.6.177.203
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177204       A       206.6.177.204
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177205       A       206.6.177.205
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
; {ÍÎÏÇÏ ÐÏ×ÔÏÒÑÀÝÉÈÓÑ ÏÐÒÅÄÅÌÅÎÉÊ ÕÄÁÌÅÎÏ}
ws-177250       A       206.6.177.250
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177251       A       206.6.177.251
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177252       A       206.6.177.252
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177253       A       206.6.177.253
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ
ws-177254       A       206.6.177.254
                MX      10 land-5.com.   ; ïÓÎÏ×ÎÁÑ ÐÏÞÔÏ×ÁÑ ÍÁÛÉÎÁ

åÓÌÉ ×Ù ÐÏÒÁÂÏÔÁÅÔÅ Ó ÓÅÒ×ÅÒÏÍ ÉÍÅÎ ÄÏÍÅÎÁ land-5, ÔÏ ×Ù ÏÂÎÁÒÕÖÉÔÅ, ÞÔÏ ÉÍÅÎÁ ÍÁÛÉÎ ÉÍÅÀÔ ÆÏÒÍÕ ws_ÎÏÍÅÒ. ó ÐÏÓÌÅÄÎÉÈ ×ÅÒÓÉÊ bind 4 named ÎÁÞÁÌ ÏÇÒÁÎÉÞÉ×ÁÔØ ÔÏ, ËÁËÉÅ ÓÉÍ×ÏÌÙ ÍÏÇÕÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÙ × ÉÍÅÎÁÈ ÍÁÛÉÎ. ôÁË, ÞÔÏ ÜÔÉ ÉÍÅÎÁ ÎÅÌØÚÑ ÂÙÌÏ ÉÓÐÏÌØÚÏ×ÁÔØ Ó bind-8, É Ñ ÐÏÄÓÔÁ×ÉÌ ÓÉÍ×ÏÌ '-' (ÔÉÒÅ) ×ÍÅÓÔÏ ÓÉÍ×ÏÌÁ '_' (ÐÏÄÞÅÒËÉ×ÁÎÉÅ).

äÒÕÇÁÑ ×ÅÝØ, ËÏÔÏÒÕÀ ÎÅÏÂÈÏÄÉÍÏ ÚÁÍÅÔÉÔØ, ÜÔÏ ÔÏ, ÞÔÏ ×ÓÅ ÒÁÂÏÞÉÅ ÓÔÁÎÃÉÉ ÎÅ ÉÍÅÀÔ ÉÎÄÉ×ÉÄÕÁÌØÎÙÈ ÉÍÅÎ, Á ×ÍÅÓÔÏ ÜÔÏÇÏ ÓÏÓÔÏÑÔ ÉÚ ÐÒÅÆÉËÓÁ ÚÁ ËÏÔÏÒÙÍ ÓÌÅÄÕÅÔ 2 ÐÏÓÌÅÄÎÉÈ ÞÉÓÌÁ ÉÚ IP-ÁÄÒÅÓÁ. éÓÐÏÌØÚÕÑ ÔÁËÏÅ ÓÏÇÌÁÛÅÎÉÅ ×Ù ÍÏÖÅÔÅ ÚÎÁÞÉÔÅÌØÎÏ ÕÐÒÏÓÔÉÔØ ÒÁÂÏÔÕ ÐÏ ÓÏÐÒÏ×ÏÖÄÅÎÉÀ, ÎÏ ÜÔÏ ÍÏÖÅÔ ÂÙÔØ ÄÏÓÔÁÔÏÞÎÏ ÂÅÚÌÉÞÎÏ É × ÄÅÊÓÔ×ÉÔÅÌØÎÏÓÔÉ ÍÏÖÅÔ ÂÙÔØ ÉÓÔÏÞÎÉËÏÍ ÎÅÄÏ×ÏÌØÓÔ×Á ÓÏ ÓÔÏÒÏÎÙ ×ÁÛÉÈ ËÌÉÅÎÔÏ×.

íÙ ÔÁËÖÅ ×ÉÄÉÍ, ÞÔÏ ÉÍÑ funn.land-5.com ÜÔÏ ÁÌÉÁÓ ÄÌÑ land-5.com, ÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ ÚÁÐÉÓØ A, Á ÎÅ ÚÁÐÉÓØ CNAME.

5.5 /var/named/zone/206.6.177

ñ ÐÒÏËÏÍÍÅÎÔÉÒÕÀ ÜÔÏ ÆÁÊÌ ÐÏÓÌÅ ÜÔÏÇÏ ÌÉÓÔÉÎÇÁ.


@               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.
2       PTR     funn.land-5.com.
;
;       òÁÂÏÞÉÅ ÓÔÁÎÃÉÉ
;
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.
; {ÍÎÏÇÏ ÐÏ×ÔÏÒÑÀÝÉÈÓÑ ÏÐÒÅÄÅÌÅÎÉÊ ÕÄÁÌÅÎÏ}
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.

ïÂÒÁÔÎÁÑ ÚÏÎÁ Ñ×ÌÑÅÔÓÑ ÔÏÊ ÞÁÓÔØÀ ÎÁÓÔÒÏÊËÉ, ËÏÔÏÒÁÑ ËÁÖÅÔÓÑ ÓÐÏÓÏÂÎÏÊ ×ÙÚ×ÁÔØ ÂÏÌØÛÏÅ ÇÏÒÅ (ÐÅÞÁÌØ, grief). ïÎÁ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÎÁÊÔÉ ÉÍÑ ÍÁÛÉÎÙ ÐÏ ÅÅ IP-ÁÄÒÅÓÕ. ðÒÉÍÅÒ: Õ ×ÁÓ ÅÓÔØ IRC-ÓÅÒ×ÅÒ É ÏÎ ÐÒÉÎÉÍÁÅÔ ÓÏÅÄÉÎÅÎÉÑ ÏÔ IRC-ËÌÉÅÎÔÏ×. ïÄÎÁËÏ ÏÎ ÎÁÈÏÄÉÔÓÑ × îÏÒ×ÅÇÉÉ É ÈÏÞÅÔ ÐÒÉÎÉÍÁÔØ ÓÏÅÄÉÎÅÎÉÑ ÔÏÌØËÏ ÏÔ ËÌÉÅÎÔÏ× ÉÚ îÏÒ×ÅÇÉÉ É ÄÒÕÇÉÈ ÓËÁÎÄÉÎÁ×ÓËÉÈ ÓÔÒÁÎ. ëÏÇÄÁ ×Ù ÓÏÅÄÉÎÑÅÔÅÓØ Ó ËÌÉÅÎÔÏÍ, ÔÏ Ó ÐÏÍÏÝØÀ ÂÉÂÌÉÏÔÅËÉ ÑÚÙËÁ ó ×Ù ÍÏÖÅÔÅ ÕÚÎÁÔØ ÁÄÒÅÓ ÓÏÅÄÉÎÑÀÝÅÊÓÑ Ó ÓÅÒ×ÅÒÏÍ ÍÁÛÉÎÙ, ÐÏÓËÏÌØËÕ ÜÔÏÔ ÁÄÒÅÓ ÓÏÄÅÒÖÉÔÓÑ ×Ï ×ÓÅÈ ÐÁËÅÔÁÈ, ÐÅÒÅÄÁ×ÁÅÍÙÈ ÐÏ ÓÅÔÉ. ôÅÐÅÒØ ÓÅÒ×ÅÒ ÍÏÖÅÔ ×ÙÚ×ÁÔØ ÆÕÎËÃÉÀ ÎÁÚ×ÁÎÎÕÀ gethostbyaddr, ËÏÔÏÒÁÑ ÉÝÅÔ ÉÍÑ ÍÁÛÉÎÙ ÐÏ ÚÁÄÁÎÎÏÍÕ IP-ÎÏÍÅÒÕ. Gethostbyaddr ÚÁÐÒÏÓÉÔ ÓÅÒ×ÅÒ DNS, ËÏÔÏÒÙÊ ×ÙÐÏÌÎÉÔ ÐÏÉÓË ÚÁÄÁÎÎÏÊ ÍÁÛÉÎÙ × DNS. äÏÐÕÓÔÉÍ ËÌÉÅÎÔ ÓÏÅÄÉÎÑÅÔÓÑ Ó ÍÁÛÉÎÙ ws-177200.land-5.com. IP-ÎÏÍÅÒ, ËÏÔÏÒÙÊ ÂÉÂÌÉÏÔÅËÁ C ÐÅÒÅÄÁÅÔ IRC-ÓÅÒ×ÅÒÕ, ÒÁ×ÅÎ 206.6.177.200. äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÎÁÊÔÉ ÉÍÑ ÍÁÛÉÎÙ ÎÁÍ ÎÅÏÂÈÏÄÉÍÏ ÎÁÊÔÉ ÄÏÍÅÎ 200.177.6.206.in-addr.arpa. DNS-ÓÅÒ×ÅÒ ÓÎÁÞÁÌÁ ÎÁÊÄÅÔ ÓÅÒ×ÅÒÁ ÄÏÍÅÎÁ arpa., ÚÁÔÅÍ ÎÁÊÄÅÔ ÓÅÒ×ÅÒÁ in-addr.arpa., ÓÌÅÄÕÑ ÄÁÌØÛÅ ÞÅÒÅÚ ÓÅÒ×ÅÒÁ ÇÒÕÐÐÙ 206, ÚÁÔÅÍ 6 É × ËÏÎÃÅ ËÏÎÃÏ× ÎÁÊÄÅÔ ÓÅÒ×ÅÒ ÄÌÑ ÚÏÎÙ 177.6.206.in-addr.arpa × ÄÏÍÅÎÅ land-5. ïÔ ËÏÔÏÒÏÇÏ ÏÎ × ËÏÎÃÅ ËÏÎÃÏ× ÍÏÖÅÔ ÐÏÌÕÞÉÔ ÏÔ×ÅÔ, ÞÔÏ ÄÌÑ 200.177.6.206.in-addr.arpa Õ ÎÁÓ ÅÓÔØ ÚÁÐÉÓØ 'PTR ws-177200.land-5.com', ÏÚÎÁÞÁÀÝÁÑ ÞÔÏ ÉÍÑ ÍÁÛÉÎÙ Ó ÁÄÒÅÓÏÍ 206.6.177.200 ÒÁ×ÎÏ ws-177200.land-5.com. ëÁË É ÏÂßÑÓÎÅÎÉÅ ÔÏÇÏ, ËÁË ÍÙ ÉÓËÁÌÉ prep.ai.mit.edu, ÜÔÏÔ ÐÒÉÍÅÒ ×ÙÍÙÛÌÅÎ.

÷ÅÒÎÅÍÓÑ Ë ÎÁÛÅÍÕ ÐÒÉÍÅÒÕ Ó IRC-ÓÅÒ×ÅÒÏÍ. IRC-ÓÅÒ×ÅÒ ÐÒÉÎÉÍÁÅÔ ÓÏÅÄÉÎÅÎÉÑ ÔÏÌØËÏ ÉÚ ÓËÁÎÄÉÎÁ×ÓËÉÈ ÓÔÒÁÎ, ÎÁÐÒÉÍÅÒ, *.no, *.se, *.dk, ÉÍÑ ws-177200.land-5.com Ñ×ÎÏ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ ÜÔÏÍÕ ÐÒÁ×ÉÌÕ É ÓÅÒ×ÅÒ ÚÁÐÒÅÔÉÔ ÓÏÅÄÉÎÅÎÉÅ. åÓÌÉ ÂÙ ÎÅ ÂÙÌÏ ÏÂÒÁÔÎÏÇÏ ÍÁÐÉÒÏ×ÁÎÉÑ ÁÄÒÅÓÁ 206.2.177.200 Ó ÐÏÍÏÝØÀ ÚÏÎÙ in-addr.arpa, ÔÏ ÓÅÒ×ÅÒ ÎÅ ÓÍÏÇ ÂÙ ×ÏÏÂÝÅ ÎÁÊÔÉ ÉÍÑ ÍÁÛÉÎÙ É ÄÏÌÖÅÎ ÂÙÌ ÂÙ ÓÒÁ×ÎÉ×ÁÔØ ÁÄÒÅÓ 206.2.177.200 Ó ÚÁÄÁÎÎÙÍÉ ÍÁÓËÁÍÉ --*.no, *.se É *.dk, ËÏÔÏÒÙÍ ÜÔÏÔ ÁÄÒÅÓ Ñ×ÎÏ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÅÔ.

îÅËÏÔÏÒÙÅ ÌÀÄÉ ÓËÁÖÕÔ, ÞÔÏ ÏÂÒÁÔÎÏÅ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÁÄÒÅÓÏ× ×ÁÖÎÏ ÔÏÌØËÏ ÄÌÑ ÓÅÒ×ÅÒÏ×, É ÎÅ ×ÁÖÎÏ ÄÌÑ ÏÓÔÁÌØÎÏÊ ÒÁÂÏÔÙ. üÔÏ ÎÅ ÔÁË: ÍÎÏÇÉÅ ftp, news, IRC É ÄÁÖÅ ÎÅËÏÔÏÒÙÅ http (WWW) ÓÅÒ×ÅÒÁ ÎÅ ÐÒÉÎÉÍÁÀÔ ÓÏÅÄÉÎÅÎÉÑ ÏÔ ÍÁÛÉÎ ÄÌÑ ËÏÔÏÒÙÈ ÏÎÉ ÎÅ ÍÏÇÕÔ ÎÁÊÔÉ ÉÍÅÎÁ. ôÁË ÞÔÏ × ÄÅÊÓÔ×ÉÔÅÌØÎÏÓÔÉ ÏÂÒÁÔÎÏÅ ÐÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÄÌÑ ÍÁÛÉÎ Ñ×ÌÑÅÔÓÑ ÏÂÑÚÁÔÅÌØÎÙÍ.

6. óÏÐÒÏ×ÏÖÄÅÎÉÅ

óÏÄÅÒÖÁÎÉÅ × ÒÁÂÏÞÅÍ ÓÏÓÔÏÑÎÉÉ.

óÕÝÅÓÔ×ÕÅÔ ÔÏÌØËÏ ÏÄÎÁ ÚÁÄÁÞÁ ÐÏ ÓÏÐÒÏ×ÏÖÄÅÎÉÀ named, ËÒÏÍÅ ÓÏÄÅÒÖÁÎÉÑ ÅÇÏ ÚÁÐÕÝÅÎÎÙÍ ÎÁ ÍÁÛÉÎÅ. üÔÏ ÒÅÇÕÌÑÒÎÏÅ ÏÂÎÏ×ÌÅÎÉÅ ÆÁÊÌÁ root.hints. îÁÉÂÏÌÅÅ ÌÅÇËÉÊ ÐÕÔØ -- ÜÔÏ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÐÒÏÇÒÁÍÍÙ dig. óÎÁÞÁÌÁ ÚÁÐÕÓÔÉÔÅ dig ÂÅÚ ÁÒÇÕÍÅÎÔÏ× É ×Ù ÐÏÌÕÞÉÔÅ ÆÁÊÌ root.hints, ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÔÊ ×ÁÛÉÍ ÄÁÎÎÙÍ. úÁÔÅÍ ÚÁÐÒÏÓÉÔÅ ÏÄÉÎ ÉÚ ÐÅÒÅÞÉÓÌÅÎÎÙÈ ËÏÒÎÅ×ÙÈ ÓÅÒ×ÅÒÏ×, ×ÙÐÏÌÎÉ× ËÏÍÁÎÄÕ dig @rootserver. ÷Ù ÚÁÍÅÔÉÔÅ, ÞÔÏ ×Ù×ÏÄ ÜÔÏÊ ËÏÍÁÎÄÙ ×ÙÇÌÑÄÉÔ ÕÖÁÓÎÏ ÐÏÈÏÖÅ ÎÁ ÆÁÊÌ root.hints. óÏÈÒÁÎÉÔÅ ×Ù×ÏÄÉÍÙÅ ÄÁÎÎÙÅ × ÆÁÊÌ (Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ dig @e.root-servers.net . ns >root.hints.new) É ÚÁÍÅÎÉÔÅ ÜÔÉÍ ÆÁÊÌÏÍ ÓÔÁÒÙÊ ÆÁÊÌ root.hints.

ðÏÍÎÉÔÅ, ÞÔÏ ÎÅÏÂÈÏÄÉÍÏ ÐÅÒÅÚÁÐÕÓÔÉÔØ named ÐÏÓÌÅ ÚÁÍÅÎÙ ÆÁÊÌÁ.

Al Longyear ÐÏÓÌÁÌ ÍÎÅ ÜÔÏÔ ÓËÒÉÐÔ, ËÏÔÏÒÙÊ ÍÏÖÅÔ ÂÙÔØ Á×ÔÏÍÁÔÉÞÅÓËÉ ÚÁÐÕÝÅÎ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÏÂÎÏ×ÌÑÔØ ÆÁÊÌ root.hints, ÓÏÚÄÁÊÔÅ ÚÁÐÉÓØ × crontab ÄÌÑ ÚÁÐÕÓËÁ ÅÇÏ ÒÁÚ × ÍÅÓÑÃ É ÚÁÂÕÄØÔÅ ÐÒÏ ÎÅÇÏ. ÷ ÓËÒÉÐÔÅ ÐÒÅÄÐÏÌÁÇÁÅÔÓÑ, ÞÔÏ ÐÏÞÔÏ×ÁÑ ÓÉÓÔÅÍÁ ÒÁÂÏÔÁÅÔ É ÞÔÏ ÏÐÒÅÄÅÌÅÎ ÐÏÞÔÏ×ÙÊ ÁÌÉÁÓ `hostmaster'. ÷Ù ÄÏÌÖÎÙ ÐÏÄÐÒÁ×ÉÔØ ÜÔÏÔ ÓËÒÉÐÔ ÄÌÑ ÓÏÏÔ×ÅÔÓÔ×ÉÑ ×ÁÛÉÍ ÎÁÓÔÒÏÊËÁÍ.


#!/bin/sh
#
# ïÂÎÏ×ÌÑÅÔ ÉÎÆÏÒÍÁÃÉÀ ËÅÛÁ ÓÅÒ×ÅÒÁ ÉÍÅÎ ÒÁÚ × ÍÅÓÑÃ.
# ïÎ Á×ÔÏÍÁÔÉÞÅÓËÉ ÚÁÐÕÓËÁÅÔÓÑ ÒÁÚ × ÍÅÓÑÃ Ó ÐÏÍÏÝØÀ cron.
#
(
 echo "To: hostmaster <hostmaster>"
 echo "From: system <root>"
 echo "Subject: Automatic update of the named.conf file"
 echo

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

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

 echo "The named.conf file has been updated to contain the following   
information:"
 echo
 cat root.hints.new

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

îÅËÏÔÏÒÙÅ ÉÚ ×ÁÓ ÚÁÍÅÔÉÌÉ, ÞÔÏ ÆÁÊÌ root.hints ÔÁËÖÅ ÄÏÓÔÕÐÅÎ ÐÏ ftp Ó ÓÅÒ×ÅÒÁ Internic. ðÏÖÁÌÕÊÓÔÁ ÎÅ ÉÓÐÏÌØÚÕÊÔÅ ftp ÄÌÑ ÏÂÎÏ×ÌÅÎÉÑ ÆÁÊÌÁ root.hints, ×ÙÛÅÐÒÉ×ÅÄÅÎÎÙÊ ÍÅÔÏÄ ÂÏÌÅÅ ÄÒÕÖÅÌÀÂÅÎ ÐÏ ÏÔÎÏÛÅÎÉÀ Ë ÓÅÔÉ.

7. ðÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÎÁÓÔÒÏÅË named ÉÚ ×ÅÒÓÉÉ 4 × ×ÅÒÓÉÀ 8

òÁÎØÛÅ ÜÔÏ ÂÙÌ ÒÁÚÄÅÌ Ï ÉÓÐÏÌØÚÏ×ÁÎÉÉ bind 8, ÎÁÐÉÓÁÎÎÙÊ David E. Smith (dave@bureau42.ml.org). ñ ÎÅÍÎÏÇÏ ÉÚÍÅÎÉÌ ÅÇÏ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÓÏÏÔ×ÅÔÓÔ×Ï×ÁÔØ ÉÍÅÎÉ ÒÁÚÄÅÌÁ.

÷ ÎÅÍ ÓÏ×ÓÅÍ ÎÅÍÎÏÇÏ. úÁ ÉÓËÌÀÞÅÎÉÅÍ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÆÁÊÌÁ named.conf ×ÍÅÓÔÏ named.boot, ×ÓÅ ÏÓÔÁÌØÎÏÅ ÔÏÖÅ ÓÁÍÏÅ. é bind8 ÐÏÓÔÁ×ÌÑÅÔÓÑ ÓÏ ÓËÒÉÐÔÏÍ ÎÁ perl, ËÏÔÏÒÙÊ ÐÒÅÏÂÒÁÚÕÅÔ ÆÁÊÌÙ ÎÁÓÔÒÏÅË ÓÏ ÓÔÁÒÙÍ ÓÉÎÔÁËÓÉÓÏÍ × ÆÁÊÌ Ó ÎÏ×ÙÍ ÓÉÎÔÁËÓÉÓÏÍ. ðÒÉÍÅÒ ÆÁÊÌÁ named.boot (ÓÔÁÒÙÊ ÓÔÉÌØ) ÄÌÑ ËÅÛÉÒÕÀÝÅÇÏ ÓÅÒ×ÅÒÁ ÉÍÅÎ:


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

÷ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÅ, ÎÁÈÏÄÑÓØ × ÄÉÒÅËÔÏÒÉÉ bind8/src/bin/named (ÜÔÏÔ ÐÒÉÍÅÒ ÐÒÅÄÐÏÌÁÇÁÅÔ, ÞÔÏ Õ ×ÁÓ ÉÍÅÅÔÓÑ ÉÓÈÏÄÎÙÊ ËÏÄ ÐÁËÅÔÁ bind8. åÓÌÉ Õ ×ÁÓ ÂÉÎÁÒÎÙÊ ÐÁËÅÔ, ÔÏ ÓËÒÉÐÔ ×ÅÒÏÑÔÎÏ ÄÏÌÖÅÎ ÂÙÔØ ÇÄÅ-ÔÏ ÒÑÄÏÍ, ÈÏÔÑ Ñ ÎÅ Õ×ÅÒÅÎ, × ÔÏÍ ÇÄÅ ÔÏÞÎÏ ÏÎ ÂÕÄÅÔÎÁÈÏÄÉÔÓÑ), ÎÁÂÅÒÉÔÅ:
./named-bootconf.pl < named.boot > named.conf

üÔÁ ËÏÍÁÎÄÁ ÓÏÚÄÁÓÔ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÊ ÆÁÊÌ named.conf:
// generated by named-bootconf.pl

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

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

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

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

üÔÏÔ ÓËÒÉÐÔ ÒÁÂÏÔÁÅÔ ÄÌÑ ×ÓÅÇÏ, ÞÔÏ ÍÏÇÌÏ ÂÙÔØ ÚÁÐÉÓÁÎÏ × ÆÁÊÌÅ named.boot, ÈÏÔÑ ÏÎ ÎÅ ÄÏÂÁ×ÌÑÅÔ ×ÓÅ ÎÏ×ÙÅ ÒÁÓÛÉÒÅÎÉÑ É ÏÐÃÉÉ ÎÁÓÔÒÏÊËÉ, ËÏÔÏÒÙÅ ÒÁÚÒÅÛÅÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ × bind8. úÄÅÓØ Ñ ÐÒÉ×ÅÄÕ ÂÏÌÅÅ ÐÏÌÎÙÊ ÆÁÊÌ named.conf, ËÏÔÏÒÙÊ ÄÅÌÁÅÔ ÔÅ ÖÅ ÓÁÍÙÅ ×ÅÝÉ, ÎÏ ÎÅÍÎÏÇÏ ÂÏÌÅÅ ÜÆÆÅËÔÉ×ÎÏ.


// üÔÏ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ ÄÌÑ named (ÄÌÑ BIND 8.1 ÉÌÉ ÂÏÌÅÅ ÐÏÚÄÎÉÈ).
// ïÎ ÏÂÙÞÎÏ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔÓÑ ËÁË /etc/named.conf.
// ïÔÌÉÞÉÅ ÏÔ `ÛÁÂÌÏÎÎÏÇÏ' ÆÁÊÌÁ named.conf (ËÒÏÍÅ ÜÔÏÇÏ ËÏÍÍÅÎÔÁÒÉÑ :)
// × ÔÏÍ, ÞÔÏ ÓÔÒÏËÁ <tt/directory/ ÒÁÚËÏÍÍÅÎÔÉÒÏ×ÁÎÁ, ÐÏÓËÏÌØËÕ
// Õ ÍÅÎÑ ÕÖÅ ÅÓÔØ ÆÁÊÌÙ ÚÏÎ × ÄÉÒÅËÔÏÒÉÉ /var/named.

options {
        directory "/var/named";
        check-names master warn;                /* ÐÏ ÕÍÏÌÞÁÎÉÀ */
        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.hints";
};

bind8/src/bin/named/test ÓÏÄÅÒÖÉÔ ÜÔÏÔ ÆÁÊÌ, Á ÔÁËÖÅ ËÏÐÉÉ ÆÁÊÌÏ× ÚÏÎ, ËÏÔÏÒÙÅ ÍÎÏÇÉÅ ÌÀÄÉ ÍÏÇÕÔ ÐÒÏÓÍÏÔÒÅÔØ É ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÑ ÂÙÓÔÒÏÇÏ ÓÔÁÒÔÁ Ó ÎÕÌÑ.

æÏÒÍÁÔÙ ÆÁÊÌÏ× ÚÏÎ É ÆÁÊÌÏ× root.hints ÏÄÉÎÁËÏ×Ù, ÔÁËÖÅ ËÁË É ËÏÍÁÎÄÙ ÄÌÑ ÉÈ ÏÂÎÏ×ÌÅÎÉÑ.

8. ÷ÏÐÒÏÓÙ É ÏÔ×ÅÔÙ

ðÏÖÁÌÕÊÓÔÁ ÐÒÏÞÉÔÁÊÔÅ ÜÔÏÔ ÒÁÚÄÅÌ ÄÏ ÔÏÇÏ, ËÁË ÓÏÂÅÒÅÔÅÓØ ÐÉÓÁÔØ ÍÎÅ Ï ÞÅÍ ÌÉÂÏ.

  1. íÏÊ named ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÑ ÆÁÊÌÁ named.boot

    ÷Ù ÐÒÏÞÉÔÁÌÉ ÎÅÐÒÁ×ÉÌØÎÙÊ HOWTO. ðÏÖÁÌÕÊÓÔÁ ÐÏÓÍÏÔÒÉÔÅ ÓÔÁÒÕÀ ×ÅÒÓÉÀ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ, ËÏÔÏÒÁÑ ÏÐÉÓÙ×ÁÅÔ bind 4. åÅ ÍÏÖÎÏ ÎÁÊÔÉ ÐÏ ÁÄÒÅÓÕ http://www.math.uio.no/~janl/DNS/

  2. ëÁË ÉÓÐÏÌØÚÏ×ÁÔØ DNS ÉÚÎÕÔÒÉ ÓÅÔÉ, ÚÁÝÉÝÅÎÎÏÊ firewall?

    îÁÂÏÒ ËÌÀÞÅ×ÙÈ ÓÌÏ×: `forwarders', `slave', Á ÔÁËÖÅ ÐÏÓÍÏÔÒÉÔÅ ÓÐÉÓÏË ÌÉÔÅÒÁÔÕÒÙ × ËÏÎÃÅ ÜÔÏÇÏ ÄÏËÕÍÅÎÔÁ.

  3. ëÁË ÍÏÇÕ ÓÄÅÌÁÔØ ËÒÕÇÏ×ÏÒÏÔ DNS ÄÌÑ ÏÐÒÅÄÅÌÅÎÎÏÇÏ ÓÅÒ×ÉÓÁ, ÎÁÐÒÉÍÅÒ www.busy.site, ÓÒÅÄÉ ÄÏÓÔÕÐÎÙÈ ÄÌÑ ÎÅÇÏ ÁÄÒÅÓÏ×, ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÐÏÌÕÞÉÔØ ÜÆÆÅËÔ ÂÁÌÁÎÓÁ ÎÁÇÒÕÚËÉ, ÉÌÉ ÞÅÇÏ-ÔÏ ÐÏÄÏÂÎÏÇÏ.

    óÄÅÌÁÊÔÅ ÎÅÓËÏÌØËÏ ÒÁÚÎÙÈ ÚÁÐÉÓÅÊ A ÄÌÑ www.busy.site É ÉÓÐÏÌØÚÕÊÔÅ bind ×ÅÒÓÉÉ 4.9.3 ÉÌÉ ÓÔÁÒÛÅ. ðÒÉ ÜÔÏÍ bind ÐÒÉ ÏÔ×ÅÔÁÈ ÂÕÄÅÔ ÓÍÅÝÁÔØÓÑ ÐÏ ËÒÕÇÕ ÍÅÖÄÕ ÚÁÄÁÎÎÙÍÉ ÁÄÒÅÓÁÍÉ. üÔÏÔ ÍÅÔÏÄ ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ Ó ÂÏÌÅÅ ÒÁÎÎÉÍÉ ×ÅÒÓÉÑÍÉ bind.

  4. ñ ÈÏÞÕ ÕÓÔÁÎÏ×ÉÔØ DNS × ÚÁËÒÙÔÏÊ ËÏÒÐÏÒÁÔÉ×ÎÏÊ ÓÅÔÉ (intranet). þÔÏ ÍÎÅ ÎÁÄÏ ÓÄÅÌÁÔØ?

    ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÕÂÒÁÔØ ÆÁÊÌ root.hints É ÐÒÏÓÔÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÆÁÊÌÙ ÚÏÎ. üÔÏ ÔÁËÖÅ ÏÚÎÁÞÁÅÔ, ÞÔÏ ×ÁÍ ÎÉËÏÇÄÁ ÎÅ ÎÕÖÎÏ ÂÕÄÅÔ ÏÂÎÏ×ÌÑÔØ ÅÇÏ.

  5. ëÁË Ñ ÍÏÇÕ ÕÓÔÁÎÏ×ÉÔØ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ (×ÅÄÏÍÙÊ) ÓÅÒ×ÅÒ ÉÍÅÎ?

    åÓÌÉ ÏÓÎÏ×ÎÏÊ/×ÅÄÕÝÉÊ ÓÅÒ×ÅÒ ÉÍÅÎ ÉÍÅÅÔ ÁÄÒÅÓ 127.0.0.1, ÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÐÏÍÅÓÔÉÔØ ÐÒÉÍÅÒÎÏ ÔÁËÕÀ ÓÔÒÏËÕ × ÆÁÊÌ named.conf ÄÏÐÏÌÎÉÔÅÌØÎÏÇÏ ÓÅÒ×ÅÒÁ ÉÍÅÎ:


      zone "linux.bogus" {
            type slave;
            file "sz/linux.bogus";
            masters { 127.0.0.1; };
      };
      
    

    ÷Ù ÍÏÖÅÔÅ ÐÅÒÅÞÉÓÌÉÔØ ÎÅÓËÏÌØËÏ ÁÌØÔÅÒÎÁÔÉ×ÎÙÈ ÏÓÎÏ×ÎÙÈ ÓÅÒ×ÅÒÏ× ÄÌÑ ÚÏÎÙ, ËÏÔÏÒÙÅ ÍÏÇÕÔ ËÏÐÉÒÏ×ÁÔØÓÑ, ×ÎÕÔÒÉ ÓÐÉÓËÁ masters, ÒÁÚÄÅÌÅÎÎÏÇÏ ÚÎÁËÏÍ ';' (ÔÏÞËÁ Ó ÚÁÐÑÔÏÊ).
  6. ñ ÈÏÞÕ ÉÍÅÔØ ÒÁÂÏÔÁÀÝÉÊ bind, × ÔÏ ×ÒÅÍÑ, ËÏÇÄÁ Ñ ÎÅ ÐÏÄËÌÀÞÅÎ Ë ÓÅÔÉ.

    åÓÔØ Ä×Á ÐÏÄÈÏÄÁ Ë ÒÅÛÅÎÉÀ ÜÔÏÊ ÐÒÏÂÌÅÍÙ:

  7. çÄÅ ËÅÛÉÒÕÀÝÉÊ ÓÅÒ×ÅÒ ÉÍÅÎ ÈÒÁÎÉÔ Ó×ÏÊ ËÅÛ? åÓÔØ ÌÉ ÓÐÏÓÏ ËÏÎÔÒÏÌÉÒÏ×ÁÔØ ÒÁÚÍÅÒ ËÅÛÁ.

    ëÅÛ ÐÏÌÎÏÓÔØÀ ÈÒÁÎÉÔÓÑ × ÐÁÍÑÔÉ, ÏÎ ÎÉËÏÇÄÁ ÓÏÈÒÁÎÑÅÔÓÑ ÎÁ ÎÁ ÄÉÓË. ëÁÖÄÙÊ ÒÁÚ, ËÏÇÄÁ ×Ù ÐÒÅËÒÁÝÁÅÔÅ ×ÙÐÏÌÎÅÎÉÅ named ÓÏÄÅÒÖÉÍÏÅ ËÅÛÁ ÔÅÒÑÅÔÓÑ. ëÅÛ ÎÅ ËÏÎÔÒÏÌÉÒÕÅÔÓÑ ÎÉ ÏÄÎÉÍ ÉÚ ÓÐÏÓÏÂÏ×. named ÏÂÓÌÕÖÉ×ÁÅÔ ÅÇÏ, ÓÏÇÌÁÓÎÏ ÎÅËÓËÏÌØËÉÍ ÐÒÏÓÔÙÍ ÐÒÁ×ÉÌÁÍ. ÷Ù ÎÅ ÍÏÖÅÔÅ ËÏÎÔÒÏÌÉÒÏ×ÁÔØ ËÅÛ ÉÌÉ ÅÇÏ ÒÁÚÍÅÒ ÐÏ ÌÀÂÙÍ ÐÒÉÞÉÎÁÍ. åÓÌÉ ×Ù ÈÏÔÉÔÅ, ÔÏ ×Ù ÍÏÖÅÔÅ ``ÉÓÐÒÁ×ÉÔØ'' ÜÔÏ, ÐÏÄÐÒÁ×É× named. ïÄÎÁËÏ ÜÔÏ ÎÅ ÒÅËÏÍÅÎÄÕÅÔÓÑ.

  8. óÏÈÒÁÎÑÅÔ ÌÉ named Ó×ÏÊ ËÅÛ ÍÅÖÄÕ ÐÅÒÅÚÁÐÕÓËÁÍÉ? ëÁË Ñ ÍÏÇÕ ÚÁÓÔÁ×ÉÔØ named ÓÏÈÒÁÎÑÔØ ÅÇÏ?

    îÅÔ, named ÎÅ ÓÏÈÒÑÎÑÅÔ ËÅÛ ÐÒÉ ÚÁ×ÅÒÛÅÎÉÉ. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ËÅÛ ÄÏÌÖÅÎ ÂÙÔØ ÐÏÓÔÒÏÅÎ ÚÁÎÏ×Ï ËÁÖÄÙÊ ÒÁÚ ÐÒÉ ÐÅÒÅÚÁÐÕÓËÅ named. îÅÔ ÓÐÏÓÏÂÁ, ËÏÔÏÒÙÊ ÚÁÓÔÁ×ÉÌ ÂÙ named ÓÏÈÒÁÎÑÔØ ËÅÛ × ÆÁÊÌÅ. åÓÌÉ ×Ù ÈÏÔÉÔÅ, ÔÏ ×Ù ÍÏÖÅÔÅ ``ÉÓÐÒÁ×ÉÔØ'' ÜÔÏ, ÐÏÄÐÒÁ×É× named. ïÄÎÁËÏ ÜÔÏ ÎÅ ÒÅËÏÍÅÎÄÕÅÔÓÑ.

9. ëÁË ÓÔÁÔØ ÂÏÌÅÅ ÚÎÁÀÝÉÍ ÁÄÍÉÎÉÓÔÒÁÔÏÒÏÍ DNS.

äÏËÕÍÅÎÔÁÃÉÉ É ÕÔÉÌÉÔÙ.

óÕÝÅÓÔ×ÕÅÔ ÎÁÓÔÏÑÝÁÑ ÄÏËÕÍÅÎÔÁÃÉÑ. äÏÓÔÕÐÎÁÑ × ÜÌÅËÔÒÏÎÎÏÊ É × ÐÅÞÁÔÎÏÊ ÆÏÒÍÁÈ. þÔÅÎÉÅ ÎÅËÏÔÏÒÙÈ ÉÚ ÜÔÉÈ ÒÕËÏ×ÏÄÓÔ× ÔÒÅÂÕÅÔÓÑ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÓÄÅÌÁÔØ ÛÁÇ ÏÔ ÐÒÏÓÔÏÇÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒÁ DNS Ë ËÒÕÐÎÏÍÕ ÁÄÍÉÎÉÓÔÒÁÔÏÒÕ. ÷ ÐÅÞÁÔÎÏÍ ×ÉÄÅ ÓÔÁÎÄÁÒÔÎÏÊ ËÎÉÇÏÊ Ñ×ÌÑÅÔÓÑ DNS and BIND Á×ÔÏÒÏ× C. Liu É P. Albitz, ×ÙÐÕÝÅÎÎÁÑ O'Reilly & Associates, Sebastopol, CA, ISBN 0-937175-82-X. ñ ÞÉÔÁÌ ÅÅ, ÏÎÁ ×ÅÌÉËÏÌÅÐÎÁ. ôÁËÖÅ ÓÕÝÅÓÔ×ÕÅÔ ÒÁÚÄÅÌ Ï DNS × ËÎÉÇÅ TCP/IP Network Administration, ÎÁÐÉÓÁÎÎÏÊ Craig Hunt É ÉÚÄÁÎÎÏÊ O'Reilly..., ISBN 0-937175-82-X. ôÁËÖÅ ÄÌÑ ÁÄÍÉÎÉÓÔÒÉÒÏ×ÁÎÉÑ DNS (ÉÌÉ ×ÓÅÇÏ, ÏÔÎÏÓÑÝÅÇÏÓÑ Ë ÜÔÏÍÕ) ÄÏÌÖÎÁ ÂÙÔØ ÈÏÒÏÛÅÊ ËÎÉÇÁ Zen and the Art of Motorcycle Maintenance Á×ÔÏÒÁ Robert M. Prisig :-) ÄÏÓÔÕÐÎÁ ËÁË ISBN 0688052304, Á ÔÁËÖÅ ÄÒÕÇÉÅ ËÎÉÇÉ.

÷ ÜÌÅËÔÒÏÎÎÏÊ ÆÏÒÍÅ ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ ÍÁÔÅÒÉÁÌÙ ÎÁ http://www.dns.net/dnsrd/, http://www.isc.org/bind.html; FAQ, ÓÐÒÁ×ÏÞÎÙÅ ÍÁÔÅÒÉÁÌÙ (BOG; Bind Operations Guide), Á ÔÁËÖÅ ÓÔÁÔØÉ É ÏÐÒÅÄÅÌÅÎÉÑ ÐÒÏÔÏËÏÌÏ× É ÄÏÐÏÌÎÅÎÉÑ (hacks) Ë DNS (ÜÔÉ, É ÂÏÌØÛÉÎÓÔ×Ï, ÅÓÌÉ ÎÅ ×ÓÅ, rfc, ÕÐÏÍÑÎÕÔÙÅ ÎÉÖÅ, ÏÎÉ ÔÁËÖÅ ÉÄÕÔ × ÐÏÓÔÁ×ËÅ bind). íÎÅ ÎÅ ÎÕÖÎÙ ÂÏÌØÛÉÎÓÔ×Ï ÉÚ ÎÉÈ, ÎÏ Ñ ÎÅ Ñ×ÌÑÀÓØ ËÒÕÐÎÙÍ DNS ÁÄÍÉÎÉÓÔÒÁÔÏÒÏÍ. Arnt Gulbrandsen ÞÉÔÁÌ BOG É ÎÁÈÏÄÉÔÓÑ × ÜËÓÔÁÚÅ ÏÔ ÅÇÏ :-). ÷ ÇÒÕÐÐÅ ÎÏ×ÏÓÔÅÊ comp.protocols.tcp-ip.domains ÐÒÏÉÓÈÏÄÑÔ ÄÉÓËÕÓÓÉÉ Ï DNS. ÷ ÄÏÂÁ×ÌÅÎÉÅ Ë ÜÔÏÍÕ, ÚÄÅÓØ ÐÅÒÅÞÉÓÌÅÎÙ ÎÅËÏÔÏÒÙÅ RFC Ï DNS, ÓÁÍÙÍÉ ×ÁÖÎÙÍÉ ÉÚ ËÏÔÏÒÙÈ ×ÅÒÏÑÔÎÏ Ñ×ÌÑÀÔÓÑ ÓÌÅÄÕÀÝÉÅ:

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 1912 Errors

B. Barr Errors in RFC 1912, this is available at http://www.cis.ohio-state.edu/~barr/rfc1912-errors.html

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.