在新的 CentOS VM 上,我设置了 10.xxx IP。我想在此 VM 上启用 IPv4/IPv6,但 ping google.com 不起作用,需要注意什么?
[root@vm1 ~]# ping google.com
PING google.com(ord38s31-in-x0e.1e100.net (2607:f8b0:4009:81a::200e)) 56 data bytes
^C
--- google.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4091ms
虚拟化软件:VMware VM 网络适配器类型:VMXNET3
IP 和路由详细信息如下
[root@vm1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:b5:8a:ea brd ff:ff:ff:ff:ff:ff
inet 10.85.41.126/21 brd 10.85.47.255 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
inet6 2001:db8:1:0:250:56ff:feb5:8aea/64 scope global dynamic noprefixroute
valid_lft 86366sec preferred_lft 14366sec
inet6 fe80::250:56ff:feb5:8aea/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:b5:cf:0c brd ff:ff:ff:ff:ff:ff
inet6 2001:db8:1:0:250:56ff:feb5:cf0c/64 scope global dynamic noprefixroute
valid_lft 86366sec preferred_lft 14366sec
inet6 fe80::250:56ff:feb5:cf0c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:7f:5f:45 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:7f:5f:45 brd ff:ff:ff:ff:ff:ff
路线:
[root@vm1 ~]# ip route
default via 10.85.40.1 dev ens192 proto static metric 100
10.85.40.0/21 dev ens192 proto kernel scope link src 10.85.41.126 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
[root@vm1 ~]# ip -6 route
unreachable ::/96 dev lo metric 1024 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 pref medium
2001:db8:1::/64 dev ens192 proto ra metric 100 pref medium
2001:db8:1::/64 dev ens224 proto ra metric 101 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 pref medium
fe80::/64 dev ens192 proto kernel metric 100 pref medium
fe80::/64 dev ens224 proto kernel metric 101 pref medium
default proto ra metric 100 pref medium
nexthop via fe80::52eb:1aff:fea7:392a dev ens192 weight 1
nexthop via fe80::52eb:1aff:fef1:ebe2 dev ens192 weight 1
nexthop via fe80::250:56ff:feb5:1d0e dev ens192 weight 1
default proto ra metric 101 pref medium
nexthop via fe80::250:56ff:feb5:8aea dev ens224 weight 1
nexthop via fe80::250:56ff:feb5:1d0e dev ens224 weight 1
nexthop via fe80::52eb:1aff:fea7:392a dev ens224 weight 1
nexthop via fe80::52eb:1aff:fef1:ebe2 dev ens224 weight 1
default dev lo proto ra metric 1024 pref medium
ping 4 成功,ping 6 失败
[root@vm1 ~]# ping -4 google.com
PING google.com (142.250.191.206) 56(84) bytes of data.
64 bytes from ord38s31-in-f14.1e100.net (142.250.191.206): icmp_seq=3 ttl=55 time=11.0 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 10.919/10.985/11.033/0.130 ms
[root@vm1 ~]# ping -6 google.com
PING google.com(ord37s36-in-x0e.1e100.net (2607:f8b0:4009:814::200e)) 56 data bytes
^C
--- google.com ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6181ms
这可能与 IPv6 有关,但我想在此虚拟机上启用 IPv4/IPv6