Hello,
I am trying to find ways to adjust the DHCPv6 options in the same way you can change the DHCPv4 timings in OPNSense
All I see are "Send Options", and "Request Options"
For DHCPv4 there are various timing options.
Right now, I feel like the DHClient on the WAN interface is rolling too frequently given that the v4 lease is 3600 (3 days) and it's going every couple hours, spurts for a few minutes in a row then quits.
DHCPv6 is setup as:
* Request prefix only
* (Optional) Interface ID is 1
* VLAN Priority 0
* Prefix Delegation Size 60
LAN is set to TRACK WAN interface.
2024-10-30T03:23:10 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:20:40 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:18:09 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:15:39 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:13:09 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:10:39 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:08:09 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:05:39 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:03:08 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T03:00:38 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:58:08 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:55:38 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:53:08 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:50:38 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:48:08 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:45:37 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:43:07 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:40:37 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:38:07 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-30T02:35:37 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
My existing OPNSense system was updated many many times. The last time I did a full re-install was 24.1 so I decided to completely reinstall and reconfigure for 24.7 just in case something silly would come up
After completely re-installing the OS, I get the same issue. DHCP6 script is running every couple minutes when I'm certain it doesn't actually need to.
I'm just wondering if there are any options to slow it down to an hour or a day?
(https://i.imgur.com/IKqpZ5F.png)
2024-10-31T00:13:27 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-31T00:10:56 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-31T00:08:26 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
2024-10-31T00:05:56 Notice dhcp6c dhcp6c_script: RENEW on re1 executing
After much further research, there does not appear to be a good client-side solution to implement for IPv6.
Sadly I've got exactly the same problem. My OPNsense requests a DHCPv6 Renew about every minute which results in IPv6 periodically working for six minutes always, then IPv6 drops out for 9 minutes every time and then it repeats.
Being able to manually adjust the DHCPv6 request interval would almost certainly fix this since DHCPv4 runs perfectly fine on its 10min lease requesting a new address every 5min.
Really frustrating to debug..
It might be interesting to see the actual lease times that you're getting. One way to do this would be to set Interfaces -> Settings -> IPv6 DHCP -> Log level -> Debug, then reboot, then go to System -> Log Files -> General (or /var/log/system/latest.log) and search for "dhcp6c". You should see messages like:
get DHCP option IA address, len 24
IA_NA address: <some_ipv6_address> pltime=4500 vltime=7200
...
get DHCP option IA_PD prefix, len 25
IA_PD prefix: <some_ipv6_prefix>::/</mask> pltime=4319 vltime=2035814505323
...
make an IA: PD-0
create a prefix <prefix>::/</mask> pltime=4319, vltime=7019
T1(2159) and/or T2(3455) is locally determined
...
make an IA: NA-0
create an address <address> pltime=4500, vltime=7200
add an address <address> on <interface>
T1(2250) and/or T2(3600) is locally determined
T1 is the time when renewal is supposed to be requested, and it's recommended to be half of the preferred lease time (pltime).
Quote from: the1corrupted on October 30, 2024, 05:03:03 AM
given that the v4 lease is 3600 (3 days)
Isn't that number usually in seconds, i.e. 3600 == 6 hours? (EDIT: 1 hour, math is hard...)
3600 seconds == 1 hour, folks ... ::)