OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: mof on June 18, 2026, 10:21:10 PM

Title: interfaces.php self-triggering config loop causes repeated WAN drops
Post by: mof on June 18, 2026, 10:21:10 PM
OPNsense version: 26.1.10-amd64

WAN type: DHCP over VLAN (vlan01, VLAN ID 610, parent interface igc1 / Intel I226-V)
Background
Two days ago my ISP changed their infrastructure. Since then I have been losing WAN connectivity repeatedly throughout the day, with the connection never recovering on its own — requiring either a WAN interface disable/re-enable or a full reboot to restore it.
What I found
After extensive log analysis I identified the following chain of events at each failure:

1. interfaces.php is called and reconfigures the WAN interface (vlan01)
2. dhclient on vlan01 is killed and restarted via PREINIT → REBOOT
3. During the brief window between kill and rebind, the interface has no IP address
4. OPNsense logs ROUTING: refusing to set interface route on addressless opt1(vlan01)
5. A new config backup is written with the revision description /interfaces.php made changes
6. This config write triggers another config-event: new_config, which calls interfaces.php again
7. The cycle repeats

The config saves happen every few minutes even when I am not touching the GUI. Diffing two consecutive config backups from a quiet period shows only the <revision><time> field changed — nothing else. So something is repeatedly writing the config solely to update that timestamp, and each write triggers a full interface reconfiguration cascade.

Additionally, during one of these cycles I observed unbound crash with signal 11:
kernel: pid 18696 (unbound), jid 0, uid 59: exited on signal 11 (no core dump - bad address)

Additional finding: dhcp-server-identifier mismatch
My ISP's DHCP server identifier (31.47.80.99) is in a different /24 subnet than the leased IP (31.47.85.210/24). This causes dhclient to send unicast renewal requests to an unreachable address. I worked around this with:
supersede dhcp-server-identifier 255.255.255.255;
in the WAN interface Option Modifiers field, which forces broadcast renewals. This appears to have resolved the renewal-specific failure but the interfaces.php loop continues independently.

What I have ruled out:
1. Physical link flapping: igc1 link-state changes are infrequent and do not coincide with the failure windows
2. ARP staleness: gateway ARP entry is valid and has a normal expiry at time of capture
3. Routing table loss: default route to 31.47.85.1 remains present during failures
4. IP address loss during steady state: vlan01 retains its IP between the brief teardown/rebind cycles
5. OPNsense version: already on 26.1.10

Question:
What is causing interfaces.php to repeatedly write config revisions and re-trigger itself when no user action is taking place? Is there a known interaction between VLAN-tagged DHCP WAN interfaces and the config revision mechanism that could produce this loop?




Here is a clipping from the logs around the time of one of these events for reference:
2026-06-18T18:32:19 configctl: config-event: new_config /conf/backup/config-1781800339.3152.xml
2026-06-18T18:32:21 dhclient 17992: connection closed
2026-06-18T18:32:21 dhclient 17992: exiting.
2026-06-18T18:32:21 opnsense /interfaces.php: ROUTING: entering configure using opt1
2026-06-18T18:32:21 dhclient 4636: dhclient-script: Reason PREINIT on vlan01 executing
2026-06-18T18:32:21 opnsense /interfaces.php: ROUTING: refusing to set interface route on addressless opt1(vlan01)
2026-06-18T18:32:21 opnsense /interfaces.php: Skipping gateway VLAN610_WAN_DHCP due to empty 'monitor' property.
2026-06-18T18:32:21 opnsense /interfaces.php: Skipping gateway VLAN610_WAN_DHCP due to empty 'gateway' property.
2026-06-18T18:32:21 opnsense /interfaces.php: The required VLAN610_WAN_DHCP IPv4 interface address could not be found, skipping.
2026-06-18T18:32:21 dhclient 26158: dhclient-script: Reason REBOOT on vlan01 executing
2026-06-18T18:32:21 dhclient 28713: New IP Address (vlan01): 31.47.85.210
2026-06-18T18:32:22 opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 31.47.85.210, old: 31.47.85.210, interface: opt1, device: vlan01, force: yes)
2026-06-18T18:32:22 opnsense /usr/local/etc/rc.newwanip: ROUTING: setting inet default route to 31.47.85.1
2026-06-18T18:32:22 kernel: pid 18696 (unbound), jid 0, uid 59: exited on signal 11 (no core dump - bad address)
2026-06-18T18:32:23 opnsense /interfaces.php: ROUTING: keeping inet default route to 31.47.85.1
Title: Re: interfaces.php self-triggering config loop causes repeated WAN drops
Post by: franco on June 21, 2026, 12:16:44 PM
interfaces.php cannot "re-trigger itself" because it's a web page being triggered by a user. Maybe you want to update the log snippet to something that shows the "cycle" and then we can reassess?


Cheers,
Franco