pfSense WAN dhcp client exiting (error)
-
I have now installed a router for testing between the ISP modem and the Pfsense and the router confirms that the Pfsense has received the IP address via DHCP.
Therefore, I am quite sure that something has to go wrong in the script from the Pfense.
Just have to find out and need a little luck...
-
Yup since setting it fixed avoids the issue it must be dhclient triggering something. But dhclient alone cannot cause the link to flap so something else much be in play.
If you're able to I would test a default config and see if that still hit's it.
-
@stephenw10 said in pfSense WAN dhcp client exiting (error):
If you're able to I would test a default config and see if that still hit's it.
It would be roughly as if the hotline recommend to reinstall Windows, logically then the error will disappear.
With Linux, I may have a little chance to find the mistake, so a new installation would only be considered as the very last one for me.
Thanks anyway
-
Not really found, but error is gone.
Probable cause Keyword: GATEWAY
I had set up two additional gateways to monitor two of my websites BUT the "Disable Gateway Monitoring Action" was activated.
In the script "/etc/rc.linkup" there was the following line for dynamic IP:
else {
log_error("Hotplug event detected for {$friendly}({$iface}) dynamic IP address {$staticv4}, ({$addrs})");
switch ($action) {
case "stop":
log_error("DEVD Ethernet detached event for {$staticv4}, {$iface}");So there had to be an error in the Pfsense LOG and I kept having this entry.
A little further down in the script it says:
if (empty($gw4ip)) {
$gw4ip = get_interface_gateway_last($iface, 'inet');Why “_last”?
That seemed strange to me and so I deleted all gateway entries and a separate view under STATUS/MONITOR that used a gateway.Switched everything to DHCP again and the error was gone.
Strange thing with the "_last"...
-
By the way, of course, the default gateway was set fixed (no automatic) to DHCP Gateway.
-
Can you test that with DHCP WAN?
The purpose of testing with a default config (not reinstalled) is to determine if the issue is with the config or something with the local setup. That would have removed those additional gateways likely showing it is a config issue.
That is interesting though, I would not expect that to make any difference there. It tries to use the 'last gateway' value there for a dynamic gateway if a new one cannot be pulled.
-
I tested this with WAN DHCP.
However, I now have a new problem.
I haven't changed the gateway configuration for years.
When I pull the network plug now, the gateway suddenly disappears in the dashboard and also under system/routing/gateways
Is that normal?
Where can you get a default config?
-
If it's dynamic and you have never set anything custom on it (which seems unlikely here!) then it might. Resaving the gateway to create a config entry for it should allow to show as present but down.
-
What a mess!
At a Thin Client, Pfense threw me out when I configured via WAN (RJ45) and a WLAN defined as a LAN before I could activate the WLAN (changed the WAN rule); However, did not work because the Pfense had not tolerated the WLAN stick :-(
An old PC reactivated, but had to buy network cards and wanted to give it an SSD, but no clon program worked :-(
Well on the PC now Pfense from newly installed and only the backup (XML file) recorded from the production machine and the error reappears and it loops without end :-)
Okay the test machine is of course not identical to production, so I had to delete a lot on the log, but the error remains identical.
There seems to be an automatic that automatically creates the gateway wan_dhcp and a script which classifies this gateway as invalid and deletes and then the automatism creates it again and so the whole thing turns in a loop.
Is just wondering what that is?
-
Protocol was already marked as spam :-(
-
So what error do you see exactly in this new setup?
-
Exactly what I had already sent:
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:15 TEST check_reload_status[294]: Restarting IPsec tunnels
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: HOTPLUG: Configuring interface wan
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: DEVD Ethernet attached event for wan
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp) -
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?