You are not logged in.

#1 2017-03-20 08:10:35

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 190
Website

systemd-networkd won't update IPv6 address after prefix change

Hi all,

Experimenting with IPv6.  Set up systemd-networkd to use DHCP for IPv4 and stateless config for IPv6.

My OpenWRT router gets a global IPv6 address and announces the prefix to my LAN.  When I boot my Arch PC, I get a global IPv6 address and all is good.

However my ISP changes the IPv6 prefix I get every day or so (especially if I reboot my modem) but my PC does not pick up the new address so all my IPv6 traffic just stops when the global IP becomes invalid.

In order to fix this, I have to run "systemctl restart systemd-networkd" and then in under a second it picks up the new global IPv6 prefix and everything returns to normal.

Is this a bug in systemd-networkd, or in the way the kernel handles IPv6 prefix announcements from routers?

If anyone is using IPv6 with another configuration method (netctl etc.) do you see the same issue, or is it specific to systemd-networkd?

Offline

#2 2017-03-22 03:14:51

severach
Member
Registered: 2015-05-23
Posts: 192

Re: systemd-networkd won't update IPv6 address after prefix change

I use NetworkManager. My provided prefix doesn't change often enough to test. Here are some ideas.

Monitoring with tcpdump or WireShark should narrow down who is at fault for why a prefix update isn't propogating. Forcing a new prefix by rebooting your modem would make this test fast and easy.

Problems with Linux can be tested by adding a Windows computer and see if that handles updates better.

Offline

#3 2017-03-23 02:24:43

Malvineous
Member
From: Brisbane, Australia
Registered: 2011-02-03
Posts: 190
Website

Re: systemd-networkd won't update IPv6 address after prefix change

Thanks for the suggestions.  tcpdump should show the prefix as being advertised, because restarting systemd-networkd picks up the new prefix immediately, so it seems the network traffic is correct.

The problem seems to be that while the network interface is active, the router advertisements being received are not being acted upon.  I'm not sure whether this is the job of systemd-networkd or the Linux kernel itself.

I figure if someone is using an alternative to systemd-networkd and they get an updated IP, that would mean the problem lies with systemd-networkd.  However if the alternative also fails to update the IPv6 address, then that would point at the problem being with the kernel itself.

Adding a Windows machine would likely work fine since the router is indeed advertising the correct prefix (which is why restarting systemd-networkd immediately fixes the problem.)

What happens if you manually remove your IPv6 address?  Does it get added back again within a few minutes as a result of the router advertisements, or do you have to restart the network manager to get the address restored?

Offline

#4 2018-09-13 09:27:18

krist
Member
Registered: 2007-09-27
Posts: 10

Re: systemd-networkd won't update IPv6 address after prefix change

@Malvineous Have you been able to fix this or find out more? I'm having exactly the same problem. Advertisements are definitely coming through, I've checked with tcpdump (`tcpdump -vvv "icmp6 and ip6[40] == 134"` or use `radvdump` from radvd package)

Edit: Nevermind, my problem was unrelated after all. After a lot of testing and packet capturing I've found out that my router's SLAAC is buggy.

Last edited by krist (2018-09-14 22:32:52)

Offline

Board footer

Powered by FluxBB