1 – How does it work? This question has come up because I am working with a guy for whom the call to System.Net.Dns.GetHostAddresses does not work. I gave him a sample app that just calls the aforementioned method and displays the IP addresses that are returned. Here is his explanation after using it:
When I try to resolve http://www.google.com [in the app]
it does not
work on the local workstations,
because our internal DNS do not
resolve external DNS names. [But] If I put
http://www.google.com in the browser, the
proxy server knows to go to the
external DNS servers for name
resolution and it resolves the name to
the IP address. Even if we put the
proxy server name in the application
it does not work when testing the
resolution.
I have done some packet sniffing on my work computer (which has a proxy server) and my personal computer (which does NOT have a proxy server) and there seem to be no packets sent or received durring the GetHostAddresses call. So, what exactly is that call doing?
2:
What port number is used?
Also asked by the person I am working with. I have no idea about this one. If there are no packets sent then it seems the answer would be there is no port being used, but I am not very savvy when it comes to ports and things like this. If anyone knows how to answer this or even a process for me to find the answer, please let me know.
DNS is a huge subject. Concerning Q1, it depends on how your machine is configured (node type). Googling on this should help you on the general principles.
Here is an answer about the ports: Network Ports Used by DNS