How to set up IPv6 with netplan on Ubuntu 18.04?

20,183

I also have a Dedibox server from Online.net.

After searching the web I find this on twitter

Try the following :

network:                                                                       
version: 2
renderer: networkd
ethernets:
  eno1:
    dhcp4: yes
    dhcp6: no
    addresses:
    - 2001:bc8:xxx:100::/56

This worked for me and now I'm able to ping6 !

Share:
20,183

Related videos on Youtube

Eleatmelon
Author by

Eleatmelon

Updated on September 18, 2022

Comments

  • Eleatmelon
    Eleatmelon 3 months

    I purchased a dedicated server installed with Ubuntu 18.04 which was given an IPv6 Block.

    IPv6 Block Image

    I used the guide How to set up IPv6 on Ubuntu 16.04 before. Since Ubuntu 18.04 uses netplan instead of /etc/network/interfaces, the above link does not work anymore.

    Yesterday, I set up /etc/netplan/01-netcfg.yaml as following:

    network:                                                                       
    version: 2
    renderer: networkd
    ethernets:
      eno1:
        dhcp4: yes
        dhcp6: no
        addresses: ['2001:bc8:xxx:100::/56']
    

    Things worked pretty well, but today I can no longer ping any IPv6 addresses. Tried in many ways but so far I can have no good result.

    I want to know the exact way of implementing IPv6 under this circumstance, how should I do?

    • Sebastian Stark
      Sebastian Stark over 4 years
      You do not have gateway6 set, so I guess this would only allow you to ping IPv6 addresses in your local network.
    • Eleatmelon
      Eleatmelon over 4 years
      Yes, but I have not been given the gateway. The original method uses dhclient and duid, which I can't think out how to implement in netplan. Something also confuses me is that why yesterday things just worked and suddenly, everything stopped working. Nothing important changed.
    • Sebastian Stark
      Sebastian Stark over 4 years
      Then I don't understand why you're turning off dhcp. Maybe you should also turn off accept-ra to configure everything manually.
    • Michael Hampton
      Michael Hampton over 4 years
      You have to use dhclient with the specified DUID with online.net, or the subnet won't be routed to your dedicated server. I'm not sure how you configure this in netplan though. It is probably not possible (yet).