Ubuntu doesn't pick up ipv6 config

Hi all,

So I’m trying to setup ipv6 for my droplet following this instruction.

I’ve enabled ipv6 in DO panel after the creation and added following lines to the /etc/networking/interfaces:

# The primary network interface
auto eth0 
iface eth0 inet static
        address Y.Y.Y.Y
        gateway Y.Y.Y.1
        up ip addr add dev eth0

iface eth0 inet6 static
        address 2a03:XXX:XXX:XXX:XXX:XXX:2001
        netmask 64
        gateway 2a03:XXX:XXX:XXX:XXX:1
        autoconf 0
        dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888

But after reboot system picks up only ipv4 settings and link-local ipv6 address

root@XXX:~# ip -6 a show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::8080:e2ff:fedb:ae11/64 scope link 
       valid_lft forever preferred_lft forever

At the same time, I can set up ipv6 manually using, say, ip command.

Can you please point what do I missing?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Ubuntu 18.04 has switched to netplan, the current guide hasn’t been updated yet. Follow this steps:

  1. (sudo) vim /etc/netplan/50-cloud-init.yaml
  2. In “addresses” section add
  • your_ipv6_address/64
  1. Below “gateway4:…” section add a new section “gateway6: your_ipv6_gateway”
  2. In “nameservers” -> “addresses” section add
  • 2001:4860:4860::8844
  • 2001:4860:4860::8888
  1. (sudo) netplan apply
  2. ping6 2001:4860:4860::8888

That guide is outdated (for ubuntu, still works for debian)