执行 ping 操作时,ping 响应来自随机域名,但是是同一个 IP 地址?

执行 ping 操作时,ping 响应来自随机域名,但是是同一个 IP 地址?

当我 ping 一个网站时,我会收到来自随机域的 ping 响应。您可以在下面的粘贴中看到这一点。我开始 ping,浏览了几个网站,域名一直在变化。

我还发现,当我访问新网站时,我的互联网速度很慢,但当我到达页面后,它加载很快,我通常可以浏览网站而不会变慢。我可以用我的连接(DSL 连接)流式传输高清电影,所以速度还可以,但我所期望的 DNS 有什么奇怪的地方吗?

同样有趣的是,所有 ping 报告的时间都在 95 毫秒左右,但 ping 时间实际上非常零散。这意味着我会坐 10 秒钟,然后 3 或 4 个 ping 会很快返回,然后又会是另一个长时间的停顿。尽管有些 ping 显然(通过视觉估计)比其他 ping 花费的时间更长,但它们都报告相同的 ping 时间。

这是我的第一篇超级用户帖子。我希望这不是太具体,但也许它可以帮助别人。否则我会尝试技术支持论坛而不是 Stack Exchange FAQ 网站。(但是,我确实在类似的 FAQ 网站上找到了类似的问题,但我看不到答案,因为我不会付钱。所以希望超级用户能更好地为我服务。)

更多信息:

  • 我正在使用 Debian 6。
  • 我已硬连线至我的 DSL 路由器。
  • 无线连接到路由器的 Windows 笔记本电脑不会出现同样的问题,但 Windows 的 ping 方式可能有所不同。特别是我注意到 Windows 不会在其 ping 结果中报告域。
  • 下面显示的 ping 结果来自存在“连接问题”的计算机。

/etc/resolv.conf 如下:

# Generated by NetworkManager
domain domain.actdsltmp
search domain.actdsltmp
nameserver 192.168.0.1
nameserver 205.171.3.25

终端的 Ping 命令和结果如下:

buttons@debiandesktop:~$ ping stackexchange.com
PING stackexchange.com (64.34.119.12) 56(84) bytes of data.
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=1 ttl=55 time=97.1 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=2 ttl=55 time=96.1 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=3 ttl=55 time=93.4 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=4 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=5 ttl=55 time=94.8 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=6 ttl=55 time=93.9 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=7 ttl=55 time=95.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=8 ttl=55 time=102 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=9 ttl=55 time=106 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=10 ttl=55 time=99.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=11 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=12 ttl=55 time=94.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=13 ttl=55 time=93.8 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=14 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=15 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=16 ttl=55 time=96.9 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=17 ttl=55 time=94.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=18 ttl=55 time=98.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=19 ttl=55 time=120 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=20 ttl=55 time=93.7 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=21 ttl=55 time=103 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=22 ttl=55 time=94.4 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=23 ttl=55 time=97.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=24 ttl=55 time=102 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=25 ttl=55 time=93.8 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=26 ttl=55 time=93.7 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=27 ttl=55 time=94.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=28 ttl=55 time=94.3 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=29 ttl=55 time=96.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=30 ttl=55 time=94.1 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=31 ttl=55 time=95.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=32 ttl=55 time=95.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=33 ttl=55 time=95.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=34 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=35 ttl=55 time=94.3 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=36 ttl=55 time=95.8 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=37 ttl=55 time=94.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=38 ttl=55 time=93.6 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=39 ttl=55 time=93.4 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=40 ttl=55 time=93.6 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=41 ttl=55 time=96.4 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=42 ttl=55 time=108 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=43 ttl=55 time=95.5 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=44 ttl=55 time=93.8 ms
64 bytes from s0.2mdn.net (64.34.119.12): icmp_req=45 ttl=55 time=95.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=46 ttl=55 time=93.7 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=47 ttl=55 time=99.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=48 ttl=55 time=94.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=49 ttl=55 time=93.8 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=50 ttl=55 time=97.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=51 ttl=55 time=94.3 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=52 ttl=55 time=96.2 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=53 ttl=55 time=101 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=54 ttl=55 time=94.8 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=55 ttl=55 time=95.1 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=56 ttl=55 time=95.7 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=57 ttl=55 time=94.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=58 ttl=55 time=99.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=59 ttl=55 time=109 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=60 ttl=55 time=94.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=61 ttl=55 time=98.0 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=62 ttl=55 time=158 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=63 ttl=55 time=99.0 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=64 ttl=55 time=94.6 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=65 ttl=55 time=94.4 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=66 ttl=55 time=93.7 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=67 ttl=55 time=99.9 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=68 ttl=55 time=96.2 ms
64 bytes from a1.twimg.com (64.34.119.12): icmp_req=69 ttl=55 time=93.3 ms
64 bytes from altfarm.mediaplex.com (64.34.119.12): icmp_req=70 ttl=55 time=94.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=71 ttl=55 time=94.2 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=72 ttl=55 time=93.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=73 ttl=55 time=93.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=74 ttl=55 time=95.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=75 ttl=55 time=93.7 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=76 ttl=55 time=94.2 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=77 ttl=55 time=94.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=78 ttl=55 time=96.2 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=79 ttl=55 time=94.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=80 ttl=55 time=96.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=81 ttl=55 time=94.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=82 ttl=55 time=94.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=83 ttl=55 time=96.5 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=84 ttl=55 time=96.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=85 ttl=55 time=93.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=86 ttl=55 time=97.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=87 ttl=55 time=98.4 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=88 ttl=55 time=128 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=89 ttl=55 time=96.3 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=90 ttl=55 time=94.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=91 ttl=55 time=94.6 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=92 ttl=55 time=97.6 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=93 ttl=55 time=94.3 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=94 ttl=55 time=94.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=95 ttl=55 time=94.5 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=96 ttl=55 time=93.7 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=97 ttl=55 time=93.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=98 ttl=55 time=94.2 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=99 ttl=55 time=94.0 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=100 ttl=55 time=93.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=101 ttl=55 time=95.7 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=102 ttl=55 time=93.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=103 ttl=55 time=94.1 ms
64 bytes from stackoverflow.com (64.34.119.12): icmp_req=104 ttl=55 time=97.6 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=105 ttl=55 time=115 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=106 ttl=55 time=94.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=107 ttl=55 time=104 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=108 ttl=55 time=94.3 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=109 ttl=55 time=93.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=110 ttl=55 time=96.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=111 ttl=55 time=94.3 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=112 ttl=55 time=101 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=113 ttl=55 time=95.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=114 ttl=55 time=94.4 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=115 ttl=55 time=94.6 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=116 ttl=55 time=94.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=117 ttl=55 time=97.5 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=118 ttl=55 time=96.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=119 ttl=55 time=96.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=120 ttl=55 time=97.9 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=121 ttl=55 time=93.7 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=122 ttl=55 time=95.1 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=123 ttl=55 time=95.0 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=124 ttl=55 time=99.6 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=125 ttl=55 time=95.4 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=126 ttl=55 time=93.8 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=127 ttl=55 time=93.7 ms
64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=128 ttl=55 time=94.2 ms
^C64 bytes from ssl.gstatic.com (64.34.119.12): icmp_req=129 ttl=55 time=94.1 ms

答案1

ping 的工作原理如下:

ping stackexchange.com
  1. 它会触发 DNS 查询来解析stackexchange.com
  2. 然后,它向从 DNS 查询中获得的 IP 地址发送 ICMP(ping)请求
  3. 成功回复后,它会向 DNS 查询 ICMP 回复来源的域

这一定意味着您的 DNS 对后续反向查找查询的响应不同。

要亲自尝试一下,请运行nslookup 64.34.119.12在不同时间的命令提示符下查看得到的结果。

ping stackexchange.com

相关内容