[root@localhost ~]# nslookup//以下测试可知正反解都可以成功
> 192.168.1.195
Server:192.168.1.193
Address:192.168.1.193#53
195.1.168.192.in-addr.arpaname = www1.ethnicity.com.
> www2.ethnicity.com
Server:192.168.1.193
Address:192.168.1.193#53
Name:www2.ethnicity.com
Address: 192.168.1.196
> exit
最后把配置文件同步到辅服务器上
[root@localhost ~]# scp /var/named/chroot/etc/named.conf 192.168.1.195:/var/named/chroot/etc/
[root@localhost~]#scp /var/named/chroot/etc/named.rfc1912.zones 192.168.1.195:/var/named/chroot/etc/
第二:在辅服务器上的设置
[root@localhost ~]# chgrp named /var/named/chroot/etc/named.conf
[root@localhost etc]# ln -s /var/named/chroot/etc/named.conf /etc/named.conf
[root@localhost ~]# vi /etc/named.conf
listen-on port 53 { any; };
forwarders{202.102.240.65;};
allow-query{ any; };
allow-query-cache { any; };
match-clients{ any; };
match-destinations { any; };
[root@localhost ~]# vi /etc/named.rfc1912.zones//添加以下的域
zone "ethnicity.com" IN {
type slave;
file "slaves/named.ethnicity.com";
masters { 192.168.1.193; };
};
zone "1.168.192.in-addr.arpa" IN {
type slave;
file "slaves/named.192.168.1";
masters { 192.168.1.193; };
};
[root@localhost ~]# /etc/init.d/named restart//重启服务器就可以看到辅服务器的配置文件
[root@localhost ~]# ll /var/named/chroot/var/named/slaves/
total 16
-rw-rw-r-- 1 named named 398 Oct 25 07:06 named.192.168.1
-rw-r--r-- 1 named named 466 Oct 25 07:42 named.ethnicity.com
第三:测试的部分
这个步骤主要是观察在主服务器修改配置文件是 , 通过#rndc reload时 , 辅服务器数据的同步状况 。
[root@localhost named]# vi named.ethnicity.com//在主服务器域文件内添加两个CNAME 。并且修改46; serial (d. adams)
$TTL86400
@IN SOAdns.ethnicity.com.root.ethnicity.com. (
46; serial (d. adams)
3H; refresh
15M; retry
1W; expiry
1D ); minimum
IN NSdns.ethnicity.com.
@IN MX 10mail.ethnicity.com.
www1IN A192.168.1.195
www2IN A192.168.1.196
www3IN A192.168.1.193
linuxIN CNAMEwww2
wanyanIN CNAMEwww3
ethnicityIN CNAMEwww1
[root@localhost named]# rndc reload
server reload successful
接着在辅服务器上查看变化 , 发现和主服务器是数据同步的 。
[root@localhost ~]# cat /var/named/chroot/var/named/slaves/named.ethnicity.com
$ORIGIN .
$TTL 86400; 1 day
ethnicity.comIN SOAdns.ethnicity.com. root.ethnicity.com. (
46; serial
10800; refresh (3 hours)
900; retry (15 minutes)
604800; expire (1 week)
86400; minimum (1 day)
)
NSdns.ethnicity.com.
MX10 mail.ethnicity.com.
$ORIGIN ethnicity.com.
ethnicityCNAMEwww1
linuxCNAMEwww2
wanyanCNAMEwww3
www1A192.168.1.195
www2A192.168.1.196
www3A192.168.1.193
文章插图
推荐阅读
- 煮毛豆时,别直接下锅煮,多加这1个小技巧,毛豆入味翠绿不发黄
- 百度搜索正式下线熊掌ID业务
- Linux设备驱动概述
- Linux 性能优化之平均负载
- 菊花茶下火吗,孕妇可以喝菊花茶吗
- 中国19-69岁男女标准体重对照表,胖还是瘦对照一下,别瞎减肥了
- 高温高速应该如何预防爆胎
- 又又又要下雨了,梅雨天气,家电如何防潮?
- 金银花必须在阳光下晒干,金银花茶的功效作用
- 林下参适合什么人吃,4种适合脂肪肝喝的花茶