Dns.GetHostEntry returns multiple IP addresses

Posted by spender on Stack Overflow See other posts from Stack Overflow or by spender
Published on 2009-06-15T12:19:31Z Indexed on 2010/06/17 9:13 UTC
Read the original article Hit count: 503

Filed under:
|
|

This question probably highlights a lack of understanding of networking principals on my part, rather than a programming issue.

I'm doing a lookup on a hostname using

Dns.GetHostEntry

This returns an IPHostEntry to me, which has an AddressList property which is an array of IPAddress.

I always thought there is a 1 to 1 mapping between hostname and IP, but I'm finding that in some cases I get back several IPAddress(es) for the same host.

This is a surprise to me.

Which part of domain name resolution do I not understand?

© Stack Overflow or respective owner

Related posts about c#

Related posts about networking