You are on page 1of 3

Examples

The following examples show the some of the various ways to use configure a simple named.conf file. In these examples, two networks are represented: abc and xyz. Network abc consists of:

gobi.abc, the master name server for the abc network, 192.9.201.2 mojave.abc, a host machine, 192.9.201.6 sandy.abc, a slave name server for the abc network and the gateway between abc and xyz, 192.9.201.3

Network xyz consists of:


kalahari.xyz, master name server for the xyz network, 160.9.201.4 lopnor.xyz, a host machine, 160.9.201.5 sahara.xyz, a host machine and hint name server for the xyz network, 160.9.201.13 sandy.xyz, a slave name server for the xyz network and gateway between abc and xyz, 160.9.201.3 Note: Note that sandy, a gateway host, is on both networks and also serves as a slave name server for both domains.

1. The /etc/named.conf file for gobi.abc, the master name server for network abc, contains these entries: # # conf file for abc master server - gobi.abc # server 192.9.201.3 { transfer-format many-answers; }; zone "abc" in { type master; file "/etc/named.abcdata"; allow-update { localhost; }; }; zone "201.9.192.in-addr.arpa" in { type master; file "/etc/named.abcrev"; allow-update { localhost; }; }; zone "0.0.127.in-addr.arpa" in {

type master; file "/etc/named.abclocal"; }; 2. The /etc/named.conf file for kalahari.xyz, the master name server for network xyz, contains these entries: # # conf file for abc master server - kalahari.xyz # acl xyz-slaves { 160.9.201.3; }; options { directory "/etc"; allow-transfer { xyz-slaves; localhost; }; }; zone "xyz" in { type master; file "named.xyzdata"; }; zone "9.160.in-addr.arpa" in { type master; file "named.xyxrev"; }; zone "0.0.127.in-addr.arpa" in { type master; file "named.xyzlocal"; }; 3. The /etc/named.conf file for sandy, the slave name server for networks abc and xyz, contains the following entries: # # conf file for slave server for abc and xyz - sandy # options { directory "/etc"; }; zone "abc" in { type slave; masters { 192.9.201.2; }; file "named.abcdata.bak"; }; zone "xyz" in { type slave;

masters { 160.9.201.4; }; file "named.xyzdata.bak"; }; zone "201.9.192.in-addr.arpa" in { type slave; masters { 192.9.201.2; }; }; zone "9.160.in-addr.arpa" in { type slave; masters { 192.9.201.4; }; }; zone "0.0.127.in-addr.arpa" in { type master; file "named.local"; }; 4. The /etc/named.conf file for sahara, a hint name server for the network xyz, contains the following entries: # # conf file for hint server for xyz - sahara # zone "." in { type hint; file "/etc/named.ca"; }; zone "0.0.127.in-addr.arpa" in { type master; file "/etc/named.local"; };

You might also like