I wrote some script to automatically get IPv6 prefix delegation done in a layer 3 babel mesh network. Assigning IPv6 prefixes can be done with a reload
. But a prefix is not removed if I do a reload? Just a restart helps. A restart seems to me to aggressive.
If I remember correctly, stale prefixes are marked as deprecated and not advertised by odhcpd.
I'm not sure if there's a lifetime limit, but you should be able to remove deprecated addresses like this:
ip -6 address flush deprecated
Thanks! I tried a reload
again and suddenly the prefix is removed!
I will let the script run for some days and if they are not removed I will use your cmd! Thanks a lot.
Thanks! The cmd is working perfectly!
I have to add that to my script. The IPv6 route was not deleted again. Tried ip -6 address flush deprecated
and it worked immediately,
@vgaetera There is still some issue that if the prefix is removed, it is not removed at the client. Can I somehow force the client to remove the assigned ipv6 address again?
I have a working solution with:
option dhcpv6 'server'
option ra 'server'
option leasetime '3m'
option ra_useleasetime '1'
So a blackout only affects 3minutes.
Someone a better solution?
Hmmmm, I switched to kernel 5.4 and suddenly reload and flushing is not enough anymore.