大网数据广告活动
服务器运维问答

nslookup fails but PowerShell's resolve-dnsname works

· 52CE 我爱测

This is not a domain I have anything to do with, but I don't understand what's going on. The nameservers for sciencedaily.com are: ns-1414.awsdns-48.org. ns-1618.awsdns-10.co.uk. ns-300.awsdns-37.com. ns-695.awsdns-22.net. If I r…

问题原文

原帖链接 · matthewk · CC BY-SA 3.0

This is not a domain I have anything to do with, but I don't understand what's going on. The nameservers for sciencedaily.com are:

  • ns-1414.awsdns-48.org.
  • ns-1618.awsdns-10.co.uk.
  • ns-300.awsdns-37.com.
  • ns-695.awsdns-22.net.

If I run nslookup and type server ns-1414.awsdns-48.org and then sciencedaily.com it returns

*** ns-1414.awsdns-48.org can't find sciencedaily.com: No response from server

But it I run resolve-dnsname sciencedaily.com -server ns-1414.awsdns-48.org in PowerShell it returns the DNS records correctly. What am I missing?

已采纳解答

原帖链接 · robertom · CC BY-SA 3.0

It seems server ns-1414.awsdns-48.org is prefering IPv6 over IPv4 due to IPv6 being enabled on the network interface; and it makes nslookup stick with IPv6 for the following request(s). Due to a missing IPv6 connection to the outside world however, that DNS request fails. It seems it works when calling nslookup like nslookup sciencedaily.com ns-1414.awsdns-48.org and as you said when using resolve-dnsname. Usage of IPv6 for the DNS request can also be avoided by looking up the IP(v4) of ns-1414.awsdns-48.org first and do

$ nslookup
> server 205.251.19
> sciencedaily.com

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。