windows 是否可以在没有 DNS 的情况下从 IP 地址解析主机名?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2293523/
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 13:58:12  来源:igfitidea点击:

Is it possible to resolve a hostname from an IP address without DNS?

windowsnetworkingtcphostname

提问by Maltrap

Assuming you have an IP address and no other information. You're not allowed to use DNS as it may be reporting invalid information. Also assume that the destination machine is running a Microsoft OS and is currently online and booted.

假设您有一个 IP 地址并且没有其他信息。您不得使用 DNS,因为它可能会报告无效信息。还假设目标计算机正在运行 Microsoft 操作系统并且当前处于联机状态并已启动。

Is there any way to query the machine directly using the IP address (some service/port) to find out what the hostname is of that machine?

有没有办法直接使用 IP 地址(某些服务/端口)查询机器以找出该机器的主机名?

回答by Dave Konopka

Depending on the version of Windows and services enabled on the remote machine, you may be able to query its NetBIOS (WINS) identifier name. That won't give you a domain name, but it might get enough of a name so you can id the machine.

根据远程计算机上启用的 Windows 和服务的版本,您或许能够查询其 NetBIOS (WINS) 标识符名称。这不会给你一个域名,但它可能会获得足够的名称,以便你可以识别机器。

http://technet.microsoft.com/en-us/library/cc736703(WS.10).aspx

http://technet.microsoft.com/en-us/library/cc736703(WS.10).aspx

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

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

回答by mjv

You can use NetBIOS Name service(UDP port 137)

您可以使用NetBIOS 名称服务(UDP 端口 137)

I think that WINS is just another name / thin wrapper around NetBIOS NS.

我认为 WINS 只是 NetBIOS NS 的另一个名称/薄包装。