AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 14074
Accepted
GetFree
GetFree
Asked: 2009-05-29 11:55:31 +0800 CST2009-05-29 11:55:31 +0800 CST 2009-05-29 11:55:31 +0800 CST

当前解析的域名列表

  • 772

Windows中是否有命令或任何东西可以让我查看系统当前解析的域名列表?

类似于arp命令的东西,但用于域名。

谢谢。


编辑:
我一直在使用 Matt 给出的命令进行一些测试,我注意到刷新时间和/或重试时间较短的域名没有显示在ipconfig.

例如,google.com没有出现在我的列表中,但根据 dns 响应它应该被缓存:

google.com
    primary name server = ns1.google.com
    responsible mail addr = dns-admin.google.com
    serial  = 2009052800
    refresh = 7200 (2 hours)
    retry   = 1800 (30 mins)
    expire  = 1209600 (14 days)
    default TTL = 300 (5 mins)

而serverfault.com具有较高刷新和重试时间的 确实出现在 ipconfig 给出的列表中。

serverfault.com
    primary name server = ns21.domaincontrol.com
    responsible mail addr = dns.jomax.net
    serial  = 2009031400
    refresh = 28800 (8 hours)
    retry   = 7200 (2 hours)
    expire  = 604800 (7 days)
    default TTL = 86400 (1 day)

以下是另一个从未显示的域ipconfig,即使它的 TTL 很高:

minijuegostop.com.mx
    primary name server = ns1.theplanet.com
    responsible mail addr = support.minijuegostop.com.mx
    serial  = 2008122302
    refresh = 900 (15 mins)
    retry   = 900 (15 mins)
    expire  = 1209600 (14 days)
    default TTL = 86400 (1 day)

显然 Windows 决定不缓存某些域,刷新和重试时间与它有关。要么是 Internet Explorer,要么是 Internet Explorer 维护自己的域名列表。但我不这么认为,因为当我打开一个新网页时,该页面的域名由 ipconfig 命令显示;除非它的刷新或重试时间较短,在这种情况下,它不会显示在列表中。

有谁知道可能是什么问题,或者是否可以显示缓存域名的完整列表?(因为显然给出的列表ipconfig不完整)

windows domain-name-system
  • 4 4 个回答
  • 658 Views

4 个回答

  • Voted
  1. Best Answer
    Matt Simmons
    2009-05-29T11:58:38+08:002009-05-29T11:58:38+08:00

    ipconfig /displaydns

    • 10
  2. quux
    2009-05-30T18:15:50+08:002009-05-30T18:15:50+08:00

    按顺序运行以下命令:

    1. ipconfig /flushdns
    2. ping google.com。
    3. ipconfig /displaydns

    这(或非常相似的东西)是您应该看到的,除非某些东西(可能是恶意软件)扰乱了您的 DNS 解析:

    C:\>ipconfig  /flushdns
    
    Windows IP Configuration
    
    Successfully flushed the DNS Resolver Cache.
    
    C:\>ping google.com.
    
    Pinging google.com [74.125.45.100] with 32 bytes of data:
    Reply from 74.125.45.100: bytes=32 time=36ms TTL=50
    Reply from 74.125.45.100: bytes=32 time=32ms TTL=50
    Reply from 74.125.45.100: bytes=32 time=40ms TTL=50
    Reply from 74.125.45.100: bytes=32 time=38ms TTL=50
    
    Ping statistics for 74.125.45.100:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 32ms, Maximum = 40ms, Average = 37ms
    
    C:\>ipconfig  /flushdns
    
    Windows IP Configuration
    
        google.com
        ----------------------------------------
        Record Name . . . . . : google.com
        Record Type . . . . . : 1
        Time To Live  . . . . : 140
        Data Length . . . . . : 4
        Section . . . . . . . : Answer
        A (Host) Record . . . : 209.85.171.100
    
    
        Record Name . . . . . : google.com
        Record Type . . . . . : 1
        Time To Live  . . . . : 140
        Data Length . . . . . : 4
        Section . . . . . . . : Answer
        A (Host) Record . . . : 74.125.67.100
    
    
        Record Name . . . . . : google.com
        Record Type . . . . . : 1
        Time To Live  . . . . : 140
        Data Length . . . . . : 4
        Section . . . . . . . : Answer
        A (Host) Record . . . : 74.125.45.100
    
    
    
    C:\>
    
    • 2
  3. Alex J
    2009-05-30T22:07:58+08:002009-05-30T22:07:58+08:00

    关于您已编辑的关于缓存中缺少一些 TTL 较低的 DNS 条目的问题,请查看此谷歌搜索,该搜索将解释所有内容:

    http://www.google.com/search?q=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNSCache\Parameters++site%3Amicrosoft.com

    • 1
  4. Zoredache
    2009-05-29T13:45:27+08:002009-05-29T13:45:27+08:00

    例如,google.com 没有出现在我的列表中,但根据 dns 响应,它应该被缓存:

      google.com
          primary name server = ns1.google.com
          responsible mail addr = dns-admin.google.com
          expire  = 1209600 (14 days)
          default TTL = 300 (5 mins)
    

    控制记录缓存多长时间的值是 TTL(生存时间),而不是重试或刷新。根据您发布的内容,Google 的默认 TTL 为 5 分钟,但特定记录的 TTL 可能要低得多。在我的测试中,与 www.google.com 记录关联的 A 记录的 TTL 往往在 30-60 秒之间。如果您没有点击 Google,然后立即检查缓存,则记录可能过期得太快,您无法注意到。尝试ping www.google.com,然后立即运行ipconfig /displaydns。

    • 0

相关问题

  • 您最喜欢的云计算提供商是什么?[关闭]

  • Vanilla Powershell 是否足以成为 Windows 和 DB 服务器管理员的语言?

  • 为什么添加新驱动器后我的磁盘驱动器访问速度如此之慢?

  • 在 Windows Server 2003 下使用 wscipt 从 .asp 文件运行 .exe

  • 最佳混合环境(OS X + Windows)备份?[关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    Windows 中执行反向 DNS 查找的命令行实用程序是什么?

    • 14 个回答
  • Marko Smith

    如何检查 Windows 机器上的端口是否被阻塞?

    • 4 个回答
  • Marko Smith

    我应该打开哪个端口以允许远程桌面?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    kch 如何更改我的私钥密码? 2009-08-06 21:37:57 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve