• Re: Systemd-networkd and IPv6Token in 20.04

    From Marco Moock@21:1/5 to All on Wed Nov 2 15:38:11 2022
    Am 02.11.2022 um 16:16:12 Uhr schrieb Anssi Saari:

    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*.

    Is netplan still active?
    Please show your netplan config.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to All on Wed Nov 2 16:16:12 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Wed Nov 2 16:24:45 2022
    Am 02.11.2022 um 17:19:40 Uhr schrieb Anssi Saari:

    There's also /etc/netplan/50-cloud-init.yaml with this:

    # This file is generated from information provided by the datasource.
    Changes # to it will not persist across an instance reboot. To
    disable cloud-init's # network configuration capabilities, write a
    file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled}
    network:
    ethernets:
    eth0:
    dhcp4: true
    optional: true
    version: 2

    Only place the following in /etc/netplan/50-cloud-init.yaml

    network:
    version: 2
    renderer: networkd

    Then "sudo netplan try".
    Then restart the OS and check if networkd does what you like.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Marco Moock on Wed Nov 2 17:19:40 2022
    Marco Moock <mo01@posteo.de> writes:

    Is netplan still active?
    Please show your netplan config.

    I know next to nothing about netplan so it probably has a default
    config. I guess it's active since I have a /run/systemd/network/10-netplan-eth0.network with this content:

    [Match]
    Name=eth0

    [Link]
    RequiredForOnline=no

    [Network]
    DHCP=ipv4
    LinkLocalAddressing=ipv6

    [DHCP]
    RouteMetric=100
    UseMTU=true

    Does this override whatever I have in /etc/systemd/network/eth0.network
    or? Or in fact, I don't really have anything there, except for
    IPv6Token=.

    There's also /etc/netplan/50-cloud-init.yaml with this:

    # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
    ethernets:
    eth0:
    dhcp4: true
    optional: true
    version: 2

    These seem to somewhat match what was put into /run/systemd/network/10-netplan-eth0.network.

    So what happens if I remove the netplan package(s)? Nothing works or
    things actually start working the way I expect? Assuming I have a
    complete /etc/systemd/network/eth0.network, that is.

    Can I edit that file under /run for testing and restart
    systemd-networkd?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Marco Moock on Thu Nov 3 10:37:03 2022
    Marco Moock <mo01@posteo.de> writes:

    Am 02.11.2022 um 17:19:40 Uhr schrieb Anssi Saari:

    Only place the following in /etc/netplan/50-cloud-init.yaml

    network:
    version: 2
    renderer: networkd

    Then "sudo netplan try".
    Then restart the OS and check if networkd does what you like.

    Brilliant, thanks. At least temporarily it's exactly what I needed and IPv6Token=prefixstable:myprefix works exactly as the manual says.

    I'll save the reboot for when I'm at the system and can access the
    serial console, just in case.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)