7

I've just created a virtual Ubuntu machine in VMWare Player but ipv6 is not working.

When I try to ping Google with

ping6 www.google.be

I get

connect: Network is unreachable

When I use Wireshark, I see that I'm not sending any Icmpv6 packet.

How can I fix it ? Does anyone have an idea ?


EDIT:

I can ping my router with ipv6. Thus, I can send Icmpv6 packets.

Is the problem related to ipv6 autoconfiguration ?

4
  • What is the output of the command: lsmod | grep -qw ipv6 && echo "IPv6 kernel driver loaded and configured." || echo "IPv6 not configured and/or driver loaded on the system."
    – Maythux
    Jul 6 '15 at 8:56
  • It is : IPv6 not configured and/or driver loaded on the system.
    – user426862
    Jul 6 '15 at 8:58
  • Did you configure a v6 address for the computer and did you confirm that the v6 route is added? Did you also confirm that this is in Bridged mode (and not NAT mode) for the guest network adapter? (It's probable auto negotiation is failing or routing is failing and needs a lot more configuration to make work)
    – Thomas Ward
    Jul 6 '15 at 11:23
  • I have no problem when the guest network adapter is in Bridged mode but ipv6 doesn't work in NAT mode. My VM hasn't any default ipv6 route. Do I have to enter it manually? Cannot ipv6 do it by itself with SLAAC?
    – user426862
    Jul 6 '15 at 11:42
6

How to know if IPv6 is configured and working on ubuntu?

Run the command:

[ -f /proc/net/if_inet6 ] && echo 'IPv6 OK' || echo 'No IPv6'

If the output is

IPv6 OK

Then your system can work with IPV6.

Now run the command:

lsmod | grep -qw ipv6 && echo "IPv6 kernel driver loaded and configured." || echo "IPv6 not configured and/or driver loaded on the system."

If the output is:

IPv6 kernel driver loaded and configured.

This means the IPV6 is configured and you can use it but if(and this is your case from comment above) the answer is

IPv6 not configured and/or driver loaded on the system.

this means IPV6 is not configured in your system, and for that you can't use IPV6 yet.

How to enable IPV6 in Ubuntu

Run this command:

sudo modprobe ipv6

Now test if this works:

lsmod | grep ipv6

The outpu should be like :

ipv6                  XXXX xX

source and more information :http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/systemcheck-kernel.html

10
  • The output is IPv6 OK. Ipv6 worked on an other virtual machine with the same os.
    – user426862
    Jul 6 '15 at 9:05
  • 10
    Running modprobe ipv6 does not modify the output of lsmod | grep ipv6.
    – user426862
    Jul 6 '15 at 9:12
  • 2
    That does not change anything.
    – user426862
    Jul 6 '15 at 9:22
  • 3
    @user426862 Did you figure it out? sudo modprobe ipv6 does not change my lsmod output either, even though it is supported by the kernel. May 20 '16 at 1:03
  • 1
    link no longer working. I have a user with this same issue
    – Dom Barker
    Mar 15 '17 at 13:53
0

Today I also encounter this issue. From the answer of Maxthux.

[ -f /proc/net/if_inet6 ] && echo 'IPv6 OK' || echo 'No IPv6' returns ok

lsmod | grep -qw ipv6 && echo "IPv6 kernel driver loaded and configured." || echo "IPv6 not configured and/or driver loaded on the system." returns IPv6 not configured and/or driver loaded on the system.

And sudo modprobe ipv6 has no influence on lsmod | grep ipv6 's empty output.

After about a whole afternoon's searching, I find a way out.

Here is the detail setup for my ipv6.

I use vps of digitalocean, and I've use only ipv4 for about a year. Recently for ios app, I've to setup ipv6 of my vps. I refer to this post, and it's a little too old, so there have some changes.

A: login the degitalocean droplets manage page, click the enable link of ipv6 on the droplet page. Here it may ask you to shutdown you droplet before you enable it. After enabled, on the networking page you can see the below pic. Here I mask the ip information.

enter image description here

B: Temporarily add ipv6 address. Login to the system with ssh, use this command:

ip -6 addr add new_IPv6_address_in_range/64 dev eth0

and check it with ip -6 addr show eth0

Here you can host -t AAAA google.com

root@xx:~# host -t AAAA google.com
google.com has IPv6 address 2404:6800:4003:c00::71

but ping6 2404:6800:4003:c00::71 will result

Connect: Network is unreachable

C: Add additional ipv6 address

sudo nano /etc/network/interfaces

add below to this file, then change address and gateway according to you droplet page.

iface eth0 inet6 static
        address primary_ipv6_address
        netmask 64
        gateway ipv6_gateway
        autoconf 0
        dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888 209.244.0.3

Then reboot you system:

After reboot, check it.

root@xx:~# host -t AAAA google.com
google.com has IPv6 address 2404:6800:4003:c00::66
root@xx:~# ping6 -c4  2404:6800:4003:c00::66
PING 2404:6800:4003:c00::66(2404:6800:4003:c00::66) 56 data bytes
64 bytes from 2404:6800:4003:c00::66: icmp_seq=1 ttl=51 time=2.08 ms
64 bytes from 2404:6800:4003:c00::66: icmp_seq=2 ttl=51 time=2.01 ms
64 bytes from 2404:6800:4003:c00::66: icmp_seq=3 ttl=51 time=1.83 ms
64 bytes from 2404:6800:4003:c00::66: icmp_seq=4 ttl=51 time=1.81 ms

--- 2404:6800:4003:c00::66 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 1.815/1.937/2.085/0.118 ms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.