失败经验:rhel 6.x bind 9.8,两台做子域授权,最后失败。原因不详。
改用rhel 5.5, bind 9.3,同样的配置,就成功了。具体记录一下9.3的配置。
安装:采用安装RHEL时,同是选择安装bind。查询包如下:
bind-libs-9.3.6-4
bind-chroot-9.3.6-4
bind-utils-9.3.6-4
bind-9.3.6-4
bind9.3由于安装了chroot,因此默认目录都改到/var/named/cdhroot下了
bind 9.3安装完成后,并没有给出默认的named.conf及zone文件,需要手工创建。
测试场景:
root1:(企业DNS根),对二级域名second_domain进行授权
named.conf(全部手工写成)
options {
directory "/var/named";
};
zone "aqsiq" {
type master;
file "aqsiq.db";
};
aqsiq.db:
=================
$TTL 86400
@ IN SOA ns1.aqsiq. root.aqsiq. (
42;
3h;
15m;
1w
1d);
@ IN NS ns1
ns1 IN A 192.168.159.129
ns2 IN A 192.168.159.128
www IN CNAME www.shuanghuo.aqsiq.
shuanghuo IN NS ns1.shuanghuo.aqsiq.
IN NS ns2.shuanghuo.aqsiq.
ns1.shuanghuo IN A 192.168.159.130
ns2.shuanghuo IN A 192.168.159.131
另一台DNS服务器做shuanghuo.aqsiq的二级授权域
named.conf
==================
略
shuanghuo.aqsiq.db
======================
$TTL 86400
@ IN SOA s1.shuanghuo.aqsiq. root.shuanghuo.aqsiq. (
42;
3h;
15m;
1w
1d);
@ IN NS s1.shuanghuo.aqsiq.
IN NS s2.shuanghuo.aqsiq.
s1 IN A 192.168.159.130
s2 IN A 192.168.159.131
www IN A 2.2.2.2
ftp IN A 2.2.2.3
test IN A 5.5.5.5