multiple DHCP6c renewals on the same interface

Started by opnfwb, July 03, 2023, 03:13:28 PM

Previous topic - Next topic
Greetings,
I noticed this behavior in the logs starting around 23.1.8. I'm getting multiple dhcp6c renewals within seconds of each other for my WAN interface. I would expect to see one renewal but seeing two of them back to back like this seems like something is wrong? Is anyone else seeing these too?

Router settings:
WAN interface configured with DHCP/DHCPv6
LAN interface set to Track DHCPv6 to delegate a prefix to LAN clients

Example of what I'm seeing in the logs:
2023-07-03T07:56:21-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:56:20-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:56:18-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:56:17-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:41:21-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:41:20-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:41:18-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:41:17-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:26:21-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:26:20-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:26:17-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:26:17-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:11:20-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:11:20-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing
2023-07-03T07:11:17-05:00 Notice opnsense /usr/local/etc/rc.newwanipv6: No IP change detected (current: 2605:xxxx:xxxx:xxxx::1, interface: WAN[wan])
2023-07-03T07:11:16-05:00 Notice dhcp6c dhcp6c_script: RENEW on igb1 executing

July 03, 2023, 03:35:11 PM #1 Last Edit: July 03, 2023, 03:37:03 PM by Cyberturtle
Greetings back,

I have had a look at the provided logs. I*'m not seeing multiple renews within seconds. First renew was on 07:11 and the next one was 15 minutes later at 07:26.
I think the RENEW is expected behavior. We have discussed and changed a lot in IPv6 implementation.

For me everything looks pretty normal. I have the same periodic entries.

Cyberturtle

Thanks for taking the time to reply. The issue I'm seeing is the same renewal happening twice within seconds on the same interface. It does this at 15 minute intervals.  For instance, if we take the renewal at 2023-07-03T07:56:17-05:00, then 3 seconds later, the same dhcp6c script runs again at 2023-07-03T07:56:20-05:00.

It's almost as though there are two events scheduled for one interface and they are both kicking off within seconds of each other to renew the interface. I've only noticed this because when it happens I'm seeing either latency spikes or a brief connectivity pause for ipv6 on my network.

I set some fping monitors on a VM with Netdata and that's when I started digging on the router side to see if I could find the cause.

July 04, 2023, 11:33:27 PM #3 Last Edit: July 04, 2023, 11:36:51 PM by Cyberturtle
Now I understand it. Thanks for clarifying. Do you have multiple LAN configured? For example GuestLAN and LAN?

The renew at my side is logged every 12h approx. And only once each time. The only difference is that I'm using a PPPoE connection for IPv4.

Not on this config, it's just a single LAN and no VLANs in use in this case. The LAN is set to "track interface" and the WAN side is set to DHCP/DHCPv6.

@franco should we have a look into the sources after 23.7 has been out or should it be considered for 23.7?

@opnfwb How is your setup to the WAN side? Do you have a Modem/ONT? Is there any possibility that you can setup PPPoE for example? I don't know if it's up to the DHCP lease time that runs into this behavior.

In this case its an FTTH setup. I have an ONT on the wall with an ethernet port that plugs directly to the WAN port on the OPNsense system. Unfortunately I don't have the option to use PPPoE for testing on this setup.