-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WAN DHCPv4 gives up after few minutes and comes never again up #2244
Comments
|
You can avoid taking leases from the modem adding 192.168.100.1 ? to the DHCP configuration. The underlying issue, however, is that once the link is up and dhcp times out there is no activity on the link when it comes back, so you would have to rely on an active monitoring of that line to bring it back. You should be able to do this via system: settings: gateway, enabling the gateway monitoring. |
The problem is, that the ethernet-link physically goes down, e.g. because of modem power down. It seems, that OPNsense doesn't see that ethernet-link-up event or react after 10 minutes error. |
My guess is the modem does not toggle the link state several minutes in when the line is up and running again and/or giving out a lease time that is far too long for dhclient to renegotiate after a brief outage. |
|
The Modem does toggle the link state often in 10 hours.
|
|
Does it work if you unplug the cable? |
|
No, Unplugging was also not detected. |
|
Is it possible, that a bug in igb-driver (Intel i211-AT) with EEE (Energy Efficient Ethernet) is the source of that problem? It only affects OPNsense 17.1.9 to 17.7. Yesterday i had those modem-reboots again with OPNsense 18.1.6 and the router could detect the Link-up and down correctly and get's a IP-adress again: |
|
The issue has happened again on Apr 30: After that, the link went down and up again, but that event was noch detected by OPNsense 18.1.6-amd64. So i implemented the following workarount from Thomas-Krenn by disabling EEE (Energy Efficient Ethernet) on all interfaces:
|
|
Problem appeared again in actual OPNsense 18.1.6-amd64. |
|
See #2372 ... you can try: |
|
Thank you fichtner. I don't apply your patch for now, because i will test, if disabling EEE in the NIC solves the problem. If the problem occurs again, i will enable EEE again and install your patch. So we can clearly locate the issue. |
|
Sounds good, thanks! :) |
|
Patch is included in 18.1.7, but needs a reboot to apply in your case. |
|
ok, then I flip it:
If the problem occours again, I will disable EEE again and report it here. |
|
thanks 👍 |
|
The connection problem of the cable modem occurred again and DHCP-Client of OPNsense now self-healed without manual intervention in OPNsense. Summary:
|
|
The issue is back. Today OPNsense 18.7.2-amd64 didn't get a dhcp-address again after modem Link-Up/Down.
One possible error message was: |
|
The issue is still there:
Therefore it is no issue with EEE on Intel 210 but a dhcp-client issue. Here are the current commented logs: |
|
Maybe I suffer the same issue? And I have no idea how to work around... |
|
Thank you hirschferkel. Comment on: https://forum.opnsense.org/index.php?topic=10175.0
I think, there was more than one issue with that. I think, that the remaining problem has to do with the following Log-Line: Should stop the dhclient-process on Link-Down and it was still running on my system as link goes up? |
|
DHCP-Error occured again The Log-Message was: |
|
I have no idea what exit code '15' is and where it comes from. It really can't be ENOTBLK and according to the output it gets an ACK from 192.168.100.1 but gets stuck afterwards. |
|
We should probably close this in favour of a feature that will be able to handle this as I don't see how this can be fixed if dhclient just exits: #2517 |
|
In my case the problem was in connection with a Fritz!box in front. Despite the fact that all ports were open and dhcp was enabled, I always got stuck with OPNsens. |
I think, that those frequent toggling of the WAN-Interface with different dhcp-leases (local and public IP-addresses) or disappear from etnernet-interface damages dhclient ? |
|
The feature in #2517 looks interesting, since interface up/down then events are then irrelevant. |
|
Closing this in favour of implementing #2517 as time permits. |
Situation:
When Cable-Modem lost link, it keeps rebooting and WAN-Ethernet-Link goes up and down.
If the network-problem of the internet provider is repaired within some minutes, everything is ok.
But if the provider problem last more than ca 10 minutes, the dhcp-Client on WAN from OPNsense gives up and internet connection stays down until manual intervention/renew in WEB-GUI.
Here the chronology:
Cable Modem lost Sync, reboots
Mar 5 08:55:21 kernel: igb1: link state changed to DOWN
Mar 5 08:55:21 configd.py: [7e29785b-20d7-416a-8f12-fa4bdfb85d41] Linkup stopping igb1
Mar 5 08:55:22 opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet detached event for wan
Mar 5 08:55:22 opnsense: /usr/local/etc/rc.linkup: Clearing states to old gateway 109.91.104.1.
Cable Modem link comes up again
Mar 5 08:55:41 kernel: igb1: link state changed to UP
Mar 5 08:55:41 configd.py: [434f0198-6edb-441d-a6c1-fa097bd702b0] Linkup starting igb1
Mar 5 08:55:42 opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet attached event for wan
Mar 5 08:55:42 opnsense: /usr/local/etc/rc.linkup: HOTPLUG: Configuring interface wan
Mar 5 08:55:46 opnsense: /usr/local/etc/rc.newwanip: On (IP address: 192.168.100.10) (interface: WAN[wan]) (real interface: igb1).
Mar 5 08:55:46 opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'igb1'
OPNSense get's private IP, because Cable-Modem has no sync
Mar 5 08:55:47 opnsense: /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 192.168.100.1
Mar 5 08:55:57 opnsense: /usr/local/etc/rc.newwanip: Aborted IP detection: Resolving timed out after 5689 milliseconds
Mar 5 08:57:04 opnsense: /usr/local/etc/rc.dyndns: Aborted IP detection: Resolving timed out after 5628 milliseconds
Mar 5 08:57:05 opnsense: /usr/local/etc/rc.newwanip: Aborted IP detection: Resolving timed out after 5630 milliseconds
Mar 5 08:57:41 configd_ctl.py: error in configd communication Traceback (most recent call last): File "/usr/local/opnsense/service/configd_ctl.py", line 65, in exec_config_cmd line = sock.recv(65536) timeout: timed out
Next Reboot of Cablemodem and get's private IP
Mar 5 08:58:11 opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'igb1'
Mar 5 08:58:11 opnsense: /usr/local/etc/rc.newwanip: On (IP address: 192.168.100.10) (interface: WAN[wan]) (real interface: igb1).
PROBLEM: DHCP-Renew gives up:
Mar 5 08:58:51 kernel: igb1: link state changed to UP
Mar 5 08:58:51 configd.py: [d1ad4663-1ccd-4997-a240-7c4d9777e122] Linkup starting i
Mar 5 08:58:51 opnsense: /usr/local/etc/rc.linkup: DEVD Ethernet attached event for wan
Mar 5 08:58:51 opnsense: /usr/local/etc/rc.linkup: HOTPLUG: Configuring interface wan
Mar 5 08:58:52 opnsense: /usr/local/etc/rc.linkup: The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf igb1 > /tmp/igb1_output 2> /tmp/igb1_error_output' returned exit code '1', the output was ''
Mar 5 08:59:23 configd.py: unable to sendback response [OK ] for [interface][linkup][['start', 'igb1']] {434f0198-6edb-441d-a6c1-fa097bd702b0}, message was Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 202, in run self.connection.sendall('%s\n' % result) File "/usr/local/lib/python2.7/socket.py", line 228, in meth return getattr(self._sock,name)(*args) error: [Errno 32] Broken pipe
ERROR:
Cable-Modem and WAN-Ethernetlink was multiple times putted down and up
OPNsense will do no more dhcp-client, internet keeps down
Manual Renew with via OPNsense Web-Interface:
Interfaces -> Overview -> WAN:
DHCP was down, klick on "renew"
Mar 5 19:41:20 opnsense: /index.php: Successful login for user 'root' from: 192.168.33.162
Mar 5 19:42:02 opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'igb1'
Mar 5 19:42:02 opnsense: /usr/local/etc/rc.newwanip: On (IP address: 109.91.xx.yy) (interface: WAN[wan]) (real interface: igb1).
...
Internet now works
The text was updated successfully, but these errors were encountered: