标签:
子域授权
?
父DNS服务器
yum install -y bind bind-chroot
cp /usr/share/doc/bind-9.8.2/sample/etc/named.conf /var/named/chroot/etc/
cp /usr/share/doc/bind-9.8.2/sample/etc/named.conf /var/named/chroot/etc/
cp /usr/share/doc/bind-9.8.2/sample/var/named/named.localhost /var/named/chroot/var/named/domain.com.zone
?
配置文件加区域
zone domain.com IN {
type master;
file "domain.com.zone";
};
?
解析文件
$TTL 1D
@????IN????SOA????@????name.a. (
????????????????????0????; serial
????????????????????1D????; refresh
????????????????????1H????; retry
????????????????????1W????; expire
????????????????????3H )????; minimum
@????IN????NS????s.domain.com.????????
s????IN????A????192.168.100.100
www????IN????A????192.168.100.100
?
sh.domain.com.????NS????s1.domain.com.
s1????IN????A????192.168.100.101
?
子DNS服务器
配置文件 区域
zone "sh.domain.com" IN {
type master;
file " sh.domain.com .zone";
};
?
解析文件
[root@s1 chroot]# vim var/named/1
$TTL 1D
@ IN SOA @ sub.domain.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS sub.domain.com.
sub IN A 192.168.100.101
www IN A 192.168.100.1
?
解析结果
可以使用DIT命令
#dig -t www.domain.com @192.168.100.100
?
[root@s chroot]# nslookup www.sh.domain.com 192.168.100.100
Server:????????192.168.100.100
Address:????192.168.100.100#53
?
Non-authoritative answer:????????????为非权威的
Name:????www.sh.domain.com
Address: 192.168.100.1
?
配置转发
zone "domain.com" {
type forward;
forwarders { 192.168.100.100; };
?
[root@s1 chroot]# nslookup www.domain.com 192.168.100.101
Server:????????192.168.100.101
Address:????192.168.100.101#53
?
Non-authoritative answer:
Name:????www.domain.com
Address: 192.168.100.100
};
标签:
原文地址:http://www.cnblogs.com/fina/p/5795924.html