IPv6 not working on Ubuntu 16.04

13,620

Solution 1

You do not have an IPv6 address on eth0. You have only a link local fe80::10d8:ad64:c0dc:f66a/64 address that is not good to connect outside of your local network.

Remove iface eth0 inet dhcp and iface eth0 inet6 dhcp from the /etc/network/interfaces. Network Manager will receive an IPv6 address if it is available.

If you really have to use manual configuration in /etc/network/interfaces, the correct setting for IPv6 will be

 iface eth0 inet6 auto

since in many cases DHCPv6 is not used on a router. The most common is SLAAC configuration.

Solution 2

Thanks for your answers. Later on I found out that I actually didn't have a generic IPv6 connection. The only way for me to use IPv6 is by isatap. That is, IPv6-over-IPv4.

As mentioned in my question, I do have an interface (i.e. is0) that achieves this functionality, yet I don't know why it didn't work. I have to manually disable is0, create a new interface, connect to the isatap router on my campus and everything works. Later on the is0 interface would show up again but this time, it doesn't matter.

Anyway thank you for your advice.

Share:
13,620

Related videos on Youtube

Andy Ge
Author by

Andy Ge

Updated on September 18, 2022

Comments

  • Andy Ge
    Andy Ge almost 2 years

    After searching the web for weeks I give up and come to ask this question (again). I've checked this and this but my problem was not solved.

    So I have a Ubuntu 16.04 and Windows 10 (dual sys) computer and an ethernet connection that I am sure has IPv6 connection. I've tried to visit IPv6 sites on Windows system and it works great. But it won't work on Ubuntu, which is frustrating.

    Now when I run ifconfig it gives:

          eth0      Link encap:Ethernet  HWaddr 70:4d:7b:b8:4f:7d  
                    inet addr:166.111.66.250  Bcast:166.111.67.255  Mask:255.255.252.0
                    inet6 addr: fe80::10d8:ad64:c0dc:f66a/64 Scope:Link
                    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                    RX packets:26102 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:1548 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:3022053 (3.0 MB)  TX bytes:286019 (286.0 KB)
                    Interrupt:16 Memory:df200000-df220000 
    
          is0       Link encap:IPv6-in-IPv4  
                    inet6 addr: 2402:f000:1:1501:200:5efe:a66f:42fa/64 Scope:Global
                    inet6 addr: 2402:f000:1:1501:71aa:6848:6f44:8992/64 Scope:Global
                    inet6 addr: 2402:f000:1:1501::/64 Scope:Global
                    inet6 addr: fe80::200:5efe:a66f:42fa/64 Scope:Link
                    UP RUNNING NOARP  MTU:1280  Metric:1
                    RX packets:3 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1 
                    RX bytes:288 (288.0 B)  TX bytes:6416 (6.4 KB)
    
          lo        Link encap:Local Loopback  
                    inet addr:127.0.0.1  Mask:255.0.0.0
                    inet6 addr: ::1/128 Scope:Host
                    UP LOOPBACK RUNNING  MTU:65536  Metric:1
                    RX packets:530 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:530 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1 
                    RX bytes:74472 (74.4 KB)  TX bytes:74472 (74.4 KB)
    
          wlx30b49e2f621f Link encap:Ethernet  HWaddr 30:b4:9e:2f:62:1f  
                    UP BROADCAST MULTICAST  MTU:1500  Metric:1
                    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                    collisions:0 txqueuelen:1000 
                    RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    

    So I believe I have an IPv6 address(fe80::10d8:ad64:c0dc:f66a). However, when I try to access an IPv6 website, I just can't get through. I have changed /etc/network/interfaces following some links and it looks like

          auto lo
          iface lo inet loopback
          iface eth0 inet dhcp
          iface eth0 inet6 dhcp
    

    and /etc/NetworkManager/NetworkManager.conf. It looks like

          [main]
          plugins=ifupdown,keyfile,ofono
          dns=dnsmasq
    
          [ifupdown]
          managed=true
    

    Now I can run host -t AAAA google.com and it returns google.com has IPv6 address 2404:6800:4008:800::200e but when I ping6 2404:6800:4008:800::200e, there is just no reply, nor can I visit any IPv6 only website.

    I'm not sure if I messed something up since I remembered to use IPv6 before. Could someone help me with this issue? Thanks in advance.

    • Michael Hampton
      Michael Hampton over 7 years
      How did that is0 interface get there?
    • Andy Ge
      Andy Ge over 7 years
      @MichaelHampton I have no idea why the is0 interface appeared there. I haven't enabled IPv6-over-IPv4 since I already have a generic IPv6 connection. Should I disable the is0 interface? Why did it have several IPv6 addresses while none is the same as in eth0?
  • Andy Ge
    Andy Ge over 7 years
    That two lines (iface eth0 inet dhcp and iface eth0 inet6 dhcp) were added after IPv6 failed and removing them didn't work. By the way, do I have to restart my computer to make the changes effective? I might not be able to reboot the system for some days.
  • Pilot6
    Pilot6 over 7 years
    You need to restart Network Manager and probably networking service too.
  • Andy Ge
    Andy Ge over 7 years
    I tried the two methods but it still doesn't work.
  • Pilot6
    Pilot6 over 7 years
    You did not give any information. I see that you have is0 interface that has a valid IPv6 address. So it is unclear what are you trying to achieve.
  • Andy Ge
    Andy Ge over 7 years
    Well, I'm not sure what other information should I provide. I'm trying to access a VPS using its IPv6 address and copy big files to local machine etc, since IPv6 traffic is free and IPv4 traffic is not in my college. And currently I am not able to ping the IPv6 address. It either says network unreachable or just won't return anything. So to connect to my VPS using IPv6 only, I need to make the IPv6 connection working first.
  • Michael Hampton
    Michael Hampton about 7 years
    Wow. ISATAP is truly ancient. It's not recommended for new IPv6 deployments and hasn't been for almost a decade. That's why it never occurred to me. I would ask when your campus IT services will deploy native IPv6 properly.
  • Andy Ge
    Andy Ge about 7 years
    @MichaelHampton Well they already have deployed native IPv6 in many buildings except the one that I'm in, probably due to some "historic" authority issues. Anyway I'm good with ISATAP.