You are not logged in.

#1 2020-05-02 12:18:34

EdeWolf
Member
Registered: 2016-01-06
Posts: 85

sysctl setting IPv6 private-stable addresses does not work during boot

Hello,

this being something in between networking and kernel, but since it is primarily about sysctl, I am hoping this is the proper forum.


I am trying to change my ipv6 identifier part from EUI-64 to private-stable (RFC7217). And besides finding contradicting information on the net, foremost I cannot set nic specific values using sysctl.conf at all during boot. My [boot] log reads:

systemd-sysctl[334]: Couldn't write 'd7c6:bce7:ab5d:2b6e:3c4b:7a9a:b9ed:b8b1' to 'net/ipv6/conf/eth1/stable_secret', ignoring: No such file or directory
systemd-sysctl[334]: Couldn't write '2' to 'net/ipv6/conf/eth1/addr_gen_mode', ignoring: No such file or directory

systemd-sysctl[334]: Couldn't write 'd7c6:bce7:ab5d:2b6e:3c4b:7a9a:b9ed:b8b1' to 'net/ipv6/conf/enp0s25/stable_secret', ignoring: No such file or directory
systemd-sysctl[334]: Couldn't write '2' to 'net/ipv6/conf/enp0s25/addr_gen_mode', ignoring: No such file or directory

The general settings are applied however:

net.ipv6.conf.default.addr_gen_mode = 3
net.ipv6.conf.all.addr_gen_mode = 3

are being processed by sysctl, but not the interface specific ones. However, the "default" and "all" settings don't do anything, I still get EUI-64 addresses.

However, once I've logged in, I can run the sysctl commands on the interfaces, resulting in an additional link local address, that I do not want, and the ULA is unchanged as well. Here there is not even a second address being generated.
My guess, the additional link local address is a result of changing the address mode after the addresses have initally already been assigned, but, currently I am not able to set these value early.

Hence my question.

A side note: As you may have already guessed, enp0s25 and eth1 refer to the same interface, as I am renaming the link I do not know wether systemd-sysctl is run before or after systemd-networkd. However, none seem to be available when systemd-sysctl is being processed.


And here my sysctl.d/ipv6.conf

net.ipv6.conf.default.addr_gen_mode=3
net.ipv6.conf.all.addr_gen_mode=3

net.ipv6.conf.eth1.stable_secret=d7c6:bce7:ab5d:2b6e:3c4b:7a9a:b9ed:b8b1
net.ipv6.conf.eth1.addr_gen_mode=2

net.ipv6.conf.enp0s25.stable_secret=d7c6:bce7:ab5d:2b6e:3c4b:7a9a:b9ed:b8b1
net.ipv6.conf.enp0s25.addr_gen_mode=2

I tried all settings from 1-3, this is just a snapshot. I do not mind posting the secrets, I'll create new ones once this is working.

Thanks for any input

Ede

[Edit] Of course I am talking about kernel based private-stable addressing, not dhcpd based.

Last edited by EdeWolf (2020-05-02 12:39:41)

Offline

Board footer

Powered by FluxBB