我用的是Ubuntu 20.04。每次我使用wget
failed: No route to host每个网站都有。这里有什么问题?
root@zubuntubase:~# ping -i 3 https://dl.winehq.org/wine-builds/winehq.key
ping: https://dl.winehq.org/wine-builds/winehq.key: Name or service not knownroot@zubuntubase:~# ping -i 3 google.com
PING google.com(ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e)) 56 data bytes
64 bytes from ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e): icmp_seq=1 ttl=52 time=99.9 ms
64 bytes from ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e): icmp_seq=2 ttl=52 time=64.0 ms
64 bytes from ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e): icmp_seq=3 ttl=52 time=76.9 ms
64 bytes from ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e): icmp_seq=4 ttl=52 time=67.7 ms
64 bytes from ord36s04-in-x0e.1e100.net (2607:f8b0:4009:800::200e): icmp_seq=5 ttl=52 time=68.1 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 12013ms
rtt min/avg/max/mdev = 64.006/75.326/99.850/12.971 msroot@zubuntubase:~# ip route
default via 192.168.1.1 dev enp0s3 proto dhcp src 192.168.1.78 metric 100
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.78
192.168.1.1 dev enp0s3 proto dhcp scope link src 192.168.1.78 metric 100
root@zubuntubase:~# ping 192.168.1.78
PING 192.168.1.78 (192.168.1.78) 56(84) bytes of data.
64 bytes from 192.168.1.78: icmp_seq=1 ttl=64 time=0.368 ms
64 bytes from 192.168.1.78: icmp_seq=2 ttl=64 time=0.079 ms
64 bytes from 192.168.1.78: icmp_seq=3 ttl=64 time=0.081 ms
64 bytes from 192.168.1.78: icmp_seq=4 ttl=64 time=0.081 ms
^C
--- 192.168.1.78 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3030ms
rtt min/avg/max/mdev = 0.079/0.152/0.368/0.124 ms
I found out my problem virtualbox is only connecting to google services.发布于 2021-04-06 14:56:11
ping只接受主机名。来自网址-维基百科:
一个典型的URL可以有表单
http://www.example.com/index.html,它表示协议(http)、主机名 (www.example.com)和文件名(index.html)。
另外,来自语法-主机名-维基百科:
主机名由与点连接的标签序列组成。例如,"en.wikipedia.org“是一个主机名。每个标签必须有1到63个字符长。整个主机名,包括分隔点,最多有253个ASCII字符。
显然,https://dl.winehq.org/wine-builds/winehq.key是URL,而google.com是主机名。这就是为什么,在您的例子中,ping与后一个完美地工作。
发布于 2021-04-11 22:55:47
我所要做的就是拔掉和插件我的路由器。
https://askubuntu.com/questions/1329449
复制相似问题