network: make prefixstable mode of IPv6Token= can be applied any received prefixes#16618
Conversation
…-mode This is being implemented for any prefix in systemd PR#16618: systemd/systemd#16618
|
@yuwata any chance of getting this merged? |
This allows to statically configure the IPv6 host ID (low 64 bits) when auto-generated IPv6 addressing is used (i.e. DHCPv6 stateless, SLAAC). It introduces one new YAML key in the schema: ipv6-address-token-id. Fixes LP: #1737976 Commits: * Implement ipv6-address-token-id key (LP: #1737976) * Add integration tests for ipv6-address-token-id * networkd: update comment about stable-privacy ipv6-address-generation-mode This is being implemented for any prefix in systemd PR#16618: systemd/systemd#16618 * rename ipv6-address-token from ipv6-address-token-id * avoid unrelated whitespace changes Co-authored-by: Łukasz Zemczak <[email protected]>
8eb101d to
4430c0d
Compare
4430c0d to
30040c8
Compare
keszybz
left a comment
There was a problem hiding this comment.
Looks nice, some minor comments.
man/systemd.network.xml
Outdated
| with a colon (<literal>:</literal>). If an IPv6 address is specified, then an interface | ||
| identifier is generated only when a prefix received in an RA message matches the supplied | ||
| address.</para> | ||
| <para>If no address generation mode is specified (which is the default), or a receivd |
man/systemd.network.xml
Outdated
| mode, then the EUI-64 algorithm will be used to form an interface identifier for that | ||
| prefix. This mode is also SLAAC, but with a potentially stable interface identifier which | ||
| does not directly map to the interface's hardware address.</para> | ||
| <para>Note that the <literal>prefixstable</literal> algorithm uses both the interface's |
There was a problem hiding this comment.
"interface's name" → "interface name"
man/systemd.network.xml
Outdated
| prefix. This mode is also SLAAC, but with a potentially stable interface identifier which | ||
| does not directly map to the interface's hardware address.</para> | ||
| <para>Note that the <literal>prefixstable</literal> algorithm uses both the interface's | ||
| name and MAC address in the hash used to compute the interface identifier, so if either of |
There was a problem hiding this comment.
in the hash → as input to the hash
src/network/networkd-ndisc.c
Outdated
| else { | ||
| if (*p == ':') | ||
| p++; | ||
| else |
There was a problem hiding this comment.
Hmm, so if I specify "IPv6Token=prefixstableasdfasdfasdf" then it will be interpreted as "prefixstable". I think this needs to check that !*p here.
There was a problem hiding this comment.
This does not a separate. It can be added there itself. Hence it is reductant
30040c8 to
68248f4
Compare
|
@keszybz Thank you for the review. Updated. Now all your comments are addressed. Setting the green label. |
|
LGTM. |
|
Trying to use sytemd-249 and setting IPv6Token=prefixstable. |
|
@disich I guess |
|
@yuwata |
|
@disich Right. The |
|
@yuwata : Thanks, Agree thats its not about RFC compliance. Its about how stable my machine-id will be if we migrate to another linux distribution. We wanted to have the stable-privacy address to be constant even if we change distribution. So I was planning to hash the serial number of our embedded device (or something similar) and specify it as a stable-secret. A new ehancement in systemd-networkd which lets me specify stable secret for global ipv6 address would be awesome enhancement. |
|
@disich Yeah. As you can see, the address is generated with
So, keeping the same machine-ID and interface name should be basically enough when changing distribution. |
|
@yuwata Appreciate you looking into. I think this is good for most but not for systems which deploy redundancy. |
The relevant systemd pull request has long been merged, so add support for IPv6Token=prefixstable in the networkd generator. systemd/systemd#16618
The relevant systemd pull request has long been merged, so add support for IPv6Token=prefixstable in the networkd generator. systemd/systemd#16618
The relevant systemd pull request has long been merged, so add support for IPv6Token=prefixstable in the networkd generator. systemd/systemd#16618
The relevant systemd pull request has long been merged, so add support for IPv6Token=prefixstable in the networkd generator. systemd/systemd#16618
Closes #4625.
cc @ssahani and @kpfleming.