pfSense WAN dhcp client exiting (error)
-
Hmm, the log ordering there is odd since the WAN_DHCP gateway should be valid at that point having just connected the WAN.
Unless maybe you have another gateway named WAN_DHCP that's conflicting?
-
No, there is no other gateway, only the WAN_DHCP, which is automatically created by the firewall.
Hmm, has to search the backup file (.xml) of production, maybe something will happen.
But that will take a while. -
So if you save the gateway when it's present does that create the config entry? And does that prevent the invalid gateway logs?
-
I deleted all gateways and then entered a fixed IP under Interface/WAN first under IP4 (as a workaround). Then I again changed the IP4 to DHCP (converted for testing) and added the gateway in the same menu item using Add Gateway. Since then, the gateway has been invalid, is deleted and immediately created.
-
Ah, sounds like you may have added a second gateway. If an interface is set to DHCP the gateway is always added auto automatically and you should not have to add anything.
-
And that's exactly why I deleted all gateways.
There is no second gateway! -
Hmm, do you have any policy routing rules with a gateway set perhaps?
-
@Nosense-0 said in pfSense WAN dhcp client exiting (error):
and added the gateway in the same menu item using Add Gateway.
What exactly did you do for that then?
-
@stephenw10 said in pfSense WAN dhcp client exiting (error):
@Nosense-0 said in pfSense WAN dhcp client exiting (error):
and added the gateway in the same menu item using Add Gateway.
What exactly did you do for that then?
Deleting all gateways, so I con setup the Gateway directly in the same menu where I set the static IP4 Address.
-
Policy:
Production=Yes
Test=NoBut I will only work with the test system.
-
Since the Pfense offers the possibility of a partial backup (backup area) I have now saved the production according to Backup Area and, according to a factory reset of the test system, the individual backup on the test restored.
The loop performed in the restore of the backup area "Interface".
The log has only changed a little.Apr 8 21:10:46 php-fpm 65216 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:10:46 check_reload_status 4169 Linkup starting re0
Apr 8 21:10:46 kernel re0: link state changed to DOWN
Apr 8 21:10:46 rc.gateway_alarm 5106 >>> Gateway alarm: WAN_DHCP (Addr:xxx.xxx.xxx.xxx Alarm:down RTT:0ms RTTsd:0ms Loss:100%)
Apr 8 21:10:46 check_reload_status 4169 updating dyndns WAN_DHCP
Apr 8 21:10:46 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:10:46 check_reload_status 4169 Restarting OpenVPN tunnels/interfaces
Apr 8 21:10:47 php-fpm 3497 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:10:47 php-fpm 3497 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:10:47 php-fpm 3497 /rc.newwanip: IP Address has changed, killing states on former IP Address 0.0.0.0.
Apr 8 21:10:47 php-fpm 3497 /rc.newwanip: Resyncing OpenVPN instances for interface WAN.
Apr 8 21:10:47 php-fpm 3497 /rc.newwanip: Creating rrd update script
Apr 8 21:10:50 php-fpm 3497 /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 0.0.0.0 -> xxx.xxx.xxx.xxx - Restarting packages.
Apr 8 21:10:50 check_reload_status 4169 Starting packages
Apr 8 21:10:50 check_reload_status 4169 Reloading filter
Apr 8 21:10:50 check_reload_status 4169 Linkup starting re0
Apr 8 21:10:50 kernel re0: link state changed to UP
Apr 8 21:10:51 php-fpm 70335 /rc.start_packages: Restarting/Starting all packages.
Apr 8 21:10:51 check_reload_status 4169 rc.newwanip starting re0
Apr 8 21:10:51 php-fpm 65216 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:10:51 php-fpm 65216 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:10:51 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:10:51 check_reload_status 4169 updating dyndns wan
Apr 8 21:10:51 check_reload_status 4169 Reloading filter
Apr 8 21:10:51 php-fpm 69818 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:10:51 php-fpm 69818 /rc.linkup: DEVD Ethernet detached event for wan
Apr 8 21:10:52 php-fpm 65072 /rc.newwanip: rc.newwanip: Info: starting on re0.
Apr 8 21:10:52 php-fpm 65072 /rc.newwanip: rc.newwanip: on (IP address: xxx.xxx.xxx.xxx) (interface: WAN[wan]) (real interface: re0).
Apr 8 21:10:52 check_reload_status 4169 Reloading filter
Apr 8 21:10:52 php-fpm 70335 /rc.filter_configure_sync: dpinger: No dpinger session running for gateway LAN_DHCP
Apr 8 21:10:52 php-fpm 30297 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:10:52 php-fpm 30297 /rc.linkup: DEVD Ethernet attached event for wan
Apr 8 21:10:52 php-fpm 30297 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:10:52 check_reload_status 4169 Linkup starting re0
Apr 8 21:10:52 kernel re0: link state changed to DOWN
Apr 8 21:10:52 rc.gateway_alarm 64399 >>> Gateway alarm: WAN_DHCP (Addr:xxx.xxx.xxx.xxx Alarm:down RTT:0ms RTTsd:0ms Loss:100%)
Apr 8 21:10:52 check_reload_status 4169 updating dyndns WAN_DHCP
Apr 8 21:10:52 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:10:52 check_reload_status 4169 Restarting OpenVPN tunnels/interfaces
Apr 8 21:10:56 check_reload_status 4169 Linkup starting re0
Apr 8 21:10:56 kernel re0: link state changed to UP
Apr 8 21:10:58 check_reload_status 4169 rc.newwanip starting re0
Apr 8 21:10:58 php-fpm 30297 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:10:58 php-fpm 30297 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:10:58 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:10:58 check_reload_status 4169 updating dyndns wan
Apr 8 21:10:58 check_reload_status 4169 Reloading filter
Apr 8 21:10:58 php-fpm 65216 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:10:58 php-fpm 65216 /rc.linkup: DEVD Ethernet detached event for wan
Apr 8 21:10:59 php-fpm 70335 /rc.newwanip: rc.newwanip: Info: starting on re0.
Apr 8 21:10:59 php-fpm 70335 /rc.newwanip: rc.newwanip: on (IP address: xxx.xxx.xxx.xxx) (interface: WAN[wan]) (real interface: re0).
Apr 8 21:11:00 check_reload_status 4169 Reloading filter
Apr 8 21:11:00 php-fpm 69818 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:00 php-fpm 69818 /rc.linkup: DEVD Ethernet attached event for wan
Apr 8 21:11:00 php-fpm 69818 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:11:00 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:00 kernel re0: link state changed to DOWN
Apr 8 21:11:00 rc.gateway_alarm 49508 >>> Gateway alarm: WAN_DHCP (Addr:xxx.xxx.xxx.xxx Alarm:down RTT:0ms RTTsd:0ms Loss:100%)
Apr 8 21:11:00 check_reload_status 4169 updating dyndns WAN_DHCP
Apr 8 21:11:00 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:00 check_reload_status 4169 Restarting OpenVPN tunnels/interfaces
Apr 8 21:11:01 php-fpm 70335 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:11:01 php-fpm 70335 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:11:01 php-fpm 70335 /rc.newwanip: IP Address has changed, killing states on former IP Address 0.0.0.0.
Apr 8 21:11:01 php-fpm 70335 /rc.newwanip: Resyncing OpenVPN instances for interface WAN.
Apr 8 21:11:01 php-fpm 70335 /rc.newwanip: Creating rrd update script
Apr 8 21:11:03 php-fpm 70335 /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 0.0.0.0 -> xxx.xxx.xxx.xxx - Restarting packages.
Apr 8 21:11:03 check_reload_status 4169 Starting packages
Apr 8 21:11:03 check_reload_status 4169 Reloading filter
Apr 8 21:11:03 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:03 kernel re0: link state changed to UP
Apr 8 21:11:04 php-fpm 3586 /rc.start_packages: Restarting/Starting all packages.
Apr 8 21:11:05 check_reload_status 4169 rc.newwanip starting re0
Apr 8 21:11:05 php-fpm 69818 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:05 php-fpm 69818 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:05 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:05 check_reload_status 4169 updating dyndns wan
Apr 8 21:11:05 check_reload_status 4169 Reloading filter
Apr 8 21:11:05 php-fpm 99632 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:05 php-fpm 99632 /rc.linkup: DEVD Ethernet detached event for wan
Apr 8 21:11:06 php-fpm 65216 /rc.newwanip: rc.newwanip: Info: starting on re0.
Apr 8 21:11:06 php-fpm 65216 /rc.newwanip: rc.newwanip: on (IP address: xxx.xxx.xxx.xxx) (interface: WAN[wan]) (real interface: re0).
Apr 8 21:11:06 check_reload_status 4169 Reloading filter
Apr 8 21:11:06 php-fpm 3586 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:06 php-fpm 3586 /rc.linkup: DEVD Ethernet attached event for wan
Apr 8 21:11:06 php-fpm 3586 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:11:06 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:06 kernel re0: link state changed to DOWN
Apr 8 21:11:06 rc.gateway_alarm 1708 >>> Gateway alarm: WAN_DHCP (Addr:xxx.xxx.xxx.xxx Alarm:down RTT:0ms RTTsd:0ms Loss:100%)
Apr 8 21:11:06 check_reload_status 4169 updating dyndns WAN_DHCP
Apr 8 21:11:06 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:06 check_reload_status 4169 Restarting OpenVPN tunnels/interfaces
Apr 8 21:11:10 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:10 kernel re0: link state changed to UP
Apr 8 21:11:12 check_reload_status 4169 rc.newwanip starting re0
Apr 8 21:11:12 php-fpm 3586 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:12 php-fpm 3586 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:12 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:12 check_reload_status 4169 updating dyndns wan
Apr 8 21:11:12 check_reload_status 4169 Reloading filter
Apr 8 21:11:12 php-fpm 69818 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:12 php-fpm 69818 /rc.linkup: DEVD Ethernet detached event for wan
Apr 8 21:11:13 php-fpm 70335 /rc.newwanip: rc.newwanip: Info: starting on re0.
Apr 8 21:11:13 php-fpm 70335 /rc.newwanip: rc.newwanip: on (IP address: xxx.xxx.xxx.xxx) (interface: WAN[wan]) (real interface: re0).
Apr 8 21:11:13 check_reload_status 4169 Reloading filter
Apr 8 21:11:13 php-fpm 99632 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:13 php-fpm 99632 /rc.linkup: DEVD Ethernet attached event for wan
Apr 8 21:11:13 php-fpm 99632 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:11:13 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:13 kernel re0: link state changed to DOWN
Apr 8 21:11:13 rc.gateway_alarm 88492 >>> Gateway alarm: WAN_DHCP (Addr:xxx.xxx.xxx.xxx Alarm:down RTT:0ms RTTsd:0ms Loss:100%)
Apr 8 21:11:13 check_reload_status 4169 updating dyndns WAN_DHCP
Apr 8 21:11:13 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:13 check_reload_status 4169 Restarting OpenVPN tunnels/interfaces
Apr 8 21:11:15 php-fpm 70335 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:11:15 php-fpm 70335 /rc.newwanip: Gateway, NONE AVAILABLE
Apr 8 21:11:15 php-fpm 70335 /rc.newwanip: IP Address has changed, killing states on former IP Address 0.0.0.0.
Apr 8 21:11:15 php-fpm 70335 /rc.newwanip: Resyncing OpenVPN instances for interface WAN.
Apr 8 21:11:15 php-fpm 70335 /rc.newwanip: Creating rrd update script
Apr 8 21:11:17 php-fpm 70335 /rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 0.0.0.0 -> xxx.xxx.xxx.xxx - Restarting packages.
Apr 8 21:11:17 check_reload_status 4169 Starting packages
Apr 8 21:11:17 check_reload_status 4169 Reloading filter
Apr 8 21:11:18 check_reload_status 4169 Linkup starting re0
Apr 8 21:11:18 kernel re0: link state changed to UP
Apr 8 21:11:18 php-fpm 65216 /rc.start_packages: Restarting/Starting all packages.
Apr 8 21:11:20 check_reload_status 4169 rc.newwanip starting re0
Apr 8 21:11:20 php-fpm 99632 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:20 php-fpm 99632 /rc.linkup: Gateway, NONE AVAILABLE
Apr 8 21:11:20 check_reload_status 4169 Restarting IPsec tunnels
Apr 8 21:11:20 check_reload_status 4169 updating dyndns wan
Apr 8 21:11:20 check_reload_status 4169 Reloading filter
Apr 8 21:11:20 php-fpm 30297 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:20 php-fpm 30297 /rc.linkup: DEVD Ethernet detached event for wan
Apr 8 21:11:21 php-fpm 69818 /rc.newwanip: rc.newwanip: Info: starting on re0.
Apr 8 21:11:21 php-fpm 69818 /rc.newwanip: rc.newwanip: on (IP address: xxx.xxx.xxx.xxx) (interface: WAN[wan]) (real interface: re0).
Apr 8 21:11:21 check_reload_status 4169 Reloading filter
Apr 8 21:11:21 php-fpm 65216 /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp)
Apr 8 21:11:21 php-fpm 65216 /rc.linkup: DEVD Ethernet attached event for wan
Apr 8 21:11:21 php-fpm 65216 /rc.linkup: HOTPLUG: Configuring interface wan
Apr 8 21:11:21 kernel re0: link state changed to DOWN -
@Nosense-0 said in pfSense WAN dhcp client exiting (error):
Deleting all gateways, so I con setup the Gateway directly in the same menu where I set the static IP4 Address.
You shouldn't add anything manually if the WAN is set to DHCP. At the very least it can't have the same name.
However it looks like you're back to the same link flapping issue here after restoring part of the config. It's still odd. Nothing that's shown as running there should cause the WAN NIC to lose link
Have you tried setting that device to fixed speed/duplex?
-
I had bought an extra mini NIC for a thin client (the computer is much faster than my old test computer) and it only arrived from China last week and so I now have one Pfsense for production and two with different hardware to test.
You won't believe me now, all three computers, despite having different hardware, showed the same error.
It took me ages to restore the individual backups (one per backup era) of the production onto the two test servers and then test them.
None of this made any difference. So in the end, completely frustrated, I went and deleted every single configuration on the test server, step by step. That took a really long time because I had rebooted the test server in the meantime, just to be sure that the change had an effect.
After that didn't help, I compared the configuration of a new, fresh installation, line by line from the XML backup file, what an amazing job and was actually able to find the error, this line triggers the loop:
<media>autoselect</media>
The entry "autoselect" is under Interfaces/WAN Speed and Duplex, which the programmers can now find out and also why the loop begins with it (see script rc.linkup Line "interface_configure($iface, true, true);").
Even a fixed value didn't solve the problem for me.
You just need to switch back to "Default (no preference, typically autoselect)"; ATTENTION do not set autoselect to "typically" where the text "WARNING: MUST be set to autoselect (automatically negotiate speed) unless the port this interface connects to has its speed and duplex forced." is misleading.
Ugh, what an act!!!
-
Urgh. Well nice to actually find the issue at least. Were all three devices using the same NIC type, all Realtek NICs?
-
Of the NICs, mainly Intel (different versions with different processors) and Realtek (different versions with different processors, tested with and without package Realtek-Re-km98.00_3).
In the meantime, the Firewall Ipfire and the Sophos Firewall had also installed on the two test computers, there were no problems.
Estimated the Pfense version 2.7.2 up to 50 times on the two test computers completely reinstalled in order to have comparable outcome.
Likewise, the script rc.linkup manipulated in order to generate entries in the system log, determined that this script is called several times (different PID in the logs), which the analysis really made really difficult.
Other mistakes discovered, but I will first have to search for whether they are known in the forum and whether there is already a solution.
I have had enough of testing now, I have other hobbies ...
-
Hmm, I've seen issues with igc flapping when you set 'autoselect' specifically but not any other driver.
-
Since I now know what I have to look for, I have busy with autonegotiation today and the pfSense version 2.7.2 definitely has a problem (not above the boot).
A restart of the ISP modem was simulated. Whatever led to a loop of the WAN Interfaces (if it under interfaces/wan/speed and duplex = autoselect).
I tried this with different NIC´s and Switches between the pfSense and the ISP, the problem can be clearly reproduced.
The solution to me is that the Switch/ISP is on negotiation and the pfSense, as already described, remains on default.
-
Hmm, so I assume a switch in between the modem and pfSense prevent the NIC flapping when the modem is reset?
Autoselect should be the default link setting anyway. The difference is that when you set the interface to autoselect, rather then leaving it set to default, the system runs ifconfig against it. That shouldn't make any difference but it seems in some circumstances it can.
-
No, the Switch simulates the NIC of the ISP modem and when I turn the Switch off, it is as if the ISP modem is booting, well and then the loop is created by the pfSene.
Since I also have a dedicated SYSLOG server, I can check this. PfSense is the only firewall that has problems with this, the other computers, firewalls or NAS etc. have no problems with it.
-
But if you do have the switch between the modem and pfSense it prevents the loop if the modem is rebooted? In other words it's a layer 1 problem, not layer 2.