💾 Archived View for ibert.tech › articles › activate-eui-64-on-ubuntu-desktop.gmi captured on 2023-09-08 at 15:51:03. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Activate EUI-64 on Ubuntu Desktop

This information is current as of Ubuntu 20.04 “Focal Fossa”.

I have repeatedly battling Ubuntu Desktop VMs to use EUI-64 addressing.

If you wondering, what that is, just a very brief reminder. In order to reach machines from the outside over IPv6, you need to (obviously) know their IPv6 address (or more precisely, one of their IPv6 addresses). There is an established standard way on how to generate IPv6 addresses (or more specifically, the host part of it) from the MAC address in a predictable manner, namely EUI-64. This makes it easy to get a valid IPv6 address of any machine (or rather, interface) if you know the IPv6 network prefix and the MAC address.

But client systems such as Ubuntu Desktop will normally try to use only random addresses to avoid tracking their activity, and not assign a permannent one, much less a predictable one. Unfortunately, this makes reaching the machine from the outside via IPv6 difficult.

So here is what I have found to be working. Quite likely, it is actually more than is needed. (This is assuming your Ubuntu Desktop VM has a single virtual Ethernet interface.)

Configure Netplan

Go to /etc/netplan and find the YAML configuration file there. Edit it to make it look like this:

network:
  version: 2
  ethernets:
    enp0s3:
      ipv6-privacy: off
      ipv6-address-generation: eui64
  renderer: NetworkManager

Obviously, you want to replace enp0s3 with the name of your Ethernet interface.

Configure Network Manager

But that appears to not be enough. Network Manager has a habit of doing what it thinks is best, so we need to tell it what we want. Run nmcli connection edit ethernet, and to the interactive prompt, enter set ipv6.addr-gen-mode 0 and, just to be sure, print ipv6.addr-gen-mode – it should come back with ipv6.addr-gen-mode: eui64 if it worked. Now save and quit and then reboot your machine.

That should be it.

Tags

linux

ubuntu

networking

eui-64

Start page