为了进一步说明,我在 VirtualBox 上使用桥接适配器,并将其设置为允许虚拟机(它也使用正确的适配器)。
这是运行命令后终端的响应内容。
ping google.com
PING google.com(kul08s08-in-x0e.1e100.net (2404:6800:4001:80d::200e)) 56 data bytes
From 2001:f40:901:fdf3:7e8b:caff:fe3e:ee18 (2001:f40:901:fdf3:7e8b:caff:fe3e:ee18) icmp_seq=1 Destination unreachable: No route
From 2001:f40:901:fdf3:7e8b:caff:fe3e:ee18 (2001:f40:901:fdf3:7e8b:caff:fe3e:ee18) icmp_seq=2 Destination unreachable: No route
From 2001:f40:901:fdf3:7e8b:caff:fe3e:ee18 (2001:f40:901:fdf3:7e8b:caff:fe3e:ee18) icmp_seq=3 Destination unreachable: No route
From 2001:f40:901:fdf3:7e8b:caff:fe3e:ee18 (2001:f40:901:fdf3:7e8b:caff:fe3e:ee18) icmp_seq=4 Destination unreachable: No route
From 2001:f40:901:fdf3:7e8b:caff:fe3e:ee18 (2001:f40:901:fdf3:7e8b:caff:fe3e:ee18) icmp_seq=5 Destination unreachable: No route
^C
--- google.com ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 4067ms
答案1
看起来您正在使用 IP6 地址进行 PING。尝试使用ping -4 google.com
替代。