#####dns的多台管理####
1.dns的配置
以下文件配置参照之前dns的方法(之前博客介绍过):
[[email protected] named]# vim westos.com.zone
[[email protected] named]# vim /etc/named.conf
[[email protected] named]# vim /etc/named.rfc1912.zones
[[email protected] named]# vim /etc/resolv.conf
[[email protected] named]# systemctl restart named
[[email protected] named]# dig www.westos.com
2.多台管理
主dns:
zone "westos.com" IN {
type master;
file "westos.com.zone";
allow-update { none; };
also-notify { 172.25.254.239; };
};
配置的其他台dns:
zone "westos.com" IN {
type slave;
masters { 172.25.254.139; };
file "slaves/westos.com.zone";
allow-update { none; };
};
每次更改dns配置时,只在主dns更改。
重启服务之后测试
$TTL 1D
@ IN SOA dns.westos.com. root.westos.com. (
此处每次更改dns要发生变化,否则不能同步## 2 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dns.westos.com.
dns A 172.25.254.139
www A 172.25.254.139