dns ns 记录配置

关于DNS的思考:

1. SOA 后面的记录及通讯地址 比如dns.gwbn.xxxscdn.com. sa.gwbn.xxxscdn.com 并没有什么卵用, 测试随便写什么好像都不影响'

2. NS记录 父DNS与子DNS需保持一致, 比如 xxxscdn.com. 下的NS gwbn.xxxscdn.com.
* 如果NS记录对应的A记录是  ns1.gwbn.xxxscdn.com.  子dns NS记录需要完全一致 如上面的配置
* 如果NS记录对应的A记录是  xxx.xxx.com.  子dns NS记录不需要完全一致
为了不出错, 建议都配制成一致的.



实例1 (子dns NS记录需要完全一致)

一级dns:

[root@DY-DNS-Beijing-166 zone]# cat xxxscdn.com.default
@ IN SOA dns.xxxscdn.com. sa.xxxscdn.com (
2018080901; serial
300 ; refresh
300 ; retry
30d ; expire
60 ) ; default_ttl

86400 IN NS ns1.xxxscdn.com.
86400 IN NS ns2.xxxscdn.com.
ns1 IN A xx.xx.xx.xx
ns2 IN A xx.xx.xx.xx

www IN A 1.1.1.1


gwbn 86400 IN NS ns1.gwbn.xxxscdn.com.
ns1.gwbn IN A 211.161.151.231

 


二级dns

[root@xxx]# cat gwbn.xxxscdn.com.default
@ IN SOA dns.gwbn.xxxscdn.com. sa.gwbn.xxxscdn.com (
2018080901; serial
300 ; refresh
300 ; retry
30d ; expire
60 ) ; default_ttl

86400 IN NS ns1.gwbn.xxxscdn.com.
ns1 IN A xx.xx.xx.xx

www IN A 1.1.1.2

 

实例2 (子dns NS记录不需要完全一致)


一级dns 配置

$TTL 600
xxxscdn.com. IN SOA ns1.xxxscdn.com. admin.xxxscdn.com. (
20180820
1H
5M
3D
1D
)
xxxscdn.com. IN NS ns1.xxxscdn.com.
xxxscdn.com. IN NS ns2.xxxscdn.com.
ns1 IN A xx.xx.xx.xx
ns2 IN A xx.xx.xx.xx
platform IN NS edgens.xxxscdn.com.
edgens IN A  xx.xx.xx.xx

play1 CNAME play.platform.xxxscdn.com.
play2 CNAME play.platform.xxxscdn.com.
play3 CNAME play.platform.xxxscdn.com.
play4 CNAME play.platform.xxxscdn.com.


down1 CNAME down.platform.xxxscdn.com.
down2 CNAME down.platform.xxxscdn.com.

 

二级dns配置:

$TTL 600
platform.xxxscdn.com. IN SOA edgens.xxxscdn.com. admin.xxxscdn.com. (
20180820
1H
5M
3D
1D
)
platform.xxxscdn.com. IN NS edgens.xxxscdn.com. ; 改成 www.xxxscdn.com 好像也可以
play IN A 192.168.1.10
down IN A 192.168.1.11

 

posted @ 2018-08-21 19:33  余为国  阅读(4238)  评论(0编辑  收藏  举报