[root@dd named]# cp -p named.loopback example.com.ptr
$TTL 1D
@ IN SOA dd.example.com. root.example.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dd.example.com.
202 PTR dd.example.com.
1 PTR ThinkPad.example.com.
[root@dd named]# dig -x 192.168.0.202
4、主从DNS
(1)辅助DNS配置IP=192.168.0.210
另外一台主机安装DNS yum install bind bind-chroot
修改配置文件name.conf (同上)
编辑域文件:
vim named.rfc1912.zones
zone "example.com" IN {
type slave;
masters { 192.168.0.202; }; (指定主DNS的IP)
file "slaves/example.com.zone"; (同步的A纪录文件)
allow-update { none; };
};
重启DNS后
/var/named/chroot/var/named/slaves目录下会生成example.com.zone(同步而来)
(2)主DNS配置(master)IP=192.168.0.202
vim named.rfc1912.zones
zone "example.com" IN {
type master;
file "example.com.zone";
allow-transfer { 192.168.0.210; }; (允许210上的DNS同步,【any,192.168.0.0./24】)
allow-update { none; };
};
重启DNS
(3)测试
任一台机子指定为辅助DNS做解析
vim /etc/resolv.conf
nameserver 192.168.0.210(辅助DNS)
dig dd.example.com