我在 Ubuntu Xenial 虚拟机上,并且被这种现象困扰:
- ping 不起作用,即使在 IP 地址上也是如此(100% 数据包丢失)
- 所有进行远程连接的命令(如 git、pip 或 curl)都可以工作
例子:
admindev@rxlemdevdatlp01:~/dir$ curl -O https://cdn.sstatic.net/Sites/unix/Img/logo.svg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8419 100 8419 0 0 18945 0 --:--:-- --:--:-- --:--:-- 18919
admindev@rxlemdevdatlp01:~/dir$ ping -c 1 cdn.sstatic.net
PING cdn.sstatic.net (151.101.1.69) 56(84) bytes of data.
--- cdn.sstatic.net ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
你如何解释这一点?就好像机器会拒绝 ICMP 回复......