本人喜欢使用: Name-other 这样的命名.
之前, 在使用的linux下, 也出现过hostname不附合命名不合规定而出过问题. 今天, 也是windows下出现了.
在windows下出现还是相当麻烦的. 首先, 系统是使用中文的, google时只能对中文搜索. 其次, windows的出错提示乱来
hostname的命名规定查了一下:
From 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".
No blank or space characters are permitted as part of a
name. No distinction is made between upper and lower case. The first
character must be an alpha character [Relaxed in RFC 1123] . The last
character must not be a minus sign or period.
From RFC 1035
labels 63 octets or less
names 255 octets or less
[snip] limit the label to 63 octets or less.
To simplify implementations, the total length of a domain name (i.e.,
label octets and label length octets) is restricted to 255 octets or
less.
From RFC 1123
One aspect of host name syntax is hereby changed: the
restriction on the first character is relaxed to allow either a
letter or a digit. Host software MUST support this more liberal
syntax.
Host software MUST handle host names of up to 63 characters and
SHOULD handle host names of up to 255 characters.
发现: Name-Other这种文件没有违反命名规定, 但是在一些软件中使用就会有不同的反映.
为了出现这样后果很难处理(至少要reboot机器), 排查也有难度. 应该注意hostname的命名方法.
只使用letter和digit是最安全的.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.