难道真的Dns.GetHostAddresses取回所有已注册的IP地址?难道真、地址、GetHostAddresses、Dns

2023-09-06 08:07:29 作者:想以好久不见的名义拥抱你

难道Dns.GetHostAddresses真正找回所有已注册的IP地址?

Does Dns.GetHostAddresses really get back all registered IPs?

这是DNS可以有多个IP的登记在为循环型目的的DNS名称(例如,多个代理服务器,但给使用一个主DNS代理服务器名称)

That is DNS can have multiple IP's registered against a DNS name for round-robin type purposes (e.g. multiple proxy servers but give use one main DNS proxy server name)

但是否在.NET方法Dns.GetHostAddresses(主机名)真是把所有这些注册的IP地址了?

But does the .NET method "Dns.GetHostAddresses(hostname)" really bring all of these registered IP addresses back?

如果没有,任何其他建议再怎么弄的所有可能的IP的列表,DNS名称可以解析为?

If not, any other suggestions re how to get a list of all possible IP's that a DNS name may resolve to?

推荐答案

有关服务器都有所谓的循环赛的地址,它们可被配置为拥有大量可供一个名称的IP地址。然而,DNS响应的大小被限制为一定的大小,这反过来又限制了可以在一个查询将返回地址的数目。因此通常的DNS服务器可能洗牌的IP地址的列表,并返回适合在答案的第一n

For servers that have so-called "round robin" addresses, they may be configured to have a lot of IP addresses offered for a single name. However, the size of a DNS response is limited to a certain size, which in turn limits the number of addresses that can be returned in one query. So typically the DNS server might shuffle the list of IP addresses and return the first n that fit in the answer.

对于一个思想实验,问自己一个查询到 google.com 能否可能返回的所有的,可能成为谷歌的网页地址。

For a thought experiment, ask yourself whether a single query to google.com could possibly return all addresses that might serve Google web pages.