[RESOLVED] WAN interface cycles UP and DOWN after DHCP PREINIT call

Started by the1corrupted, October 31, 2024, 09:33:43 PM

Previous topic - Next topic
Hello,

For some reason my WAN interface will cycle "UP" and "DOWN" after a dhclient PREINIT call on the interface
2024-10-31T19:47:19    Notice    kernel    <6>re1: link state changed to UP   
2024-10-31T19:47:16    Notice    kernel    <6>re1: link state changed to DOWN   
2024-10-31T19:46:57    Notice    kernel    <6>re1: link state changed to UP   
2024-10-31T19:46:54    Notice    kernel    <6>re1: link state changed to DOWN
2024-10-31T19:46:40    Notice    kernel    <6>re1: link state changed to UP   
2024-10-31T19:46:36    Notice    kernel    <6>re1: link state changed to DOWN
2024-10-31T19:46:14    Notice    dhclient    dhclient-script: Reason PREINIT on re1 executing


So far my only fix is to SSH into the firewall and run ifconfig re1 up

This fixes it for the moment until it next occurs.


EDIT 2: If I run the command manually, I cannot replicate the problem.
2024-10-31T20:42:10 Notice sudo michael : TTY=pts/0 ; PWD=/home/michael ; USER=root ; COMMAND=/sbin/dhclient-script preinit re1


EDIT: Current WAN config:

Realtek brand interfaces are known to be problematic. Did you try to install the vendor driver?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on November 01, 2024, 06:20:13 AM
Realtek brand interfaces are known to be problematic. Did you try to install the vendor driver?

I have not tried new drivers, is there something specific I need to load these drivers?

System > Firmware > Plugins

Install os-realtek-re.

If that does not improve things I'd try to borrow better hardware for a test.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

November 01, 2024, 07:20:35 AM #4 Last Edit: November 01, 2024, 07:26:29 AM by the1corrupted
EDIT: OH WOW! The realtek driver cut down my reboot time by A LOT!

I have loaded the driver, I am noting this here as it only appeared during the install

I will give this some time to see what happens.

If you experience network hangs with IPv6 enabled,
you might need to disable the checksum offloading
by adding the following parameters to the related
ifconfig line in your /etc/rc.conf file:

-rxcsum -txcsum -rxcsum6 -txcsum6

Checksum offloading is disabled in OPNsense by default. See here:

https://forum.opnsense.org/index.php?topic=43583.msg217965#msg217965

The messages shown when you install packages are not applicable in OPNsense as is clearly stated below that text box:

QuoteOutput shown here for diagnostic purposes. There is no general need for manual system intervention.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

After loading the realtek vendor drivers, the interface is still dropping the IP config but the pattern looks different

Somewhere in here is the smoking gun. I have removed connection-specific addresses for the moment

These are in reverse-time order as seen in the UI from most recent to oldest. At some point the link state changes DOWN during this process.

I use a WPA Supplicant to authenticate my connection, and I am still authenticated.

2024-11-01T20:45:57 Notice kernel <6>re1: link state changed to UP
2024-11-01T20:45:57 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet attached event for wan(re1)
2024-11-01T20:45:56 Error dhcp6c transmit failed: Can't assign requested address
2024-11-01T20:45:55 Error dhcp6c transmit failed: Network is down
2024-11-01T20:45:54 Critical dhclient exiting.
2024-11-01T20:45:54 Error dhclient connection closed
2024-11-01T20:45:54 Error dhcp6c transmit failed: Network is down
2024-11-01T20:45:54 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp (execute task : dhcpd_dhcp_configure(,inet6,[lan]))
2024-11-01T20:45:54 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp (,inet6,[lan])
2024-11-01T20:45:54 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet detached event for wan(re1)
2024-11-01T20:45:54 Notice kernel <6>re1: link state changed to DOWN
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : wireguard_sync())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : webgui_configure_do(,wan,lan))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : vxlan_configure_do())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : unbound_configure_do(,wan,lan))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : openssh_configure_do(,wan,lan))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : opendns_configure_do())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : ntpd_configure_do())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : dnsmasq_configure_do())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (execute task : dhcrelay_configure_if(,wan,lan,inet6))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip_map (,wan,lan,inet6)
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip (,lan)
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn (,lan)
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure newwanip (,wan)
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn (,wan)
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn_map (execute task : wireguard_configure_do())
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn_map (execute task : openvpn_configure_do(,wan,lan))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn_map (execute task : ipsec_configure_do(,wan,lan))
2024-11-01T20:45:22 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure vpn_map (,wan,lan,inet6)
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure monitor (execute task : dpinger_configure_do(,[WAN_DHCP6]))
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure monitor (,[WAN_DHCP6])
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: ROUTING: keeping inet6 default route to fe80::21a:f0ff:fe86:5c6a%re1
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: ROUTING: configuring inet6 default gateway on wan
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: ROUTING: entering configure using wan, lan
2024-11-01T20:45:21 Warning radvd exiting, 1 sigterm(s) received
2024-11-01T20:45:21 Error opnsense /usr/local/etc/rc.newwanipv6: The command '/usr/sbin/daemon -f -p '/var/run/dhcpleases6.pid' '/usr/local/opnsense/scripts/dhcp/prefixes.sh'' returned exit code '3', the output was 'daemon: process already running, pid: 78863'
2024-11-01T20:45:21 Error opnsense /usr/local/etc/rc.newwanipv6: The command '/bin/kill -'TERM' '78863''(pid:/var/run/dhcpleases6.pid) returned exit code '1', the output was 'kill: 78863: No such process'
2024-11-01T20:45:21 Error opnsense /usr/local/etc/rc.newwanipv6: The command '/bin/kill -'TERM' '77612''(pid:/var/dhcpd/var/run/dhcpdv6.pid) returned exit code '1', the output was 'kill: 77612: No such process'
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure dhcp (execute task : dhcpd_dhcp_configure(,inet6))
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: plugins_configure dhcp (,inet6)
2024-11-01T20:45:21 Notice opnsense /usr/local/etc/rc.newwanipv6: IP renewal starting (address: fe80::2e0:4cff:fe5f:41ad%re1, interface: wan, device: re1)
2024-11-01T20:45:18 Notice dhcp6c dhcp6c_script: REQUEST on re1 renewal
2024-11-01T20:45:18 Notice dhcp6c dhcp6c_script: REQUEST on re1 executing
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : wireguard_sync())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : webgui_configure_do(,wan))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : vxlan_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : unbound_configure_do(,wan))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : openssh_configure_do(,wan))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : opendns_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : ntpd_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : dnsmasq_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (execute task : dhcrelay_configure_if(,wan,inet))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip_map (,wan,inet)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn_map (execute task : wireguard_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn_map (execute task : ipsec_configure_do(,wan))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn_map (,wan,inet)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure newwanip_map:rfc2136 (,wan)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : unbound_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : dnsmasq_configure_do())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns ()
2024-11-01T20:45:17 Warning radvd exiting, 1 sigterm(s) received
2024-11-01T20:45:17 Warning opnsense /usr/local/etc/rc.linkup: dhcpd_dhcp6_configure() found no suitable IPv6 address on lan(re0)
2024-11-01T20:45:17 Notice dhcp6c RTSOLD script - Sending SIGHUP to dhcp6c
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,[WAN_GW]))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,[WAN_GW])
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping inet default route to <GATEWAY WAN IP>
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: configuring inet default gateway on wan
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp (execute task : dhcpd_dhcp_configure())
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp ()
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (execute task : ipsec_configure_do(,wan))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (,wan)
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (execute task : dpinger_configure_do(,[WAN_GW,WAN_DHCP6]))
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (,[WAN_GW,WAN_DHCP6])
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: setting inet default route to <GATEWAY WAN IP>
2024-11-01T20:45:17 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: configuring inet default gateway on wan
2024-11-01T20:45:16 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using wan
2024-11-01T20:45:16 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: <WAN IP>, old: <WAN IP>, interface: wan, device: re1, force: yes)
2024-11-01T20:45:16 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: entering configure using wan
2024-11-01T20:45:16 Notice dhcp6c RTSOLD script - Sending SIGHUP to dhcp6c
2024-11-01T20:45:16 Notice dhclient dhclient-script: Creating resolv.conf
2024-11-01T20:45:16 Notice dhclient dhclient-script: New Routers (re1): <GATEWAY WAN IP>
2024-11-01T20:45:16 Notice dhclient dhclient-script: New Broadcast Address (re1): <GATEWAY BROADCAST>
2024-11-01T20:45:16 Notice dhclient dhclient-script: New Subnet Mask (re1): 255.255.252.0
2024-11-01T20:45:16 Notice dhclient dhclient-script: New IP Address (re1): <WAN IP>
2024-11-01T20:45:16 Notice dhclient dhclient-script: New Hostname (re1): firewall
2024-11-01T20:45:16 Notice dhclient dhclient-script: Reason REBOOT on re1 executing


WPA status
wpa_cli status
Selected interface 're1'
bssid=01:80:c2:00:00:03
freq=0
ssid=
id=0
mode=station
pairwise_cipher=NONE
group_cipher=NONE
key_mgmt=IEEE 802.1X (no WPA)
wpa_state=COMPLETED
ip_address=<WAN IP ADDRESS>
address=<RE1 MAC ID>
Supplicant PAE state=AUTHENTICATED
suppPortStatus=Authorized
EAP state=SUCCESS
selectedMethod=13 (EAP-TLS)
eap_tls_version=TLSv1
EAP TLS cipher=DHE-RSA-AES256-SHA
tls_session_reused=0
eap_session_id=0de4c94c3a15a761470997c468debef836dcdb11a2d3dfe768bfb129dfbd749f5d67253e5a9c017b7c11b7a5987d31d93e7a2f4474a2a862649ace732f677962ba
uuid=14cfe463-8dd1-52e7-a236-550ded281a59

November 05, 2024, 12:44:03 PM #7 Last Edit: November 07, 2024, 05:18:45 PM by the1corrupted
I have a temporary solution to auto reboot daily, and for the most part this is OK

The resolution on this was to load the realtek vendor driver. The new problem is not related to the previous instance, and is, in fact, the way the log off log on procedure with the WPA Supplicant is handled.