[systemd-devel] systemd-networkd, IPv6PrivacyExtensions=kernel, sysctl and devicenames

Ede Wolf listac at nebelschwaden.de
Fri May 22 07:38:23 UTC 2020


Hello,

I am trying to enable temporary and/or stable addresses for a link and 
am most likely running into troubles with the device naming. However, I 
do not change any network name myself, neither in udev nor as part or a 
link file, it's just the standard system settings (from Arch, in case 
that matters).

my sysctl.conf (both ens3 and eth0 refer to the same interface):


net.ipv6.conf.ens3.addr_gen_mode = 2
net.ipv6.conf.ens3.use_tempaddr = 2

net.ipv6.conf.eth0.addr_gen_mode = 2
net.ipv6.conf.eth0.use_tempaddr = 2


And the logs read:

journalctl -b0 | grep -E 'sysctl|ens3|eth0'
08:56:46 systemd[263]: systemd-sysctl.service: Executing: 
/usr/lib/systemd/systemd-sysctl
08:56:46 systemd-sysctl[263]: Couldn't write '2' to 
'net/ipv6/conf/ens3/addr_gen_mode', ignoring: No such file or directory
08:56:46 systemd-sysctl[263]: Couldn't write '2' to 
'net/ipv6/conf/ens3/use_tempaddr', ignoring: No such file or directory
08:56:47 kernel: virtio_net virtio0 ens3: renamed from eth0
08:56:47 systemd[1]: sys-subsystem-net-devices-ens3.device: Changed dead 
-> plugged
08:56:47 systemd[1]: 
sys-devices-pci0000:00-0000:00:03.0-virtio0-net-ens3.device: Changed 
dead -> plugged
08:56:51 systemd-networkd[459]: ens3: Interface name change detected, 
ens3 has been renamed to eth0.
08:56:51 systemd-networkd[459]: eth0: Interface name change detected, 
eth0 has been renamed to ens3.
08:56:51 systemd-networkd[459]: ens3: IPv6 successfully enabled
08:56:51 systemd-networkd[459]: ens3: Link UP
08:56:51 systemd-networkd[459]: ens3: Gained carrier
...


As it appears to me, the eth0 settings from sysctl.conf have been 
accepted - at least no errors are logged in this regard -, but are lost, 
because the interface got renamed afterwards. The ens3 interface was not 
yet known at time of invoking systemd-sysctl, and therefore we get the 
errors. That in turn means, the settings are not being applied.

To make things worse, in sysctl.conf I've additionally set:

net.ipv6.conf.default.stable_secret=<some hex poem>
net.ipv6.conf.default.addr_gen_mode=2
net.ipv6.conf.all.addr_gen_mode=2


Which results in all IP address having a stable privacy scope link, 
_execpt_ of course ens3. The one that would be by far most important.

What am I missing here? And insight is highly appreciated

Thanks

Ede


More information about the systemd-devel mailing list