DNS问题并不新鲜,它们可能是互联网无法正常工作的主要原因之一。在Windows 11/10中使用内置的Internet 连接疑难解答(Internet Connections Troubleshooter)时,如果您收到一条错误消息,指出Windows 无法与设备或资源(主 DNS 服务器)通信(Windows can’t communicate with the device or resource (Primary DNS Server)),本文将介绍解决此问题的方法。
什么是主 DNS 服务器?
在Windows或路由器中(Router)配置 DNS 服务器(configuring DNS Server)时,需要两个条目。首先(First)是初级,然后是次级。这是一个故障保险,如果第一个DNS(DNS)服务器无法响应,网站仍然可以打开。
Windows 无法与设备或资源(主 DNS 服务器(Primary DNS Server))通信
您的ISP配置了DNS服务器,或者如果您使用Cloudflare、Google等公共DNS ,您可以在路由器或 PC 上手动设置它。由于错误消息明确表示无法通信,因此我们需要解决连接问题。
- 重启路由器或电脑
- 添加辅助 DNS
- 检查 DNS 和 DHCP 客户端
- 更改 DNS
按照这些方法修复无法与设备或资源(主 DNS(Primary DNS)服务器)通信的Windows问题。(Windows)
1]重新启动路由器或PC
有时硬件会卡住并需要重新启动。我建议重新启动路由器和 PC 作为故障排除的第一步。它将暂时重置它所持有的任何内容,并重新加载配置的设置,然后重新开始。
2]添加辅助DNS
您(Are)是否缺少辅助DNS?虽然这种情况很少见,但如果您手动配置了 DNS(manually configured the DNS)并且没有输入辅助DNS,并且主DNS出现故障,那么这可能是问题的根本原因。在某些设置中,它也称为备用 DNS 。(Alternate DNS)
3]更改DNS
始终最好使用公共 DNS(Public DNS)。该列表包括Google DNS、Cloudflare、Quad9、OpenDNS、Comodo Secure DNS等。其中一些DNS是付费的,而另一些则是免费的。除非您需要付费服务,否则免费服务应该足以让您入门。
4]确保您的DNS客户端(Ensure Your DNS Client)和DHCP客户端正在(DHCP Client Are)运行
这两个服务需要运行以确保不存在与 DNS 相关的错误。
- DHCP 客户端服务(DHCP Client Service)为 PC注册和更新 IP 地址和DNS记录。如果停止此服务,此计算机将不会收到动态 IP 地址和DNS更新。
- DNS 客户端服务(DNS Client Service)或 dnscache 命名并为此计算机注册完整的计算机名称。如果服务停止,将不会有缓存。
(Type)在运行提示中(Run Prompt)键入services.msc,然后按Enter键。它将打开“服务(Services)”窗口。找到 DNS Client(Locate DNS Client)和DHCP Client,并确保它们正在运行。
相关(Related):您的计算机似乎配置正确,但设备或资源(DNS 服务器)没有响应(Your computer appears to be correctly configured, but the device or resource (DNS server) is not responding)。
如何解决 DNS 问题?
如果重新启动 PC 和路由器没有帮助,并且您已经清除了缓存,那么最好使用VPN或其他DNS解析器。它将帮助您确定ISP是否是多次发生的问题。
如何检查我的 DNS 设置?
在路由器上,您需要检查配置ISP IP(ISPs IP)设置的配置。如果您的 PC 上已配置所有内容,请转到Settings > Network和Internet ” 。单击(Click)属性(Properties),然后单击DNS服务器(DNS)分配旁边的编辑按钮。(Edit)在这里您可以查看设置。
什么是好的 DNS 使用?
Good DNS没有特别的定义,但使用Cloudflare、Google DNS和其他类似线路可以提供比ISP更好的性能。
什么是辅助 DNS?
如果将网站名称解析为 IP 地址(即DNS )的主服务器出现故障,PC 会向辅助DNS发送相同的查询。它确保如果查询时间过长或不可用,用户仍然可以访问该网站。解决后,计算机将其存储在本地,并且在缓存过期之前不会再次查询DNS 。
如何清除您的 DNS 缓存?
解析网站 IP 地址后,它会保存在缓存中。下次浏览器再次请求时,使用本地缓存快速解析,而不是通过DNS查询。如果该网站不再使用该 IP 地址,则该网站可能无法解析。查看我们关于如何清除 DNS 缓存的详细指南。(clear the DNS cache.)
DNS会更改您的IP地址吗?
不,它不能。IP 地址可以手动分配,也可以使用DHCP 分配(DHCP)。这是不属于DNS Server的不同功能。DNS的作用是将网站快速解析为IP地址。
此错误是外部错误,您无能为力。虽然您可以在客户端 PC 上重新启动服务,但使用备用外部DNS服务器进行检查对于确保它不是 PC 问题很重要。更改DNS服务器时,请务必记下旧的。
我希望该帖子解决了您的错误,并且您可以照常浏览。
Windows can't communicate with the device or resource (DNS server)
DNS issues are not new, and they could be one of the major causes of the іnternet not working. When using the built-in Internet Connections Troubleshooter in Windows 11/10, if you receive an error saying that Windows can’t communicate with the device or resource (Primary DNS Server), this post will look at ways to resolve this.
What is a Primary DNS Server?
When configuring DNS Server in Windows or the Router, two entries are taken. First is the primary, and then the secondary. This is a failsafe where a website can still be opened if the first DNS server fails to respond.
Windows can’t communicate with the device or resource (Primary DNS Server)
Your ISP configures a DNS server, or you can manually set it on your router or PC if you are using the public DNS such as Cloudflare, Google, and others. Since the error message clearly says it cannot communicate, we need to resolve the connection issue.
- Restart Router or PC
- Add a Secondary DNS
- Check on DNS and DHCP Client
- Change DNS
Follow these methods to fix the Windows problem that can’t communicate with the device or resource (Primary DNS server).
1] Restart Router or PC
Sometimes the hardware gets stuck and needs a restart. I would recommend restarting both the router and the PC as the first step to troubleshooting. It will reset whatever it’s holding temporarily, and reload the configured settings, and start fresh.
2] Add a Secondary DNS
Are you missing a secondary DNS? While it’s rare, if you have manually configured the DNS and did not enter the secondary DNS, and the primary DNS is failing, then this can be the root cause of the problem. It is also called an Alternate DNS in some of the settings.
3] Change DNS
It is always preferable to use Public DNS. The list includes Google DNS, Cloudflare, Quad9, OpenDNS, Comodo Secure DNS, and more. Some of these DNS are paid, while others are free. Unless you need a paid service, free services should be good enough to get you started.
4] Ensure Your DNS Client and DHCP Client Are Running
These two services need to be running to ensure there is no DNS-related error because of it.
- DHCP Client Service registers and updates IP addresses and DNS records for the PC. If this service is stopped, this computer will not receive dynamic IP addresses and DNS updates.
- DNS Client Service or dnscache names and registers the full computer name for this computer. If the service is stopped, there will be no caching.
Type services.msc in the Run Prompt and press the Enter key. It will open the Services window. Locate DNS Client and DHCP Client, and ensure they are running.
Related: Your computer appears to be correctly configured, but the device or resource (DNS server) is not responding.
How Do I Resolve DNS Issues?
If restart the PC and router don’t help, and you have already cleared the cache, then it would be best to use a VPN or another DNS resolver. It will help you figure out if the ISP is the problem that happens many a time.
How Do I Check My DNS Settings?
On the router, you need to check on the configuration where the ISPs IP settings are configured. If everything is configured on your PC, then go to Settings > Network & Internet. Click on Properties, and then click on the Edit button next to the DNS server assignment. Here you can view the settings.
What Is a Good DNS To Use?
There is no particular definition of Good DNS, but using Cloudflare, Google DNS, and others on similar lines can deliver better performance than the ISP.
What Is a Secondary DNS?
If the primary server that resolves website name to IP address aka DNS fails, the PC sends the same query to secondary DNS. It ensures if the query is taking too long or is not available, the user can still access the website. Once resolved, the computer stores it locally and doesn’t query the DNS again until the cache expires.
How to Clear Your DNS Cache?
Once a website IP address is resolved, it is kept in the cache. The next time the browser requests it again, the local cache is used to resolve it quickly instead of querying it with the DNS. If the website is not using that IP address anymore, then the website may fail to resolve. Check our detailed guide on how you can clear the DNS cache.
Does DNS change your IP address?
No, it cannot. An IP address is allocated either manually or using DHCP. It’s a different function that is not part of the DNS Server. The function of DNS is to resolve website to IP address and fast.
This error is external, and there is little you can do. While you can restart the services on the client PC, checking using an alternate external DNS server is important to ensure it’s not a PC problem. When changing the DNS server, make sure to note down the old.
I hope the post resolved your error, and you can browse as usual.