Auto Restart Interface
-
I'm having an interesting issue with my pfSense where whenever I lose power the pfSense does not get a WAN IP automatically upon power restore.
I have to go to the Interfaces menu then disable and reenable the WAN interface in order for the pfSense to get an IP again.
Is there a way to have pfSense automatically disable then reenable the WAN interface if the WAN does not have an assigned IP?
Thanks.
-
Is it DHCP? What do the logs show?
You might need to extend the timeout value in the advanced dhclient settings.
Steve
-
@stephenw10 It is DCHP and the DHCP logs don't really show anything around that time frame.
The DHCP lease is for 3600 which should be plenty long enough for a few minutes power outage.... also my IP doesn't change when doing this.
-
Not the lease time, the timeout value the use client uses waiting for the server. After a power outage pfSense reboots and has to pull a new lease. If that also includes the upstream device reconnecting, a cable modem for example, sometimes that can take longer than the time the dhclient allows.
Steve
-
@stephenw10 My pfSense is connected directly to a Verizon Fios ONT that's on the same power circuit. I'm honestly not sure what the ONT does when it reboots or how long it takes to reconnect to the Verizon datacenters.
What would you recommend setting the DHCP timeout setting to? I see that pfSense default is 60 seconds for Timeout.
-
Try double that and see if anything changes at all.
The sort of issues we have seen are when the modem/ONT initially shows as up/linked with pfSense and that triggers the dhclient but then it goes down whilst booting causing dhclient to throw an error and give up.
Something should be logged though if that happens. Either in the dhcp logs or the main system logs.Steve
-
@stephenw10 I checked the DHCP logs and there's no errors. Only standard DHCP request/ACKs for clients on the LAN/VLANs getting their IPs back after a power outage. Nothing for WAN. In face there's nothing for WAN until after I manually disable and then reenable to interface. Then I get:
May 1 14:10:10 pfSense dhclient[64003]: DHCPREQUEST on igb0 to 71.179.171.1 port 67 May 1 14:10:10 pfSense dhclient[64003]: DHCPACK from 71.179.171.1 May 1 14:10:10 pfSense dhclient[41507]: RENEW May 1 14:10:10 pfSense dhclient[41909]: Creating resolv.conf May 1 14:10:10 pfSense dhclient[64003]: bound to [Public IP] -- renewal in 3600 seconds.
The main system log turns over too fast with Snort so I don't have any logs, even from yesterday afteroon.
-
You may need to re-trigger it and check specifically then.
If there's nothing at all in the DHCP logs it probably didn't try to run the dhclient at all. That usually means the WAN NIC was unlinked at the time (the ONT was booting) but became linked before pfSense finished booting failing trigger the usual linkup script.Steve