dns的主从服务器的简单配置

主服务器配置:
1.在/etc/named.rfc1912.zones里写入如下内容:
zone "neo.com" IN {
type master;
file "neo.zone";
allow-transfer { 10.3.156.134; }; --> slave从服务器的地址
};
zone "156.3.10.in-addr.arpa" IN {
type master;
file "10.3.156.zone";
allow-transfer { 10.3.156.134; };

};

2.在/var/named下新建neo.zone文件:并写入如下内容:
$TTL 86400
@ IN SOA dns.neo.com. root.neo.com. (
20130110801 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS dns.neo.com.
IN NS ns2.neo.com.
dns.neo.com. IN A 10.3.156.130
www.neo.com. IN A 10.3.156.130
mail.neo.com. IN A 10.3.156.130
ns2 IN A 10.3.156.134


新建10.3.156.zone文件,写入如下内容:

$TTL 86400
@ IN SOA dns.neo.com. root.neo.com. (
2013110801
2H
10M
7D
6H )
@ IN NS dns.neo.com.
IN NS ns2.neo.com.
130 IN PTR dns.neo.com.
130 IN PTR www.neo.com.
130 IN PTR mail.neo.com.
134 IN PTR ns2.neo.com.
3.从服务器配置:在/etc/rfc1912,zones里写入如下内容:
zone "neo.com" IN {
type slave;
file "slaves/neo.zone";
masters { 10.3.156.130; };
};
zone "156.3.10.in-addr.arpa" IN {
type slave;
file "slaves/10.3.156.zone";
masters { 10.3.156.130; };
};


本文出自 “伤城” 博客,谢绝转载!

你可能感兴趣的:(dns,简单配置,主从服务器)