Why do I get "connect: Network is unreachable" when trying to setup IPv6 on my Ubuntu droplet?

July 21, 2018 1.9k views
IPv6 Networking Ubuntu 18.04

I followed this tutorial to enable IPv6 on an existing droplet with Ubuntu 18.04. When I try to ping6 anything, it immediately returns "connect: Network is unreachable". What could be the reason?

2 Answers

You might have made a mistake in the configs but without seeing the config files nobody here will be able to help you troubleshoot this issue. Follow the guide again and check for errors. Otherwise just spawn a new droplet with enabled v6 from the start and move ur stuff(if any) over to it.

  • I did everything exactly as it was said in the tutorial. Here's the config. It's the only one I changed.

    GNU nano 2.9.3                     /etc/network/interfaces                               
    
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    source /etc/network/interfaces.d/*
    
    iface eth0 inet6 static
            address 2604:a880:2:d0::2129:5001
            netmask 64
            gateway 2604:a880:2:d0::1
            autoconf 0
            dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888 209.244.0.3
    
    

Assuming that you've used the provided v6 ips and rebooted the system after, i'd say that this might be a formatting issue and you could use something like dos2unix to fix it or copy the contents of the file to a text editor locally and then remove the /etc/network/interfaces file(do a back'up of the file prior to that if you haven't already) and create it again and type in the text instead of copy/paste. This method worked for me in the past when i've had formatting issues(Well assuming that's the actual issue).

What does running 'ip -c a' show?

Also you might consider running '/etc/init.d/networking restart' instead of rebooting the server.

  • Thank you for the answer! Unfortunately, I've already followed your original advice and created a new droplet instead of the buggy one :)

    Btw, I checked the config in this new droplet and there are no ipv6 settings in /etc/network/interfaces, despite ipv6 working as intended. May be I should've used a different config file in the old droplet?

    I also doubt it was a formatting issue, because I tried to type it in without any formatting, and reboot didn't change anything.

    Thanks anyway, I'll keep in mind the other options you suggested.

Have another answer? Share your knowledge.