Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLAAC addrs perceived as foreign and removed during systemd-network start #32569

Open
joshuamiller01 opened this issue Apr 30, 2024 · 2 comments
Labels
ndisc/ra network RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@joshuamiller01
Copy link

joshuamiller01 commented Apr 30, 2024

systemd version the issue has been seen with

255

Used distribution

CentOS9

Linux kernel version used

5.19

CPU architectures issue was seen on

x86_64

Component

systemd-networkd

Expected behaviour you didn't see

In a server environment, I want to be able to restart networkd and (assuming the network configuration is already set up), have networkd not change anything which would break IP connectivity. Particularly, if an IP address is configured on an interface, and that's the expected IP, it should be left intact rather than deleting and re-adding it. For static IPs I've used KeepConfiguration = static to achieve this, and I can restart networkd with no impact.

I need this to work for SLAAC addrs as well; upon restart of networkd, if a valid SLAAC addr is already configured on the link, it should be left intact and not deleted and re-added.

Unexpected behaviour you saw

During restart of systemd-networkd, particularly during start, I can see that already-configured, not-expired SLAAC addrs are deleted off of the interface (observable via ip monitor). With debug enabled the logs indicate the addr is considered foreign:

eth6: Removing foreign address (configured,marked): REDACTED/64 (valid for 4w 1d 23h 59min 58s, preferred for 6d 23h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global
...
eth6: Forgetting foreign address (n/a): REDACTED/64 (valid for 4w 1d 23h 59min 58s, preferred for 6d 23h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global

Steps to reproduce the problem

Configure a SLAAC interface:

[Network]
IPv6AcceptRA = true
DHCP = no
KeepConfiguration = static

[IPv6AcceptRA]
UseAutonomousPrefix = true
UseOnLinkPrefix = true
DHCPv6Client = false

After the RA results in the interface getting a SLAAC addr, systemctl restart systemd-networkd and either via ip monitor or the debug logs, observe that networkd (temporarily) removes the addr.

Additional program output to the terminal or log subsystem illustrating the issue

No response

@joshuamiller01 joshuamiller01 added the bug 🐛 Programming errors, that need preferential fixing label Apr 30, 2024
@yuwata yuwata added RFE 🎁 Request for Enhancement, i.e. a feature request ndisc/ra and removed bug 🐛 Programming errors, that need preferential fixing labels Apr 30, 2024
@DaanDeMeyer
Copy link
Contributor

@yuwata How do you suggest implementing this? I assume we can extend KeepConfiguration to cover SLAAC as well?

@yuwata
Copy link
Member

yuwata commented May 1, 2024

@yuwata How do you suggest implementing this? I assume we can extend KeepConfiguration to cover SLAAC as well?

Yes, currently, KeepConfiguration= does not cover dynamic IPv6 addresses, SLAAC and DHCPv6.
To implement that, we need to dump internal configs to somewhere before stop, and parse it on start. Otherwise, some internal information e.g. router address or so, will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ndisc/ra network RFE 🎁 Request for Enhancement, i.e. a feature request
Development

No branches or pull requests

3 participants