在NIC上启用NetBIOS时的DNS.GetHostEntry

编程入门 行业动态 更新时间:2024-10-25 02:28:02
本文介绍了在NIC上启用NetBIOS时的DNS.GetHostEntry的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们一直发现当DNS缓存为空时,在Windows 10上的NIC上启用NetBIOS over Tcpip时,Dns.GetHostEntry(IP地址)可能需要大约9秒才能返回。 Windows 8.1。 Wireshark显示DNS服务器有一个反向查询查询,它在几分之一秒内返回正确的主机名。然后延迟最多9秒。然后向主机名的DNS进行正向查找,在几分之一秒内返回正确的数据。 GetHostEntry返回的主机名始终是正确的。如果在NIC上禁用了NetBIOS over Tcpip,则GetHostEntry会在几分之一秒内返回正确的主机名。我们使用一个简单的c#测试程序对其进行了测试,以将其与我们的遗留应用程序隔离开来。 Visual Studio 2015和Visual Studio都会出现此问题。无论NetBIOS NIC设置和DNS缓存如何,命令行中的Nslookup都可以立即运行。一旦DNS缓存被填充,Dns.GetHostEntry即时。

We have been finding that when the DNS cache is empty, Dns.GetHostEntry(IP Address) can take up to about 9 seconds to return when NetBIOS over Tcpip is enabled on the NICs on Windows 10 & Windows 8.1. Wireshark shows that there is a reverse lookup query to the DNS server which returns with the correct hostname within a fraction of a second. There is then the delay of up to 9 seconds. There is then a forward lookup to DNS of the hostname which returns with the correct data in a fraction of a second. The hostname that GetHostEntry returns with is always the correct one. If NetBIOS over Tcpip is disabled on the NICs, then GetHostEntry returns with the correct hostname in a fraction of a second. We have tested this with a simple c# test program to isolate it from our legacy application. The problem occurs with both Visual Studio 2015 & 2005. Nslookup from the command line works pretty well instantly regardless of the NetBIOS NIC setting and the DNS cache. Dns.GetHostEntry is instantaneous once the DNS cache is populated.

观察显示当关闭与IP地址对应的机器时发生长延迟。当打开这台机器时,我们从Wireshark看到,NetBIOS查询似乎发生在DNS反向和正向查找之间, GetHostEntry延迟减少到1到2秒。然而,对于我们的遗留应用程序而言,这仍然很重要,遗留应用程序正在编译启动时的主机名列表。

Observation showed that the long delay occurs when the machine corresponding to the IP Address is switched off. When this machine is switched on, we have seen from Wireshark, that NetBIOS queries seem to occur between the DNS reverse and forward lookups, the GetHostEntry delay is reduced to 1 to 2 seconds. However this is still significant for us in the terms of our legacy application which is compiling a list of hostnames on start-up.

推荐答案

您好mh4206,

Hi mh4206,

感谢您在此发帖。

根据我的搜索,我找不到禁用 NetBIOS for

Based on my search, I do not find a good to disableNetBIOS forDns.GetHostEntry. If it is possible, please disable NetBIOS at the NICs like what you test before.

最好的问候,

Wendy

更多推荐

在NIC上启用NetBIOS时的DNS.GetHostEntry

本文发布于:2023-11-12 04:39:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580525.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NetBIOS   NIC   GetHostEntry   DNS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!