WAN IPv6 address not renewing after initial dhcp request

Started by v, June 20, 2024, 08:02:59 PM

Previous topic - Next topic
Here are mine, it appears to grab an address and then almost immediately release it for WAN. It does hold on to the prefix delegation and that doesn't change even though the WAN IP6 doesn't seem to stick.

The logs are too large to paste here in the thread so I'm just attaching them for review. I've segmented them in to the initial bootup log, and the first renewal attempt.

After Upgrade to 23.1.9 IPv6 only works for a short time on the WAN interface on my OPNsense.

If IPv6 connectivity has been lost, the only way to get the IPv6 connection working again is to reload the interface. After a short time, however, it is gone again.

A downgrade of the dhcp6c package with "opnsense-revert -r 24.1.8 dhcp6c" fixes the problem for me after a reboot. The connection has currently been stable for 10 hours.

I too can confirm, reverting dhcp6c with

# opnsense-revert -r 24.1.8 dhcp6c

and rebooting fixed the issue for me as well. The earlier issue I had after downgrading the package was due to a misconfiguration on my end. My apologies for any confusion.

Thank you all for your help

Ok this sounds workable... our best candidate for revert is https://github.com/opnsense/dhcp6c/commit/5676e78d87

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

Reboot and try again.

I was a bit suspicious of the patch but it's been in Debian too many years to give it a second thought. I don't know the code well enough but maybe the logic condition is wrong (|| vs. &&).


Cheers,
Franco

I have now applied the patch. Let's see if the IPv6 connection remains.

Quote from: franco on June 23, 2024, 10:29:30 PM
Ok this sounds workable... our best candidate for revert is https://github.com/opnsense/dhcp6c/commit/5676e78d87

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

Reboot and try again.

I was a bit suspicious of the patch but it's been in Debian too many years to give it a second thought. I don't know the code well enough but maybe the logic condition is wrong (|| vs. &&).


Cheers,
Franco

Seems to be working!

With the original 24.1.9 version the address kept dropping after an hour. Current system uptime 1h45min with no issues so far.

I had the same issue since 24.1.9 and fixed it by disabling Crowdsec (when the package is installed, it is enabled by default). I did not revert dhcp6c to an older version.
Crowdsec has a cron job running every hour so it could explain why it stops after exactly 1 hour (my DHCP  leases are 8h - renewed every 4h).

I did not spend time to check why it is causing WAN IPv6 to be lost. It looks unrelated but practically it works.

Quote from: franco on June 23, 2024, 10:29:30 PM
Ok this sounds workable... our best candidate for revert is https://github.com/opnsense/dhcp6c/commit/5676e78d87

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

Reboot and try again.

I was a bit suspicious of the patch but it's been in Debian too many years to give it a second thought. I don't know the code well enough but maybe the logic condition is wrong (|| vs. &&).


Cheers,
Franco

Will today come an official Hotfix or will it worth to do this manual?


Quote from: franco on June 23, 2024, 10:29:30 PM
Ok this sounds workable... our best candidate for revert is https://github.com/opnsense/dhcp6c/commit/5676e78d87

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

Reboot and try again.

After 14 hours, the IPv6 connection is still up. That was probably the culprit.

Want to add I was experiencing this issue due the to 24.1.9 update as well. It broke unbound resolving at first because I use the WAN interface IPv6 to perform my upstream lookups.

I was losing my IPv6 on the wan interface in a matter of minutes every time I reapplied the WAN interface configuration. Since applying this patch, it appears to be working correctly now. I will update if that changes.

Quote from: franco on June 23, 2024, 10:29:30 PM

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

Reboot and try again.

Cheers,
Franco


24hrs uptime here and still keeping the WAN IP6 lease after applying the fix to 24.1.9_4. Thanks @franco and team!

Can confirm as well.
After having incredibly stable IPV6 for the last couple years, I began noticing ipv6 drop-outs after the upgrade to 24.1.9

Tried with and without crowdsec after another user mentioned that to be a potential cause to no avail.

The only thing that restored my IPV6 connectivity is rolling back with pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg

After a long-time forum lurker, felt it a good time to share my experience with the issue.
Thanks for the solution
Opnsense:
AMD Ryzen 2700 | 2 x i350-T4 | 32GB Kingston ECC Memory | 1TB NVME | Netgear CM1200

To potentially add a data point here, I have a few opnsense systems on Comcast in my area.

My home opnsense has this problem - it acts like it loses the ipv6 address on the WAN but ipv6 still works EXCEPT for tunnels. I have multiple inside interfaces tracking WAN. I get about 24-30 hours before it happens.

Another opnsense in the same area also on Comcast only has one internal interface tracking WAN and it has worked perfectly since being upgraded four days ago.

After installing 24.1.9_4 and a reboot my OPNsense lost the IPv6 address on the WAN interface. This worked for several years without a problem.

I applied pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/misc/dhcp6c-20240607_1.pkg and rebooted, but nothing changed. Still no IPv6 on the WAN interface.

My ISP is DTAG if that helps.
How can I provide logs for dhcp6?
Any other suggestions to get the problem solved? Should I try opnsense-revert -r 24.1.8 dhcp6c?