Wget 有效,Ping 无效

Har*_*van 5 networking linux debian route ping

Virtuozzo 虚拟化 Debian 4 上有一些异常(我知道,我会尽快升级这个,但存在依赖性)。我们在这个网站上运行了一些网站。几天前,exmi4 无法向某些人发送邮件。我将使用 live.com 作为示例域!

所以有些人收到了邮件,有些人没有。
一些邮件卡在队列中,2天后他们就出去了!!
我的 Nagios 从未出现互联网连接或磁盘空间问题

现在我想安装“dig”来看看他是如何解决 dns 请求的。这个 Debian 告诉我他不知道 dig..

长话短说,Debian 能够下载具有确切 IP 甚至 wget live.com 的站点,但它无法 ping live.com。

我 99% 确定网络和路由也是正确的!

下面是我的一些例子:

wget live.com
Run Code Online (Sandbox Code Playgroud)

下载网站

ping live.com
ping http://www.live.com
ping http://live.com
Run Code Online (Sandbox Code Playgroud)

返回:

ping: 未知主机 live.com

编辑

我现在不再使用 heise.de 而不是 live.com。
我发现我可以使用它的 IP 地址 ping heise.de 服务器。

myserver:~# ping 193.99.144.85
PING 193.99.144.85 (193.99.144.85) 56(84) bytes of data.
64 bytes from 193.99.144.85: icmp_seq=1 ttl=248 time=12.7 ms
64 bytes from 193.99.144.85: icmp_seq=2 ttl=248 time=12.6 ms
64 bytes from 193.99.144.85: icmp_seq=3 ttl=248 time=12.9 ms
64 bytes from 193.99.144.85: icmp_seq=4 ttl=248 time=13.1 ms
64 bytes from 193.99.144.85: icmp_seq=5 ttl=248 time=13.1 ms

--- 193.99.144.85 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 12.671/12.924/13.163/0.238 ms
Run Code Online (Sandbox Code Playgroud)

编辑 2

myserver:/etc/apt# dig heise.de

; <<>> DiG 9.3.4-P1.2 <<>> heise.de
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40551
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 3

;; QUESTION SECTION:
;heise.de.                      IN      A

;; ANSWER SECTION:
heise.de.               2266    IN      A       193.99.144.80

;; AUTHORITY SECTION:
heise.de.               1622    IN      NS      ns.pop-hannover.de.
heise.de.               1622    IN      NS      ns.s.plusline.de.
heise.de.               1622    IN      NS      ns.plusline.de.
heise.de.               1622    IN      NS      ns2.pop-hannover.net.
heise.de.               1622    IN      NS      ns.heise.de.

;; ADDITIONAL SECTION:
ns.plusline.de.         265     IN      A       212.19.48.14
ns.pop-hannover.de.     5113    IN      A       193.98.1.200
ns2.pop-hannover.net.   15150   IN      A       62.48.67.66

;; Query time: 2 msec
;; SERVER: 193.200.112.80#53(193.200.112.80)
;; WHEN: Tue Oct  9 13:03:50 2012
;; MSG SIZE  rcvd: 216
Run Code Online (Sandbox Code Playgroud)

Thi*_*his 3

ping:未知主机 live.com

错误unknown host是指名称到 IP 地址解析的问题。AFAICT,只要您在/etc/resolv.conf...中使用 192.200.113.30 和 192.200.112.80 就不会遇到这个问题

[mpenning@tsunami tests]$ dig +short @193.200.113.30 live.com
65.55.206.154
[mpenning@tsunami tests]$ dig +short @193.200.112.80 live.com
65.55.206.154
[mpenning@tsunami tests]$
Run Code Online (Sandbox Code Playgroud)

也就是说,您所看到的可能与尝试使用ping http://live.com. 不要http://在 ping 中使用前缀...这仅对网络浏览器有意义。

仅供参考,live.com 不会返回 ping,因此您不应期望返回任何 ping...它们都应该超时...

[mpenning@tsunami tests]$ ping -w 1 live.com
PING live.com (65.55.206.154) 56(84) bytes of data.

--- live.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

[mpenning@tsunami tests]$
Run Code Online (Sandbox Code Playgroud)

编辑

当我 ping heise.de 时我得到这个...

[mpenning@tsunami tests]$ ping heise.de
PING heise.de (193.99.144.80) 56(84) bytes of data.
64 bytes from redirector.heise.de (193.99.144.80): icmp_req=1 ttl=241 time=144 ms
64 bytes from redirector.heise.de (193.99.144.80): icmp_req=2 ttl=241 time=144 ms
64 bytes from redirector.heise.de (193.99.144.80): icmp_req=3 ttl=241 time=144 ms
64 bytes from redirector.heise.de (193.99.144.80): icmp_req=4 ttl=241 time=143 ms
^C
--- heise.de ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 143.734/144.344/144.730/0.598 ms
[mpenning@tsunami tests]$
Run Code Online (Sandbox Code Playgroud)