免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4649 | 回复: 6
打印 上一主题 下一主题

[DNS] 关于多级域名NS授权的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-10 11:13 |只看该作者 |倒序浏览
因业务上有需要,需将域名按地区分级显示,并在各地区可拥有自己的DNS服务器,管理属于自己级别下的A记录等

如域名为:test.com,上海地区显示为sh.test.com,广东地区为gd.test.com,上海和广东地区都有自己的NS服务器,能为sh.test.com和gd.test.com前面添加如www,smtp等域名,如
www.sh.test.com   这里的www就是上海的NS服务器添加的
www.gd.test.com   这里的www就是广东的NS服务器添加的

我查了一下chinamobile.com域名就是这么进行管理的,请问使用LINUN下的BIND如何进行设置?

C:\nslookup
Default Server:  ns1.pacific.net.hk
Address:  202.14.67.4

> set type=all
> gd.chinamobile.com
Server:  ns1.pacific.net.hk
Address:  202.14.67.4

Non-authoritative answer:
gd.chinamobile.com      nameserver = ns2.gd.chinamobile.com
gd.chinamobile.com      nameserver = ns1.gd.chinamobile.com
gd.chinamobile.com      nameserver = ns.gd.chinamobile.com

gd.chinamobile.com      nameserver = ns1.gd.chinamobile.com
gd.chinamobile.com      nameserver = ns2.gd.chinamobile.com
gd.chinamobile.com      nameserver = ns.gd.chinamobile.com
ns.gd.chinamobile.com   internet address = 211.139.136.68
ns2.gd.chinamobile.com  internet address = 211.139.163.6
>

论坛徽章:
0
2 [报告]
发表于 2009-11-10 16:09 |只看该作者
见4楼

[ 本帖最后由 llzqq 于 2009-11-10 19:31 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2009-11-10 17:56 |只看该作者
我现在关心不是哪来的来源去哪去查询,而是需要做到,每个省份能自己管理自己省份下的记录

我们会将主要省份建立NS服务器,省份缩写前的记录值(不管是A还是CNAME)都自行管理,而不用通过总部来管理

论坛徽章:
0
4 [报告]
发表于 2009-11-10 19:16 |只看该作者
又仔细看了一遍,终于明白LZ要表达的意思了(我理解错了)。

把TEST.COM的三级域名分配给每个省份如河北:hb.test.com,上海:sh.test.com,广东:gd.test.com等。实现每个省管理自己的域名完全可以,实现起来也比较简单:

1.在test.com的权威DNS上授权hb.test.com, sh.test.com, gd.test.com的权威DNS分别为nsx.hb.test.com, nsx.sh.test.com, nsx.gd.test.com。

2.在河北,上海,广东分别建立nsx.hb.test.com, nsx.sh.test.com, nsx.gd.test.com。

3.每个省份就可以管理自己的域名了,可以自由添加自己的4级域名了。




顺便给出各级DNS上ZONE文件内容,仅供参考:
在TEST.COM的权威DNS上的ZONE文件:
$TTL 6h
$ORIGIN test.com.
@               3600    IN      SOA     ns1.test.com. root.test.com.(
                 929142851  ; Serial
                 1800          ; Refresh
                 600            ; Retry
                 2w            ; Expire
                 300            ; Minimum
                 )  
@               2d      IN      NS      ns1.test.com.
@               2d      IN      NS      ns2.test.com.
ns1             2d      IN      A      6.6.6.4
ns2             2d      IN      A      6.6.6.7

hb              2d      IN      NS      ns1.hb.test.com.
hb              2d      IN      NS      ns2.hb.test.com.
ns1.hb        2d      IN      A       12.1.1.1
ns2.hb        2d      IN      A       12.2.2.2

sh              2d      IN      NS      ns1.sh.test.com.
sh              2d      IN      NS      ns2.sh.test.com.
ns1.sh        2d      IN      A       15.1.1.1
ns2.sh        2d      IN      A       15.2.2.2

gd              2d    IN      NS      ns1.gd.test.com.
gd              2d    IN      NS      ns2.gd.test.com.
ns1.gd        2d    IN      A       17.1.1.1
ns2.gd        2d    IN      A       17.2.2.2

在河北的权威DNS上的ZONE文件(hb.test.com):
$TTL 6h
$ORIGIN hb.test.com.
@               3600    IN      SOA     ns1.hb.test.com. root.hb.test.com.(
                  929142851  ; Serial
                  1800          ; Refresh
                  600            ; Retry
                  2w            ; Expire
                  300            ; Minimum
                  )  
@               2d      IN      NS      ns1.hb.test.com.
@               2d      IN      NS      ns2.hb.test.com.

ns1             2d      IN      A       12.1.1.1
ns2             2d      IN      A       12.2.2.2
www           1h      IN      A       12.2.2.54
ftp             1h       IN      A       12.2.2.52
mail            1h       IN      A       12.2.2.58

上海,广东的ZONE文件,略。

[ 本帖最后由 llzqq 于 2009-11-10 19:52 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2009-11-11 12:10 |只看该作者
感谢楼上的兄弟,昨天我已调试成功,

思路完全一样,谢谢!

论坛徽章:
0
6 [报告]
发表于 2009-11-12 15:43 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2010-11-01 18:26 |只看该作者
又仔细看了一遍,终于明白LZ要表达的意思了(我理解错了)。

把TEST.COM的三级域名分配给每个省份如河北 ...
llzqq 发表于 2009-11-10 19:16



ns1.sh作为主机名的方式符合规范吗?

Host Names (or 'labels' in DNS jargon) were traditionally defined by RFC 952 and RFC 1123 and may be composed of the following valid characters.

A to Z ; upper case characters
a to z ; lower case characters
0 to 9 ; numeric characters 0 to 9
-      ; dash
The rules say:

A host name (label) can start or end with a letter or a number
A host name (label) MUST NOT start or end with a '-' (dash)
A host name (label) MUST NOT consist of all numeric values
A host name (label) can be up to 63 characters
RFC 2181 significantly liberalized the valid character set including the use of "_" (underscore) essentially saying that anything goes and its up to the client to validate in context. If you want to be safe stick with the rules above if you need the expanded capabilities (e.g. SRV RRs) use them. However you are taking a risk that one vital system will not talk to you at 3AM in the morning due to an upgrade!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP