Score:0

Systemd-networkd and IPv6Token in 20.04

cn flag

I've been recently playing with IPv6 but I have a vexing problem with my little Ubuntu box. Systemd-networkd (from systemd 245.4) is supposed to understand a directive like this:

IPv6Token=prefixstable:my_prefix

where my_prefix is exactly what my router sends in its RA, 64 bits, ending in a double colon (::), verified by tcpdump. And what I wish to get out of this is an IPv6 address generated as described in RFC7217, i.e. a stable address where the lower 64 bits are not based on my MAC address.

Unfortunately systemd-networkd does not seem to agree. It accepts the directive without comment but I still get the EUI-64 address. Even if I set log level to debug there's nothing in the log about this. I've tried other forms in my_prefix but then networkd eagerly tells me it's wrong but not what would be correct and actually work.

I can work around this in a bunch of ways so not looking for that, but getting this to work would be easiest.

I looked but I haven't found any bug reports about this so I have a feeling it should work. Any ideas?

Score:0
cn flag

Turns out it was netplan interfering with my attempts to change the network configuration. So, credit to Marko Moock on Usenet, I did as he suggested:

  1. Disable netplan with this config in /etc/netplan/50-cloud-init.yaml:

    network:
      version: 2
      renderer: networkd
    
  2. Setup my .network file in /etc/systemd/network:

     [Match]
     Name=eth0
    
     [Network]
     IPv6Token=prefixstable:myprefix::
     DHCP=ipv4
    
  3. Run netplan try for a test, worked great.

  4. Reboot and it still worked.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.