WAN interface going offline ever 3 hours

Started by scottandbothered, September 03, 2024, 08:15:17 PM

Previous topic - Next topic
OPNsense 24.7.3_1-amd64
WAN Connection: Auto IP
WAN Connected: ONT -> opnsense wan port
ISP: Verizon FIOS

Disabling the wan interface and re-enabling it fixes the issue.

I came across a similar issue and it was noted to change the wanip lease time in the wan interface advanced config. I did put an entry in the option modifier for that (supersede dhcp-lease-time 999999)

General logs show the start of the issue, disable / enable wan interface and coming back online.


2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : wireguard_sync(,wan))
2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : vxlan_configure_do())
2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2024-09-03T13:59:09-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : opendns_configure_do())
2024-09-03T13:59:08-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : ntpd_configure_do())
2024-09-03T13:59:08-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2024-09-03T13:59:08-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (,wan)
2024-09-03T13:59:07-04:00 Notice opnsense /interfaces.php: plugins_configure monitor (execute task : dpinger_configure_do())
2024-09-03T13:59:07-04:00 Notice opnsense /interfaces.php: plugins_configure monitor ()
2024-09-03T13:59:07-04:00 Notice opnsense /interfaces.php: ROUTING: keeping inet default route to MYIP
2024-09-03T13:59:07-04:00 Notice opnsense /interfaces.php: ROUTING: configuring inet default gateway on wan
2024-09-03T13:59:07-04:00 Notice opnsense /interfaces.php: ROUTING: entering configure using defaults
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : rfc2136_configure_do(,wan))
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : dhcrelay_configure_map(,wan,inet))
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (,wan,inet)
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : wireguard_sync(,wan))
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2024-09-03T13:59:07-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2024-09-03T13:59:05-04:00 Error opnsense /usr/local/etc/rc.newwanip: The command '/bin/kill -'TERM' '98097''(pid:/var/run/unbound.pid) returned exit code '1', the output was 'kill: 98097: No such process'
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : wireguard_configure_do(,wan))
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface WAN.
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,wan))
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,wan))
2024-09-03T13:59:05-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP))
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,WAN_DHCP)
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping inet default route to MYIP
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: configuring inet default gateway on wan
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
2024-09-03T13:59:04-04:00 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: MYIP80, old: MYIP80, interface: wan, device: igb0, force: yes)
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure dns (execute task : unbound_configure_do())
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure dns (execute task : dnsmasq_configure_do())
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure dns ()
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure dhcp (execute task : dhcpd_dhcp_configure())
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure dhcp ()
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure ipsec (execute task : ipsec_configure_do(,wan))
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure ipsec (,wan)
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure monitor (execute task : dpinger_configure_do(,WAN_DHCP))
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: plugins_configure monitor (,WAN_DHCP)
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: ROUTING: setting inet default route to MYIP
2024-09-03T13:59:04-04:00 Notice opnsense /interfaces.php: ROUTING: configuring inet default gateway on wan
2024-09-03T13:59:03-04:00 Notice opnsense /interfaces.php: ROUTING: entering configure using 'wan'
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: Creating resolv.conf
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: New Routers (igb0): MYIP
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: New Broadcast Address (igb0): MYIP
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: New Subnet Mask (igb0): 255.255.255.0
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: New IP Address (igb0): MYIP80
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: Reason BOUND on igb0 executing
2024-09-03T13:59:03-04:00 Notice dhclient dhclient-script: Reason ARPCHECK on igb0 executing
2024-09-03T13:59:01-04:00 Notice dhclient dhclient-script: Reason ARPSEND on igb0 executing
2024-09-03T13:59:00-04:00 Notice dhclient dhclient-script: Reason PREINIT on igb0 executing
2024-09-03T13:58:59-04:00 Notice configctl event @ 1725386339.15 exec: system event config_changed response: OK
2024-09-03T13:58:59-04:00 Notice configctl event @ 1725386339.15 msg: Sep 3 13:58:59 HiveFW.localdomain config[36132]: config-event: new_config /conf/backup/config-1725386339.1438.xml
2024-09-03T13:58:54-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : wireguard_sync(,wan))
2024-09-03T13:58:54-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2024-09-03T13:58:54-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : vxlan_configure_do())
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : opendns_configure_do())
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : ntpd_configure_do())
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure newwanip (,wan)
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure monitor (execute task : dpinger_configure_do())
2024-09-03T13:58:53-04:00 Notice opnsense /interfaces.php: plugins_configure monitor ()
2024-09-03T13:58:52-04:00 Notice opnsense /interfaces.php: ROUTING: entering configure using defaults
2024-09-03T13:58:52-04:00 Critical dhclient exiting.
2024-09-03T13:58:52-04:00 Error dhclient connection closed
2024-09-03T13:58:51-04:00 Notice configctl event @ 1725386331.14 exec: system event config_changed response: OK
2024-09-03T13:58:51-04:00 Notice configctl event @ 1725386331.14 msg: Sep 3 13:58:51 HiveFW.localdomain config[36418]: config-event: new_config /conf/backup/config-1725386331.1353.xml

Checked the bios for any power options. I didn't find anything glaring that would be putting the system to sleep or shutting down nics.

Haven't found a solution yet. Looks like this (I'm assuming) backup job runs every 2-3 hours and is causing the problem. I can't find any place to stop backups from running.

2024-09-03T18:44:22-04:00 Notice configctl event @ 1725403462.03 exec: system event config_changed response: OK
2024-09-03T18:44:22-04:00 Notice configctl event @ 1725403462.03 msg: Sep 3 18:44:22 HiveFW.localdomain config[18811]: config-event: new_config /conf/backup/config-1725403462.0203.xml

Is this a new install and you are having the issue right off the bat, or did this start after updating to the version you are currently on?

I installed opnsense on this box a while ago and it sat on the shelf powered off never used. I think it was on version 21. I decided to work on this again and got it updated to version 24.

anyone figure anything out yet? having this exact issue.

Nope. I put my old firewall back in place because I ran out of time to keep messing with this.
I was going to try and do a clean install and see if that fixes it. Not a great solution but that's probably the direction any suggestions were going to point.

Just a hunch but client DHCP settings are likely just suggestions to the server, your ISP may well be ignoring the lease time override. It does smell like stale DHCP though, as disabling and reenabking the interface probably causes a new DHCP solicitation. Does your ISP have anything to say about it? Fwiw I had what looked like a dead EAN recently and had to call to get them mine to manually release the lease...

I did not ask my ISP. My other router grabs a new IP fine, automatically or manually. Although it's also not trying to grab one every couple of hours.

might have a fix. Noticed some odd things with the logs and files for dhclient.

under /var/db there is a file dhclient.leases.(interface phy name). mine had multiple entries for the same interface, all with the same data. The only difference was the timings for renewing. Also, I noticed the IP itself wasn't actually changing with any of these renewals.


lease {
  interface "igc0";
  fixed-address (IP#1);
(ip info)
  renew 0 2024/9/15 00:47:05;
  rebind 0 2024/9/15 00:58:20;
  expire 0 2024/9/15 01:02:05;
}
lease {
  interface "igc0";
  fixed-address (IP#1);
(ip info)
  renew 0 2024/9/15 01:05:33;
  rebind 0 2024/9/15 01:16:48;
  expire 0 2024/9/15 01:20:33;
}
lease {
  interface "igc0";
  fixed-address (IP#1);
(ip info)
  renew 0 2024/9/15 01:20:33;
  rebind 0 2024/9/15 01:31:48;
  expire 0 2024/9/15 01:35:33;

i deleted this file and everything SEEMs to be working as intended. File updated with a single entry, and the WAN pulled a new ip. It seems like the IP wasnt actually releasing and the server kept trying to force it with fast timings.

I'll report back if this is actually a fix or just a more complicated interface reset.