OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: jcrawford on March 02, 2019, 07:42:20 pm

Title: WAN Link Cycling Up and Down
Post by: jcrawford on March 02, 2019, 07:42:20 pm
The problem I have is that my router sees my WAN port come up, gets a WAN IP address, creates a gateway, and then sees the WAN port go down all within 8 seconds or so.

If I put it on a static address, it behaves fine.


OPN Version: OPNsense 19.1.1-amd64
Cable Modem: Netgear CM500
Router: QOTOM-Q190G4-S02
NIC: Intel I211-AT- 10/100/1000 Controller


Franco suggested the following fix:  https://github.com/opnsense/core/issues/3197#issuecomment-463988437
But the same problem persists.

Can anyone mentor me through the steps to figure this out?

Here is a sample of my log:

9:45:41 AM   opnsense: /usr/local/etc/rc.linkup: Warning! services_radvd_configure(auto) found no suitable IPv6 address on igb1
9:45:42 AM   opnsense: /usr/local/etc/rc.linkup: Clearing states for stale wan route on igb0
9:45:42 AM   opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet detached event for wan
9:45:43 AM   kernel: igb0: link state changed to DOWN
9:45:43 AM   opnsense: /usr/local/etc/rc.linkup: HOTPLUG: Configuring interface wan
9:45:43 AM   opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet attached event for wan
9:45:47 AM   kernel: igb0: link state changed to UP
9:45:48 AM   kernel: ovpns1: link state changed to DOWN
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface WAN.
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: skipping IPv6 default route
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway '73.231.xxx.xxx'
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 73.231.xxx.xxx
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: no IPv6 default gateway set, assuming wan
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: no IPv4 default gateway set, assuming wan
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: On (IP address: 73.231.xxx.xxx) (interface: WAN[wan]) (real interface: igb0).
9:45:48 AM   opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'igb0'
9:45:49 AM   kernel: ovpns1: link state changed to UP
9:45:50 AM   opnsense: /usr/local/etc/rc.newwanip: Dynamic DNS (zzzzzzzz.duckdns.org): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
9:45:50 AM   opnsense: /usr/local/etc/rc.newwanip: Interface '' is disabled or empty, nothing to do.
9:45:50 AM   opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'ovpns1'
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: skipping IPv6 default route
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: keeping current default gateway '73.231.xxx.xxx'
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: setting IPv4 default route to 73.231.xxx.xxx
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: no IPv6 default gateway set, assuming wan
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: no IPv4 default gateway set, assuming wan
9:45:51 AM   opnsense: /usr/local/etc/rc.linkup: ROUTING: entering configure using 'wan'
9:45:52 AM   opnsense: /usr/local/etc/rc.linkup: Warning! services_radvd_configure(auto) found no suitable IPv6 address on igb1
9:45:53 AM   opnsense: /usr/local/etc/rc.dyndns: Dynamic DNS (zzzzzzzz.duckdns.org): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
9:45:54 AM   opnsense: /usr/local/etc/rc.linkup: HOTPLUG: Configuring interface wan
9:45:54 AM   opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet attached event for wan
9:45:54 AM   opnsense: /usr/local/etc/rc.linkup: Clearing states for stale wan route on igb0
9:45:54 AM   opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet detached event for wan
9:45:55 AM   kernel: igb0: link state changed to DOWN



Title: Re: WAN Link Cycling Up and Down
Post by: jcrawford on March 02, 2019, 09:24:14 pm
I noticed that Intel has a new igb driver (2.5.6 -- https://downloadcenter.intel.com/download/15815/Intel-Network-Adapter-Driver-for-82575-6-and-82580-based-Gigabit-Network-Connections-under-FreeBSD-?product=64403).

Is it possible to update the IGB driver in opnsense? 


Also, are these issues related:

https://forum.opnsense.org/index.php?topic=10175.0

https://forum.opnsense.org/index.php?topic=8975.0

https://forum.opnsense.org/index.php?topic=9050.0
Title: Re: WAN Link Cycling Up and Down
Post by: newsense on March 03, 2019, 04:03:41 am
Upgrade to 19.1.2 and see if it fixes your issue.

Also, cross-posting won't help your cause, however it may actually keep people from replying...
Title: Re: WAN Link Cycling Up and Down
Post by: davorin on March 03, 2019, 11:31:30 am
Just installed OPNsense 19.1.2-amd64 on my APU2D4 box....

And I have this WAN up/down cycling as well.....

Powering up my old SRX240B2 again...

Title: Re: WAN Link Cycling Up and Down
Post by: davorin on March 03, 2019, 11:36:43 am
Hmmm..switching WAN interface on my APU2D4 to 100TX fullduplex fixed seems to solve this...
but won't have my 500mbps speed *sniff (o;

Title: Re: WAN Link Cycling Up and Down
Post by: newsense on March 03, 2019, 04:10:39 pm
Should have been 1000 for gigabit
Title: Re: WAN Link Cycling Up and Down
Post by: davorin on March 03, 2019, 06:02:21 pm
Well I know of course....but setting to 1000TX fixed causes flapping...100TX not...

Anyway...have more problems as IPsec site to site won't work due to socket errors...which worked flawlessly on junos with just few lines of config (o;

Have a look now at Mikrotik RouterOS to see if that runs on APU2....
Title: Re: WAN Link Cycling Up and Down
Post by: jcrawford on March 03, 2019, 08:51:44 pm
Also, this is certainly a SW issue (maybe drivers maybe OPN scripts).

There is no issue in Ubuntu 18 or ClearOS. 
Title: Re: WAN Link Cycling Up and Down
Post by: newsense on March 04, 2019, 04:05:05 am
It would be best to open a ticket on Github then, core issues section -- referencing this thread.

I'll ask one more time, were you actually on 19.1.2 as I suggested ? Should have been fixed there. Do 12 in the console after installation
Title: Re: WAN Link Cycling Up and Down
Post by: lzamel on March 04, 2019, 07:43:32 am
I have a fresh install of 19.1, running 19.1.2 on HP 800 G1 i3-4130.
Two NICs: I217-LM and I340-T4.

If I put WAN on any of 4 I340-T4 ports it's going down every few hours. Card itself is ok, as LAN and OPTx are stable on it.
WAN on I217-LM is also stable so it's not ONT device.

EDIT: Was happy too early. The I217-LM link is also going down. It just took 9h instead of 3h.
EDIT #2: On second thought on I217-LM link remains up, so it looks like ONT is acting up.
Title: Re: WAN Link Cycling Up and Down
Post by: Antaris on March 04, 2019, 08:12:40 pm
I had this issue before more than a year with Linux based firewall IPFire. Was a bad Intel driver with some of the updates of the firewall.

Here is the workaround:

https://forum.ipfire.org/viewtopic.php?f=50&t=17549&p=111842#p111842 (https://forum.ipfire.org/viewtopic.php?f=50&t=17549&p=111842#p111842)
Title: Re: WAN Link Cycling Up and Down
Post by: davorin on March 04, 2019, 08:23:48 pm
Well I just installed for testing ipfire on my apu2d4...though had to switch back my home setup to SRX240B2 so I got my VPN back and full but slow 500mbps speed back.

Maybe I test how RouterOS performs...got one in the office for testing.

Title: Re: WAN Link Cycling Up and Down
Post by: lzamel on March 05, 2019, 05:46:47 pm
I had this issue before more than a year with Linux based firewall IPFire. Was a bad Intel driver with some of the updates of the firewall.

Here is the workaround:

https://forum.ipfire.org/viewtopic.php?f=50&t=17549&p=111842#p111842 (https://forum.ipfire.org/viewtopic.php?f=50&t=17549&p=111842#p111842)

Switching off offload was first thing I did. Had no effect. I217-LM is stable. After provider fixes issues on their side will switch back to I340-T4