1 - 它是如何工作的?出现这个问题是因为我正在与一个对 System.Net.Dns.GetHostAddresses 的调用不起作用的人一起工作。我给了他一个示例应用程序,它只调用上述方法并显示返回的 IP 地址。这是他使用后的解释:
When I try to resolve 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 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.
我在我的工作计算机(有代理服务器)和我的个人计算机(没有代理服务器)上做了一些数据包嗅探,在 GetHostAddresses< 期间似乎没有发送或接收数据包 调用。 那么,这个调用到底在做什么?
2:
What port number is used?
与我一起工作的人也问过。我不知道这个。如果没有发送数据包,那么答案似乎是没有正在使用的端口,但我对端口和类似的东西不是很了解。 如果有人知道如何回答这个问题,或者知道我找到答案的过程,请告诉我。
请您参考如下方法:
DNS 是一个庞大的主题。关于 Q1,这取决于您的机器的配置方式(节点类型)。谷歌搜索应该可以帮助您了解一般原则。
这是关于端口的答案:Network Ports Used by DNS
