11 Replies Latest reply on Sep 15, 2020 11:54 PM by dompan

    ping6 (ping IPv6) does not work inside CentOS 7 virtual machine

    dompan Novice

      Hello,

       

      I setup CentOS 7 in an virtual machine of VMware workstation with NAT.

       

      In IPv4, everything works (including ping to other addresses, Internet access etc…). In VMware Virtual Network Editor, for NAT, in IPv4,

      the IP range and default gateway are automatically provided. But for IPv6, only the prefix is provided fd15:4ba5:5a2b:1008::/64, there is no indication of gateway.

      So I assign to the server the static IP fd15:4ba5:5a2b:1008::6/64, but I do not know how to fill the IPv6 default gateway (IPV6_DEFAULTGW directive).

      And I cannot ping6 to external IPv6 address like ipv6.google.com.

       

       

      [code]

      #cat /etc/sysconfig/network-scripts/Ifcfg-eth0

      TYPE="Ethernet"

      PROXY_METHOD="none"

      BROWSER_ONLY="no"

      BOOTPROTO="none"

      DEFROUTE="yes"

      IPV4_FAILURE_FATAL="no"

      IPV6INIT="yes"

      IPV6_AUTOCONF="no"

      IPV6ADDR="fd15:4ba5:5a2b:1008::6/64"

      #IPV6_DEFAULTGW="fd15:4ba5:5a2b:1008::2"  # don't know how to fill the value

      IPV6_DEFROUTE="yes"

      IPV6_FAILURE_FATAL="no"

      IPV6_ADDR_GEN_MODE="stable-privacy"

      NAME="ens33"

      UUID="583c9e4b-5df6-48c6-acf2-4f04a2470d53"

      DEVICE="eth0"

      ONBOOT="yes"

      IPADDR="192.168.145.6"

      PREFIX="24"

      GATEWAY="192.168.145.2"

      DNS1="8.8.8.8"

      DNS2="1.1.1.1"

      IPV6_PRIVACY="no"

      [/code]

       

       

      [code]

      # 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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

          link/ether 00:0c:29:4c:b3:e6 brd ff:ff:ff:ff:ff:ff

          inet 192.168.145.6/24 brd 192.168.145.255 scope global noprefixroute eth0

             valid_lft forever preferred_lft forever

          inet6 fd15:4ba5:5a2b:1008::6/64 scope global noprefixroute

             valid_lft forever preferred_lft forever

          inet6 fe80::8318:1893:112e:ae94/64 scope link noprefixroute

             valid_lft forever preferred_lft forever

      [/code]

       

       

      [code]

      # ip route show

      default via 192.168.145.2 dev eth0 proto static metric 100

      192.168.145.0/24 dev eth0 proto kernel scope link src 192.168.145.6 metric 100

      [/code]

       

       

      [code]

      # cat /etc/resolv.conf

      nameserver 8.8.8.8

      nameserver 1.1.1.1

      Without IPV6_DEFAULTGW directive:

      [/code]

       

       

      [code]

      # ping6 ipv6.google.com

      connect: Network is unreachable

       

       

      With IPV6_DEFAULTGW directive:

      # ping6 ipv6.google.com

      PING fd15:4ba5:5a2b:1008::2(fd15:4ba5:5a2b:1008::2) 56 data bytes

      From fd15:4ba5:5a2b:1008::6 icmp_seq=1 Destination unreachable: Address unreachable

      [/code]

       

       

      - I can ping6 another VMware machine which has ipv6="fd15:4ba5:5a2b:1008::7

      - Of course I cannot ping6 the Ipv6 gateway with its wrong value fd15:4ba5:5a2b:1008::2.

       

       

      My question is how to be able to do "ping6 ipv6.google.com". I assume I have to fill the IPV6_DEFAULTGW directive but with what value?

      Is it possible from the prefix to deduce the gateway?

       

       

      Many thanks in advance.

        • 1. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
          yanw Hot Shot
          VMware Employees

          Actually VMware Workstation provides the stateless IPv6 configuration to VM and no need to config the gateway.  Would you please make sure you can ping  "ping6 ipv6.google.com" on your host?

          • 2. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
            dompan Novice

            Thank you for your response.

            I cannot ping6, following are the results :

             

            # ping6 ipv6.google.com

            connect: Network is unreachable

             

            # ping ipv6.google.com

            ping: ipv6.google.com: Name or service not known

             

            # ping -6 ipv6.google.com

            connect: Network is unreachable

            • 3. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
              yanw Hot Shot
              VMware Employees

              VM's IPv6 connection depends on your host network. If your host can not connect to the external IPv6 address, VM also can not

              • 4. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                dompan Novice

                Oh thank you, you pointed out the right problem.

                 

                With my current Windows host, the ping -6 (Windows) or ping6 (CentOS 7 in virtual manchine) both work correctly.

                I have another Windows host, the ping -6 (Windows) or ping6 (CentOS 7 in virtual manchine) both do no work.

                 

                So now I have to investigate why the ping.exe -6 does not work on my current Windows installation.

                • 5. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                  dompan Novice

                  Hello,

                   

                  Unfortunately I have to reopen the question because the problem is still alive.

                  I found thanks to suggestion to check my Windows host. IPv6 functions are all OK except for the ping -6.

                  In fact this is due to Malwarebytes Web Protection function. By deactivating it, ping -6 now works on my Windows host,

                  but the problem is still alive inside my CentOS 7 virtual machine.

                   

                  # ping6 ipv6.google.com

                  connect: Network is unreachable

                   

                  Same problem for any other IPv6 address, by name or by IP value.

                  So is it a route problem? There is no default gateway needed in IPv6 for VMware as said, so what is the problem?

                  How to solve it?

                   

                  Thank you.

                  • 6. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                    yanw Hot Shot
                    VMware Employees

                    Can CentOS VM ping with your host ipv6 address in NAT mode? If the CentOS7 VM works in Bridge mode, is that possible to ping the ipv6.google.com?

                    • 7. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                      dompan Novice

                      In NAT mode (current and default mode of my virtual machine): I can ping6 my Windows host IPv6 addresses

                      fd15:4ba5:5a2b:1008:c8fe:1cca:bb95:2f9a

                      fd15:4ba5:5a2b:1008:64b2:acac:ae72:2798

                      (I found these 2 addresses by using ipconfig /all, and look at the values given at Ethernet VMware Network Adapter VMnet8). Is it OK?

                      Note: th IPv6 prefix given by VMware Virtual Network editor is: fd15:4ba5:5a2b:1008::/64

                       

                      In Bridged mode (a mode I don't use and I do not understand much): I just edit the machine configuration, change to Bridged mode, than reboot the machine,

                      without changing (because no knowledge) anything in the network configuration. Result: nothing works, nor IPv4 nor IPv6. So I switch back to NAT mode

                      which is the default mode suggested by VMware at machine creation, and I am more used to this mode.

                       

                      Thank you.

                      • 8. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                        yanw Hot Shot
                        VMware Employees

                        I think the physical network adapter on your windows host also has a valide IPv6 address, right? I mean ipv6 ping to that physical network adapter (not vmnet8). Would you please paste the output of "ipconfig /all" on your windows host?

                        • 9. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                          dompan Novice

                          I ping the 2 public IPv6 of my Windows host from my virtual machine without success:

                           

                          # ping6 2a01:cb1d:303:e800:a4f5:e771:16dd:XXXX

                          connect: Network is unreachable

                          # ping6 2a01:cb1d:303:e800:3d68:11aa:dd68:YYYY

                          connect: Network is unreachable

                           

                          Following is the output of my ipconfig /all:

                           

                          15/09/2020 10:25:38,46

                          >ipconfig.exe  /all       

                           

                          Configuration IP de Windows

                           

                             Nom de l'hôte . . . . . . . . . . : XXXX

                             Suffixe DNS principal . . . . . . :

                             Type de noeud. . . . . . . . . .  : Hybride

                             Routage IP activé . . . . . . . . : Non

                             Proxy WINS activé . . . . . . . . : Non

                             Liste de recherche du suffixe DNS.: home

                           

                          Carte Ethernet Ethernet :

                           

                             Suffixe DNS propre à la connexion. . . : home

                             Description. . . . . . . . . . . . . . : Realtek PCIe GbE Family Controller

                             Adresse physique . . . . . . . . . . . : B4-A9-FC-5F-D3-A4

                             DHCP activé. . . . . . . . . . . . . . : Oui

                             Configuration automatique activée. . . : Oui

                             Adresse IPv6. . . . . . . . . . . . . .: 2a01:cb1d:303:e800:a4f5:e771:16dd:XXXX(préféré)

                             Adresse IPv6 temporaire . . . . . . . .: 2a01:cb1d:303:e800:3d68:11aa:dd68:YYYY(préféré)

                             Adresse IPv6 de liaison locale. . . . .: fe80::a4f5:e771:16dd:1c24%6(préféré)

                             Adresse IPv4. . . . . . . . . . . . . .: 192.168.1.14(préféré)

                             Masque de sous-réseau. . . . . . . . . : 255.255.255.0

                             Bail obtenu. . . . . . . . . . . . . . : lundi 14 septembre 2020 18:08:52

                             Bail expirant. . . . . . . . . . . . . : mercredi 16 septembre 2020 06:13:33

                             Passerelle par défaut. . . . . . . . . : fe80::42f2:1ff:fe67:c9c%6

                                                           192.168.1.1

                             Serveur DHCP . . . . . . . . . . . . . : 192.168.1.1

                             IAID DHCPv6 . . . . . . . . . . . : 95726076

                             DUID de client DHCPv6. . . . . . . . : 00-01-00-01-25-9C-C7-26-B4-A9-FC-5F-D3-A4

                             Serveurs DNS. . .  . . . . . . . . . . : fe80::42f2:1ff:fe67:c9c%6

                                                           8.8.8.8

                                                           8.8.4.4

                             NetBIOS sur Tcpip. . . . . . . . . . . : Activé

                             Liste de recherche de suffixes DNS propres à la connexion :

                                                           home

                           

                          Carte Ethernet Ethernet 3 :

                           

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter

                             Adresse physique . . . . . . . . . . . : 0A-00-27-00-00-12

                             DHCP activé. . . . . . . . . . . . . . : Non

                             Configuration automatique activée. . . : Oui

                             Adresse IPv6 de liaison locale. . . . .: fe80::c987:e623:20cd:a2d2%18(préféré)

                             Adresse IPv4. . . . . . . . . . . . . .: 192.168.56.1(préféré)

                             Masque de sous-réseau. . . . . . . . . : 255.255.255.0

                             Passerelle par défaut. . . . . . . . . :

                             IAID DHCPv6 . . . . . . . . . . . : 470417447

                             DUID de client DHCPv6. . . . . . . . : 00-01-00-01-25-9C-C7-26-B4-A9-FC-5F-D3-A4

                             Serveurs DNS. . .  . . . . . . . . . . : fec0:0:0:ffff::1%1

                                                           fec0:0:0:ffff::2%1

                                                           fec0:0:0:ffff::3%1

                             NetBIOS sur Tcpip. . . . . . . . . . . : Activé

                           

                          Carte réseau sans fil Connexion au réseau local* 1 :

                           

                             Statut du média. . . . . . . . . . . . : Média déconnecté

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter

                             Adresse physique . . . . . . . . . . . : C8-09-A8-1C-F5-76

                             DHCP activé. . . . . . . . . . . . . . : Oui

                             Configuration automatique activée. . . : Oui

                           

                          Carte réseau sans fil Connexion au réseau local* 2 :

                           

                             Statut du média. . . . . . . . . . . . : Média déconnecté

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2

                             Adresse physique . . . . . . . . . . . : CA-09-A8-1C-F5-75

                             DHCP activé. . . . . . . . . . . . . . : Non

                             Configuration automatique activée. . . : Oui

                           

                          Carte Ethernet Ethernet 2 :

                           

                             Statut du média. . . . . . . . . . . . : Média déconnecté

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : AnchorFree TAP-Windows Adapter V9

                             Adresse physique . . . . . . . . . . . : 00-FF-71-4E-A6-F9

                             DHCP activé. . . . . . . . . . . . . . : Oui

                             Configuration automatique activée. . . : Oui

                           

                          Carte Ethernet VMware Network Adapter VMnet1 :

                           

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet1

                             Adresse physique . . . . . . . . . . . : 00-50-56-C0-00-01

                             DHCP activé. . . . . . . . . . . . . . : Non

                             Configuration automatique activée. . . : Oui

                             Adresse IPv6 de liaison locale. . . . .: fe80::a819:f389:a081:7155%22(préféré)

                             Adresse IPv4. . . . . . . . . . . . . .: 192.168.11.1(préféré)

                             Masque de sous-réseau. . . . . . . . . : 255.255.255.0

                             Passerelle par défaut. . . . . . . . . :

                             IAID DHCPv6 . . . . . . . . . . . : 117461078

                             DUID de client DHCPv6. . . . . . . . : 00-01-00-01-25-9C-C7-26-B4-A9-FC-5F-D3-A4

                             Serveurs DNS. . .  . . . . . . . . . . : fec0:0:0:ffff::1%1

                                                           fec0:0:0:ffff::2%1

                                                           fec0:0:0:ffff::3%1

                             NetBIOS sur Tcpip. . . . . . . . . . . : Activé

                           

                          Carte Ethernet VMware Network Adapter VMnet8 :

                           

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8

                             Adresse physique . . . . . . . . . . . : 00-50-56-C0-00-08

                             DHCP activé. . . . . . . . . . . . . . : Non

                             Configuration automatique activée. . . : Oui

                             Adresse IPv6. . . . . . . . . . . . . .: fd15:4ba5:5a2b:1008:c8fe:1cca:bb95:2f9a(préféré)

                             Adresse IPv6 temporaire . . . . . . . .: fd15:4ba5:5a2b:1008:64b2:acac:ae72:2798(préféré)

                             Adresse IPv6 temporaire . . . . . . . .: fd15:4ba5:5a2b:1008:a92f:19e:f8c3:856e(déprécié)

                             Adresse IPv6 temporaire . . . . . . . .: fd15:4ba5:5a2b:1008:e1e4:34ec:634d:eebc(déprécié)

                             Adresse IPv6 de liaison locale. . . . .: fe80::c8fe:1cca:bb95:2f9a%20(préféré)

                             Adresse IPv4. . . . . . . . . . . . . .: 192.168.145.1(préféré)

                             Masque de sous-réseau. . . . . . . . . : 255.255.255.0

                             Passerelle par défaut. . . . . . . . . : fe80::250:56ff:fec0:2222%20

                             IAID DHCPv6 . . . . . . . . . . . : 318787670

                             DUID de client DHCPv6. . . . . . . . : 00-01-00-01-25-9C-C7-26-B4-A9-FC-5F-D3-A4

                             Serveurs DNS. . .  . . . . . . . . . . : fec0:0:0:ffff::1%1

                                                           fec0:0:0:ffff::2%1

                                                           fec0:0:0:ffff::3%1

                             NetBIOS sur Tcpip. . . . . . . . . . . : Activé

                           

                          Carte réseau sans fil Wi-Fi :

                           

                             Statut du média. . . . . . . . . . . . : Média déconnecté

                             Suffixe DNS propre à la connexion. . . : home

                             Description. . . . . . . . . . . . . . : Intel(R) Wi-Fi 6 AX201 160MHz

                             Adresse physique . . . . . . . . . . . : C8-09-A8-1C-F5-75

                             DHCP activé. . . . . . . . . . . . . . : Oui

                             Configuration automatique activée. . . : Oui

                           

                          Carte Ethernet Connexion réseau Bluetooth :

                           

                             Statut du média. . . . . . . . . . . . : Média déconnecté

                             Suffixe DNS propre à la connexion. . . :

                             Description. . . . . . . . . . . . . . : Bluetooth Device (Personal Area Network)

                             Adresse physique . . . . . . . . . . . : C8-09-A8-1C-F5-79

                             DHCP activé. . . . . . . . . . . . . . : Oui

                             Configuration automatique activée. . . : Oui

                           

                          15/09/2020 10:25:38,51

                          ---

                           

                          Thank you.

                          • 10. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                            yanw Hot Shot
                            VMware Employees

                            Seems you have also installed virtuabox on your windows host? Would you please remove the virtualbox and have a another try? And also make sure there is not any third-party software that would cause the network issue. Ideally the ipv6 ping from VM to Host physical adapter should work

                            • 11. Re: ping6 (ping IPv6) does not work inside CentOS 7 virtual machine
                              dompan Novice

                              I uninstalled Oracle Virtual Box and tried again without success :-(.

                               

                              I searched a lot and there are few articles with similar environment. Either I need an IPv6 gateway (not provided by VMware), or an IPv6 address that is routeable (how to set it up?).

                              Currently I only have local IPv6 addresses (fd15:4ba5:5a2b:1008::6/64 and fe80::8318:1893:112e:ae94/64).

                               

                              # 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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

                                  link/ether 00:0c:29:4c:b3:e6 brd ff:ff:ff:ff:ff:ff

                                  inet 192.168.145.6/24 brd 192.168.145.255 scope global noprefixroute eth0

                                     valid_lft forever preferred_lft forever

                                  inet6 fd15:4ba5:5a2b:1008::6/64 scope global noprefixroute

                                     valid_lft forever preferred_lft forever

                                  inet6 fe80::8318:1893:112e:ae94/64 scope link noprefixroute

                                     valid_lft forever preferred_lft forever

                               

                               

                              From IPv6 routing table, it seems that I can not go out anywhere:

                              # ip -6 route

                              unreachable ::/96 dev lo metric 1024 error -113 pref medium

                              unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium

                              unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium

                              unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium

                              fd15:4ba5:5a2b:1008::/64 dev eth0 proto kernel metric 100 pref medium

                              fe80::/64 dev eth0 proto kernel metric 100 pref medium

                               

                               

                              This article talks about necessity of an IPv6 gateway:

                              https://askubuntu.com/questions/645008/ipv6-connect-network-is-unreachable

                               

                               

                              This article indicates that I need public routable IPv6 address:

                              https://unix.stackexchange.com/questions/293800/i-dont-get-ipv6-why-cannot-i-ping-ipv6-google-com/293823

                              "But even currently you only have a link-local address so that will not work. You need a IPv6 address that is routable to be able to ping outwards."

                               

                               

                              So am I still stuck !

                               

                              Thank you for your help.