OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: SheeEttin on May 24, 2020, 03:48:08 am

Title: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: SheeEttin on May 24, 2020, 03:48:08 am
I'm new to OPNsense, though I have some experience with other products.

Within the past day or so, apparently OPNsense has been losing connectivity to my WAN gateway. I configured dpinger under System > Gateways > Single, and sure enough, when I lose connectivity, it shows offline for the IPv4 and IPv6 gateways. But the link stays up.

The weird thing is that just about any change will bring it back up. If I turn on packet capture in promiscuous mode, it comes back. If I hit "reload" on DHCP for the interface, IPv4 starts working again (but not IPv6 for some reason). If I physically disconnect the cable, or administratively shut down/bring up the interface, everything immediately starts working again.

I don't think the routes are disappearing, but next time it happens I'll confirm.

Is there anything in particular I can investigate? I'm still learning my way around OPNsense and where all the log viewers are.

If it matters, my ISP is Spectrum (US), and I'm using my own modem (Arris SB6141).
Title: Re: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: SheeEttin on May 24, 2020, 08:56:43 pm
Okay, it just happened again, and I confirmed that it wasn't due to routes disappearing or anything. I went into the shell and ran `ifconfig re1 down; ifconfig re1 up`, and this brought IPv4 back online. To bring back IPv6 I had to go into the web interface and hit save then apply on the WAN interface page.

Ideas? Any specific log files I should examine?
Title: Re: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: guyp2k on May 25, 2020, 04:06:27 am
Sorry I don't have a resolution as I am experiencing the same issue and I can't figure out the cause. I thought maybe it was Sensei, which I disabled and the issue still occurs. The WAN interface stays up and eventually assign an IP.

scratching my head, recently switched from Untangle to OPNsense and never had this issue w/ untangle. Tomorrow I am going to change physical interface on hardware (Intel NIC) and swap ethernet cables just to make sure it isn't a physical issue.
Title: Re: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: SheeEttin on May 30, 2020, 08:05:42 pm
I replaced the cable between the router and modem and it was fine for a while, but just dropped again... I guess I can try switching the LAN and WAN interfaces. I doubt it's a hardware problem, but I haven't used other OSes for the same length of time.

Is there really nothing in OPNsense that would log why it's going down?
Title: Re: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: Berriault on June 06, 2020, 03:05:52 am
I can confirm I'm experiencing the same issues and can resort the connection with the same methods. So far I have been unsuccessful diagnosing the cause.
Title: Re: Why do I keep losing connectivity to my gateway? How do I troubleshoot this?
Post by: SheeEttin on June 06, 2020, 05:04:38 am
Well, I updated to 20.1.7 with no change, but when I switched the LAN and WAN interfaces, it's been staying up, but now when I resume my PC from sleep, I have to disable and reenable the interface in Windows before it'll get an address from DHCP. Starting Wireshark captures also seems to resolve it, which is probably the same as when I did a capture in OPNsense, as it toggles promiscuous mode. And that's really weird, because I have an AP/switch between my desktop and OPNsense (A Netgear R6200 v2).

But wireless clients seem to be fine, so I think putting WAN on re0 and LAN on re1 has resolved it. I also updated Windows to build 2004 around the same time, so I'm going to blame that for needing to disable/reenable the interface, rather than OPNsense, especially since the connection between OPNsense and the Netgear AP/switch seems to be stable, as other wired and wireless devices attached to it are fine.