测试过程
192.168.16.101 常态根服务器
192.168.16.104 紧急根服务器
192.168.6.102 根区副本 可在 常态192.168.16.101或紧急192.168.16.104之间切换
测试时根切换在192.168.16.101
192.168.16.105 递归服务器 根指向根区副本 192.168.6.102
192.168.16.103 com顶级域ns 配一个 hww.com 域 ns 192.168.16.109
192.168.16.109 hww.com 域权威服务器
从192.168.6.54对着递归服务器105请求www.hww.com
抓包文件可以看出正常递归
54->105->101->103->109->105->54
详细配置如下
192.168.16.101 常态根服务器
/etc/named.conf /var/named/named.copy.ca192.168.16.104 紧急根服务器
/etc/named.conf /var/named/named.copy.ca192.168.6.102 根区副本
192.168.6.102作为根的从服务器 可指向 常态192.168.16.101或紧急192.168.16.104
测试时根指向192.168.16.101
192.168.6.102根副本内容192.168.16.105 递归服务器
根指向根区副本 192.168.6.102
/etc/named.conf /var/named/named.copy.ca192.168.16.103 com顶级域
ns 配一个 hww.com 域 ns 192.168.16.109
/etc/named.rfc1912.zones /var/named/com.zone192.168.16.109 hww.com 域权威服务器
/etc/named.rfc1912.zones /var/named/hww.com.zone递归测试
从192.168.6.54对着递归服务器105请求www.hww.com
抓包文件可以看出正常递归
54->105->101->103->109->105->54
附:named.conf 举例
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
allow-notify { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
zone-statistics true;
statistics-file "/var/named/data/named_stats.txt";
memstatistics true;
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
allow-query-on { any; };
allow-recursion { any; };
allow-recursion-on { any; };
recursion yes;
recursing-file "recursing.stat";
allow-transfer { none; };
transfer-format many-answers;
allow-update { none; };
blackhole {
none;
};
auth-nxdomain yes;
ixfr-from-differences false;
provide-ixfr false;
request-ixfr false;
masterfile-format text;
clients-per-query 10000;
max-clients-per-query 10000;
min-refresh-time 60;
recursive-clients 10000;
resolver-query-timeout 10;
max-cache-size 4000M;
lame-ttl 600;
max-ncache-ttl 1800;
max-cache-ttl 604800;
dnssec-enable no;
dnssec-validation no;
dnssec-accept-expired false;
};
logging {
channel default_debug {
file "data/named.run" versions 10 size 300M;
print-time yes;
print-severity yes;
severity dynamic;
};
channel sys_log{
file "data/sys.log" versions 10 size 100M;
severity warning;
print-time yes;
print-severity yes;
};
channel user_log{
file "data/user.log" versions 10 size 100M;
print-time yes;
print-severity yes;
severity error;
};
category default {
sys_log;
};
};
zone "." IN {
type master;
file "named.copy.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
网友评论