Does Dns.GetHostAddresses really get back all registered IPs?
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)
But does the .NET method “Dns.GetHostAddresses(hostname)” really bring all of these registered IP addresses back?
If not, any other suggestions re how to get a list of all possible IP’s that a DNS name may resolve to?
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.
For a thought experiment, ask yourself whether a single query to
google.comcould possibly return all addresses that might serve Google web pages.