windows 窗口服务器中机器名的限制是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4097282/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:33:15  来源:igfitidea点击:

What is the limit on the machine name in window server?

windowswindows-server-2008

提问by Ian Ringrose

I need to store the machine name in a database field, so I need to know how big to make the field.

我需要将机器名称存储在数据库字段中,因此我需要知道该字段有多大。

So is there a limit on the length of a machine name?

那么机器名的长度有限制吗?

If so what is the limit?

如果是这样,限制是多少?

Can I machine name be Unicode?

我的机器名称可以是 Unicode 吗?

采纳答案by David

This KB article says 255 bytes for the FQDN and it does support Unicode.

这篇知识库文章说 FQDN 有 255 个字节,它确实支持 Unicode。

http://support.microsoft.com/kb/909264

http://support.microsoft.com/kb/909264

DNS domain names

The maximum length of the host name and of the fully qualified domain name (FQDN) is 63 octets per label and 255 bytes per FQDN. This maximum includes 254 bytes for the FQDN and one byte for the ending dot.

In Windows 2000 and in Windows Server 2003, the maximum host name and the FQDN use the standard length limitations that are mentioned earlier, with the addition of UTF-8 (Unicode) support. Because some UTF-8 characters exceed one octet in length, you cannot determine the size by counting the characters.

DNS域名

主机名和完全限定域名 (FQDN) 的最大长度为每个标签 63 个八位字节和每个 FQDN 255 个字节。该最大值包括 FQDN 的 254 个字节和结束点的 1 个字节。

在 Windows 2000 和 Windows Server 2003 中,最大主机名和 FQDN 使用前面提到的标准长度限制,并增加了 UTF-8 (Unicode) 支持。由于某些 UTF-8 字符的长度超过一个八位字节,因此您无法通过计算字符数来确定大小。

回答by Ralf de Kleine

RFC 1035says 63 characters. Tried it on a XP box and it would only allow 63 characters..

RFC 1035表示 63 个字符。在 XP 盒子上试了一下,它只允许 63 个字符。