
编辑(以整合答案中的一些信息):DNS的各个方面似乎在几个RFC中定义,包括1035,1123和2181.从RFC-2181 section 11开始:
Note however,that the varIoUs applications that make use of DNS datacan have restrictions imposed on what particular values areacceptable in their environment. For example,that any binary labelcan have an MX record does not imply that any binary name can be usedas the host part of an e-mail address.[ ... ]See also [RFC1123] section 6.1.3.5.
从RFC-1123 section 6.1.3.5:
The DNS defines domain name Syntax very generally -- astring of labels each containing up to 63 8-bit octets,separated by dots,and with a maximum total of 255octets. Particular applications of the DNS arepermitted to further constrain the Syntax of the domainnames they use,although the DNS deployment has led tosome applications allowing more general names. Inparticular,Section 2.1 of this document liberalizesslightly the Syntax of a legal Internet host name thatwas defined in RFC-952 [DNS:4].
从RFC-1123 section 2.1:
The Syntax of a legal Internet host name was specifIEd in RFC-952[DNS:4]. One aspect of host name Syntax is hereby changed: therestriction on the first character is relaxed to allow either aletter or a digit. Host software MUST support this more liberalSyntax.
最后,从最初引用,从RFC-952:
1. A "name" (Net,Host,Gateway,or Domain name) is a text string upto 24 characters drawn from the Alphabet (A-Z),digits (0-9),minussign (-),and period (.). Note that periods are only allowed whenthey serve to delimit components of "domain style names". (SeeRFC-921,"Domain name System Implementation Schedule",forbackground). No blank or space characters are permitted as part of aname. No distinction is made between upper and lower case. The firstcharacter must be an Alpha character. The last character must not bea minus sign or period.[ ... ]Single character names or nicknames are not allowed.
正是从这个链条开始,我才开始说RFC-952禁止使用单字符主机名.
解决方法 “有效”和“有效”之间存在差异.如果主机名是单个字符(我之前的帖子不能承受),则完全有可能主机名不被视为有效.但是,相当多的系统都允许它们.一个主要系统,即微软的AD / DNS系统,有一个允许单个字符名称的遗留原因.旧学校NetBIOS名称的长度为1到15个字符.此规范是独立于RFC952开发的,它基于一个名为lmhosts的不同文件,因此它可以工作.当微软从NetBEUI(实际上是NBF,NetBIOS帧协议)转移到TCP / IP(实际上是NBT)时,问题出现了,微软不得不允许通过TCP / IP网络进行命名解析. MS选择使用WINS服务器维护NetBIOS样式解析,从而绕过了对RFC952兼容主机的需求.
然后是Active Directory及其DNS依赖项.动态DNS是规则,因此客户端必须在DNS域中注册其Computername(其前15个字符也是其NetBIOS名称).由于MS允许单字符NetBIOS名称在DNS中注册,因此这与RFC952冲突.他们决定对他们的系统进行编码以允许这样做,因为这模仿了它在WINS时代总是如何工作.
BIND DNS还允许单字符主机名.但RFC2181几乎表明,应用程序需要审查自己的数据,而不是DNS.这使得我们拥有大量的单个字符主机名称的设备和软件,以及一些不允许它的RFC952严格的异常值.
总结以上是内存溢出为你收集整理的domain-name-system – 单字母主机名是否有效?全部内容,希望文章能够帮你解决domain-name-system – 单字母主机名是否有效?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)