免费注册 查看新帖 |

Chinaunix

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

[DNS] 能否让bind解析域名时支持 下划线 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-03 10:18 |只看该作者 |倒序浏览
20可用积分
由于准备用DNS替换掉/etc/hosts,但是hosts中使用的格式为 a_b.domain.com的格式,希望在dns中也用这种格式,但是DNS中明确表示 不支持这种格式,想改一下源码让他暂时支持一下,以后慢慢将 a_b.domain.com 的格式 换成 a-b.domain.com 的格式。

不知那位对 bind 源码比较熟,应在什么地方修改才能支持 a_b.domain.com 的格式呢??

最佳答案

查看完整内容

RFC 952明确规定“A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names". (See RFC-921, "Domain Name System Implementation Schedule", for background).如果一定要用下划线,可以取消check-names有两种方法 ...

论坛徽章:
0
2 [报告]
发表于 2009-08-03 10:18 |只看该作者
RFC 952明确规定“A "name" (Net, Host, Gateway, or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). Note that periods are only allowed when they serve to delimit components of "domain style names". (See RFC-921, "Domain Name System Implementation Schedule", for background).

如果一定要用下划线,可以取消check-names

有两种方法:
一、在/etc/resolv.conf 加入 options no-check-names

二、编辑named.conf.local

zone xxx {
check-names ignore;
}

论坛徽章:
0
3 [报告]
发表于 2009-08-03 12:43 |只看该作者

回复 #2 aaaaa5aa 的帖子

按你回复的答案来做,果然可以,谢谢,
不清楚怎样将 悬赏 积分 给你,找了几个地方都没有找到,如果你知道,告之一下,谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP