且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Java 中进行反向 dns 查找

更新时间:2022-06-22 06:59:19

您提供的代码中的 IP 地址解析为 yahoo,因为它由 yahoo 持有.

The IP Address in the code your provided resolves to yahoo because it is held by yahoo.

您使用的 IP 地址仅指定给一台主机.你可以想象雅虎可能有成千上万的服务器.他们被分配了一个 ipaddresses 分配,然后在他们认为适合内部分配的情况下重用这些 ipaddresses.yahoo 域下的不同服务器具有不同的名称,因此当您从特定服务器引用 IP 地址时,您将获得该特定服务器的名称.对于可能隐藏的 yahoo.com 的一般 IP 地址,除非您想要进行 nslookup 并查询整个 IP 地址范围以查找 yahoo.com 分配并从那里进行概括.

The Ip address you are using is designated for only one host. As you can imagine yahoo probably has thousands of servers. They get assigned an allocation of ipaddresses which they then reuse as they see fit for internal allocation. The different servers under yahoo domain have different names and hence when you reference an ip address from a specific server you get the name for that specific server. For the general ipaddress for yahoo.com that might be hidden unless you want to to a nslookup and query a whole range of ipaddress to find yahoo.com allocations and generalize from there.