DNS服务器实战后一点理解
A)子配置文件/etc/named.rfc1912.zones
zone “zhudns.com” IN {
type master;
file “zone.zone”;
allow-update { none; };
};
【理解】:
1) file “zone.zone”;不需要与zone “zhudns.com” IN中zhudns.com保持一致
2) named访问启动后先找/etc/name.conf配置文件,然找到了子配置文件中
/etc/named.rfc1912.zones,中<zone “zhudns.com” IN>然后后记录,下面
file “zone.zone”; ,随后会从这个file文件中,找“域名配置”文件
B)域名配置文件的理解:
$TTL 1D
@ IN SOA zhudns.com. admin.zhudns.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 100.101.2.111
get IN A 111.111.111.111
www IN A 100.101.2.110
mail IN A 100.101.2.1
ftp IN CNAME www
* IN A 114.114.114.115
【理解】:
1)$TTL 1D
@ IN SOA zhudns.com. admin.zhudns.com. 中,实验发现随意写都行
2) NS @
A 100.101.2.111
发现默认访问,主配置文件中zone “zhudns.com” IN {
type master;,中zhudns.com
就会返回这个ip
2) mail IN A 100.101.2.1意思当访问main.zhudns.com就会返回这个ip值,要记住main只能放在
zhudns.com前面
3)ftp IN CNAME www意思当访问ftp.zhudns.com会跳转为www.zhudns.com,记得无论ftp还是www
只能在zhudns.com前面,也就是说,主配置文件中 zone “zhudns.com” IN {
type master;
永远是放在后面的