关于DNS的思考:
1. SOA 后面的记录及通讯地址 比如dns.gwbn.douyuscdn.com. sa.gwbn.douyuscdn.com 并没有什么卵用, 测试随便写什么好像都不影响'
2. NS记录 父DNS与子DNS需保持一致, 比如 douyuscdn.com. 下的NS gwbn.douyuscdn.com.
* 如果NS记录对应的A记录是 ns1.gwbn.douyuscdn.com. 子dns NS记录需要完全一致 如上面的配置
* 如果NS记录对应的A记录是 xxx.douyu.com. 子dns NS记录不需要完全一致
为了不出错, 建议都配制成一致的.
实例1 (子dns NS记录需要完全一致)
一级dns:
[root@DY-DNS-Beijing-166 zone]# cat douyuscdn.com.default
@ IN SOA dns.douyuscdn.com. sa.douyuscdn.com (
2018080901; serial
300 ; refresh
300 ; retry
30d ; expire
60 ) ; default_ttl
86400 IN NS ns1.douyuscdn.com.
86400 IN NS ns2.douyuscdn.com.
ns1 IN A 211.159.175.166
ns2 IN A 211.159.175.166
www IN A 1.1.1.1
gwbn 86400 IN NS ns1.gwbn.douyuscdn.com.
ns1.gwbn IN A 211.161.151.231
二级dns
[root@DY-LVS-Wuhan-GWBN-151.231.dycdn.cn zone]# cat gwbn.douyuscdn.com.default
@ IN SOA dns.gwbn.douyuscdn.com. sa.gwbn.douyuscdn.com (
2018080901; serial
300 ; refresh
300 ; retry
30d ; expire
60 ) ; default_ttl
86400 IN NS ns1.gwbn.douyuscdn.com.
ns1 IN A 211.161.151.231
www IN A 1.1.1.2
实例2 (子dns NS记录不需要完全一致)
一级dns 配置
$TTL 600
douyuscdn.com. IN SOA ns1.douyuscdn.com. admin.douyuscdn.com. (
20180820
1H
5M
3D
1D
)
douyuscdn.com. IN NS ns1.douyuscdn.com.
douyuscdn.com. IN NS ns2.douyuscdn.com.
ns1 IN A 211.159.175.166
ns2 IN A 211.159.175.166
platform IN NS edgens.douyuscdn.com.
edgens IN A 211.138.60.197
play1 CNAME play.platform.douyuscdn.com.
play2 CNAME play.platform.douyuscdn.com.
play3 CNAME play.platform.douyuscdn.com.
play4 CNAME play.platform.douyuscdn.com.
down1 CNAME down.platform.douyuscdn.com.
down2 CNAME down.platform.douyuscdn.com.
二级dns配置:
$TTL 600
platform.douyuscdn.com. IN SOA edgens.douyuscdn.com. admin.douyuscdn.com. (
20180820
1H
5M
3D
1D
)
platform.douyuscdn.com. IN NS edgens.douyuscdn.com. ; 改成 www.douyuscdn.com 好像也可以
play IN A 192.168.1.10
down IN A 192.168.1.11