slave服务器的设置:
1、先在master服务器上配置named.conf配置文件
options {
directory "/var/named";
# recursion yes|no; //是否为客户端开启递归查询,默认是开启的
allow-recursion {172.16.7.0/8; }; //开启递归查询,并规定客户端范围
# allow-transfer {any;}; //全局定义,开启区域传输,并规定传输的客户端,默认是开启给所有主机传输
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-transfer {none; }; //不给任何客户端传输其区域
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-transfer {none; }; //不给任何客户端传输其区域
};
zone "chris.com" IN {
type master;
file "chris.com.zone";
allow-transfer {172.16.7.2; }; //只给客户端172.16.7.2传输此区域
};
zone "7.16.172.in-addr.arpa" IN {
type master;
file "172.16.7.zone";
allow-transfer {172.16.7.2; }; //只给客户端172.16.7.2传输此区域
};
2、配置数据文件chris.com.zone
$TTL 600
chris.com. IN SOA ns1.chirs.com. admin.chris.com (
2013040403
1H
5M
2D
6H)
IN NS ns1.chris.com.
IN NS ns2.chris.com. //配置slave服务器的NS记录和相应的A记录,如果不配置将无法实现增量传输,就是数据号增加的时候客户端无法更新
IN MX 10 mail
IN A 172.16.7.2
ns1 IN A 172.16.7.1
ns2 IN A 172.16.7.2
www IN A 172.16.7.6
ftp IN A 172.16.7.7
mail IN A 172.16.7.8
chris IN A 172.16.7.9
chrislee IN CNAME chris
3、配置172.16.7.zone反向解数据文件
$TTL 600
@ IN SOA ns1.chirs.com. admin.chris.com (
2013040401
1H
5M
2D
6H)
IN NS ns1.chris.com.
IN NS ns2.chris.com. ////配置slave服务器的NS记录和相应的PTR记录,如果不配置将无法实现增量传输,就是数据号增加的时候客户端无法更新
1 IN PTR ns1.chris.com.
2 IN PTR ns2.chris.com
6 IN PTR www.chris.com.
7 IN PTR ftp.chris.com.
8 IN PTR mail.chris.com.
9 IN PTR chris.chris.com.
9 IN PTR chirs.chris.com.
