vi benet.fx
$TTL 86400
@ IN SOA linuxidc.com. root.linuxidc.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns1.linuxidc.com.
102 IN PTR ns1.linuxidc.com.
102 IN PTR
102 IN PTR server01.linuxidc.com.
105 IN PTR mail.linuxidc.com.
103 IN PTR ns2.linuxidc.com.
(4) 重新启动named服务
service named restart
(5) 配置客户端测试
nslookup
################################分割线 构建从域名服务器###########################
(1) 假设从域名服务器的IP地址为192.168.1.103
主机名为:ns2.linuxidc.com
(2) 在从域名服务器上创建主配置文件
vi /var/named/chroot/etc/named.conf
options
{
listen-on port 53 { 192.168.1.103; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { 192.168.1.0/24; };
recursion yes;
};
zone "linuxidc.com" IN {
type slave;
masters { 192.168.1.102; };
file "benet.zx";
};
zone "1.168.192.in-addr.arpa" IN {
type slave;
masters { 192.168.1.102; };
file "benet.fx";
};
(3) 在主域名服务器上修改主配置文件为:
vi /var/named/chroot/etc/named.conf
options
{
listen-on port 53 { 192.168.1.102; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { 192.168.1.0/24; };
recursion yes;
};
zone "linuxidc.com" IN {
type master;
file "benet.zx";
allow-transfer { 192.168.1.103; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "benet.fx";
allow-transfer { 192.168.1.103; };
};
(4) 在从域名服务器上启动named服务或重启
server named start
(5) 可以查看日志
tail /var/log/messages
(6) 重新配置客户端测试从域名服务器