0

Refer to https://netplan.io/reference. There is a key "ipv6-address-generation" with possible values: eui64 or stable-privacy.

However when I tried to add that key on /etc/netplan/50-cloud-init.yaml

network:
    ethernets:
        ens3:
            dhcp6: false
            addresses: ["2003:b::/64"]
            ipv6-address-generation: eui64

There is an error:

root@ubuntu:~# netplan apply 
/etc/netplan/50-cloud-init.yaml:6:13: Error in network definition: unknown key 'ipv6-address-generation'
            ipv6-address-generation: eui64
            ^

Update 1: I tried to install version 0.99 at https://launchpad.net/ubuntu/+source/netplan.io/0.99-0ubuntu3~18.04.1/+build/19265900.

I use this configuration:

network:
    ethernets:
        ens3:
            dhcp6: false
            addresses: ["2003:b::/64"]
            ipv6-address-generation: eui64
    renderer: NetworkManager

The error has fixed, but there is no effect, I still did not get eui64 format on my ipv6:

# ip a show ens3
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 0c:cb:3b:fd:c3:00 brd ff:ff:ff:ff:ff:ff
    inet6 2003:b::/64 scope global tentative noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::ecb:3bff:fefd:c300/64 scope link tentative 
       valid_lft forever preferred_lft forever

, not eui64 format.

Anyone can help me to configure ipv6 with eui-64 interface id on ubuntu 18.04?

3

The ipv6-address-generation key was introduced in netplan 0.99 but is currently only available for the NetworkManager backend/renderer (which needs to be noted in the documentation...).

If you have NetworkManager installed, you can try configuring renderer: NetworkManager. Also, it should have thrown an error if used with the default networkd backend/renderer...

| improve this answer | |
  • I added a note to the upstream documentation, for future reference: github.com/CanonicalLtd/netplan/commit/… – Lukas Maerdian May 11 at 14:07
  • I tried to use "renderer: NetworkManager", there is no error but, still does not get ipv6 eui format. See update of my question. – xdnroot May 15 at 3:48
  • Hi @xdnroot. In the updated YAML config you posted, the renderer: NetworkManager needs to be indented to the same level as ethernets: (i.e. 4 spaces in your case) – it needs to be a child of the network: key. I confirmed this works on my system: paste.ubuntu.com/p/V3yQ3XNHJ6 – Lukas Maerdian May 15 at 9:00
  • Thanks @Lukas Maerdian, I have configured like you said and the result also same with yours. But, look up my update or your [paste.ubuntu.com/p/V3yQ3XNHJ6](paste.ubuntu.com/p/V3yQ3XNHJ6). Why on the ipv6 global scope, there is only seen the ipv6 prefix, that is 2003:b::/64. not 2003:b::xx:xx:xx/64, which is xx:xx:xx is interface id with eui64 format. – xdnroot May 15 at 23:22
  • Hi @xdnroot, the ipv6-address-generation: config is applied to auto-generated addresses only (SLAAC/DHCPv6). So if you enable dhcp6: true, you should be able to get a eui64 interface id on the global scope, but with a prefix provided by the SLAAC/DHCP – not the static address/prefix you defined... Do I understand correctly that you're trying to have a static prefix (2003:b::/64) with eui64 interface id? Unfortunately I think this is currently not possible with netplan and I am not aware of how/if this could be setup with networkd/NetworkManager directly, either. – Lukas Maerdian May 18 at 9:43
0

The ipv6-address-generation key is introduced in netplan 0.99 which is currently in bionic-proposed for SRU. This should reach bionic-updates in within the week. You can track the status at https://launchpad.net/bugs/1871825.

| improve this answer | |

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.