WAN loosing DHCP IP Address
-
Hi,
Every once and awhile my pfsense box (2.0.1-RELEASE) will loose its wan ip address (dhcp). It will show 0.0.0.0 or nothing in the dashboard. To resolve this problem I can do one of the following:
1-Power cycle the ISP's modem
2-Unplug the WAN rj-45 cable, wait a few seconds and plug it back in
3-Disable and the enable the wan interfaceIs there an easy way to fix this? What I would like to do is create a script or cron job that will run if the wan ip drops or becomes 0.0.0.0. This script would disable and then enable the wan interface automatically. I'm not very good at doing this type thing, so how would I go about it through the web interface? ???
thanks in advance.
-
When your WAN address is reported as 0.0.0.0 is the DHCP client still running? (What is the output of pfSense shell command```
ps ax | grep dhclWhat has the DHCP client recently reported in the system log? (What is the output of pfSense shell command``` clog /var/log/system.log | grep dhclient ```)?
-
Result of "ps ax | grep dhcl" currently. I am mostly remote so I cannot run this command when the problem occurs.
21165 ?? INs 0:00.00 dhclient: sk0 [priv] (dhclient) 25733 ?? INs 0:00.01 dhclient: sk0 (dhclient) 21522 0 S+ 0:00.00 grep dhcl
"Result of "clog /var/log/system.log | grep dhclient", I xxx'd out some of my public ip's.
Jun 4 16:29:42 pfsense dhclient: Adding new routes to interface: sk0 Jun 4 16:29:42 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 4 16:29:42 pfsense dhclient: Creating resolv.conf Jun 4 16:29:42 pfsense dhclient[15504]: bound to xxx.xxx.211.122 -- renewal in 24 185 seconds. Jun 4 16:29:46 pfsense dhclient[15771]: connection closed Jun 4 16:29:46 pfsense dhclient[15771]: connection closed Jun 4 16:29:46 pfsense dhclient[15771]: exiting. Jun 4 16:29:46 pfsense dhclient[15771]: exiting. Jun 4 16:29:46 pfsense dhclient: PREINIT Jun 4 16:29:46 pfsense dhclient[34111]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 4 16:29:47 pfsense dhclient[34111]: DHCPACK from 10.83.100.2 Jun 4 16:29:47 pfsense dhclient: REBOOT Jun 4 16:29:47 pfsense dhclient: Starting add_new_address() Jun 4 16:29:47 pfsense dhclient: ifconfig sk0 inet xxx.xxx.211.122 netmask 255.25 5.248.0 broadcast 255.255.255.255 Jun 4 16:29:47 pfsense dhclient: New IP Address (sk0): xxx.xxx.211.122 Jun 4 16:29:47 pfsense dhclient: New Subnet Mask (sk0): 255.255.248.0 Jun 4 16:29:47 pfsense dhclient: New Broadcast Address (sk0): 255.255.255.255 Jun 4 16:29:47 pfsense dhclient: New Routers (sk0): xxx.xxx.208.1 Jun 4 16:29:47 pfsense dhclient: Adding new routes to interface: sk0 Jun 4 16:29:47 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 4 16:29:47 pfsense dhclient: Creating resolv.conf Jun 4 16:29:47 pfsense dhclient[34111]: bound to xxx.xxx.211.122 -- renewal in 24 183 seconds. Jun 4 16:30:02 pfsense dhclient: PREINIT Jun 4 16:30:02 pfsense dhclient[30945]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 4 16:30:03 pfsense dhclient[30945]: DHCPACK from 10.83.100.2 Jun 4 16:30:03 pfsense dhclient: REBOOT Jun 4 16:30:03 pfsense dhclient: Starting add_new_address() Jun 4 16:30:03 pfsense dhclient: ifconfig sk0 inet xxx.xxx.211.122 netmask 255.25 5.248.0 broadcast 255.255.255.255 Jun 4 16:30:03 pfsense dhclient[41487]: My address (xxx.xxx.211.122) was re-added Jun 4 16:30:03 pfsense dhclient[41487]: My address (xxx.xxx.211.122) was re-added Jun 4 16:30:03 pfsense dhclient: New IP Address (sk0): xxx.xxx.211.122 Jun 4 16:30:03 pfsense dhclient: New Subnet Mask (sk0): 255.255.248.0 Jun 4 16:30:03 pfsense dhclient: New Broadcast Address (sk0): 255.255.255.255 Jun 4 16:30:03 pfsense dhclient: New Routers (sk0): xxx.xxx.208.1 Jun 4 16:30:03 pfsense dhclient: Adding new routes to interface: sk0 Jun 4 16:30:03 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 4 16:30:03 pfsense dhclient: Creating resolv.conf Jun 4 16:30:03 pfsense dhclient[30945]: bound to xxx.xxx.211.122 -- renewal in 24 175 seconds. Jun 4 20:37:43 pfsense dhclient[31021]: connection closed Jun 4 20:37:43 pfsense dhclient[31021]: connection closed Jun 4 20:37:43 pfsense dhclient[31021]: exiting. Jun 4 20:37:43 pfsense dhclient[31021]: exiting. Jun 4 20:37:43 pfsense dhclient: PREINIT Jun 4 20:37:43 pfsense dhclient[41487]: My address (xxx.xxx.211.122) was deleted, dhclient exiting Jun 4 20:37:43 pfsense dhclient[41487]: My address (xxx.xxx.211.122) was deleted, dhclient exiting Jun 4 20:37:43 pfsense dhclient[59394]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 4 20:37:43 pfsense dhclient: FAIL Jun 4 20:37:43 pfsense dhclient[34168]: connection closed Jun 4 20:37:43 pfsense dhclient[34168]: connection closed Jun 4 20:37:43 pfsense dhclient[34168]: exiting. Jun 4 20:37:43 pfsense dhclient[34168]: exiting. Jun 4 20:37:44 pfsense dhclient[59394]: DHCPACK from 10.83.100.2 Jun 4 20:37:44 pfsense dhclient: REBOOT Jun 4 20:37:44 pfsense dhclient: Starting add_new_address() Jun 4 20:37:44 pfsense dhclient: ifconfig sk0 inet xxx.xxx.211.122 netmask 255.25 5.248.0 broadcast 255.255.255.255 Jun 4 20:37:44 pfsense dhclient: New IP Address (sk0): xxx.xxx.211.122 Jun 4 20:37:44 pfsense dhclient: New Subnet Mask (sk0): 255.255.248.0 Jun 4 20:37:44 pfsense dhclient: New Broadcast Address (sk0): 255.255.255.255 Jun 4 20:37:44 pfsense dhclient: New Routers (sk0): xxx.xxx.208.1 Jun 4 20:37:44 pfsense dhclient: Adding new routes to interface: sk0 Jun 4 20:37:44 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 4 20:37:44 pfsense dhclient: Creating resolv.conf Jun 4 20:37:44 pfsense dhclient[59394]: bound to xxx.xxx.211.122 -- renewal in 43 200 seconds. Jun 4 20:37:54 pfsense dhclient: PREINIT Jun 4 20:37:54 pfsense dhclient[20054]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 4 20:37:55 pfsense dhclient[20054]: DHCPACK from 10.83.100.2 Jun 4 20:37:55 pfsense dhclient: REBOOT Jun 4 20:37:55 pfsense dhclient: Starting add_new_address() Jun 4 20:37:55 pfsense dhclient: ifconfig sk0 inet xxx.xxx.211.122 netmask 255.25 5.248.0 broadcast 255.255.255.255 Jun 4 20:37:55 pfsense dhclient[1633]: My address (xxx.xxx.211.122) was re-added Jun 4 20:37:55 pfsense dhclient[1633]: My address (xxx.xxx.211.122) was re-added Jun 4 20:37:55 pfsense dhclient: New IP Address (sk0): xxx.xxx.211.122 Jun 4 20:37:55 pfsense dhclient: New Subnet Mask (sk0): 255.255.248.0 Jun 4 20:37:55 pfsense dhclient: New Broadcast Address (sk0): 255.255.255.255 Jun 4 20:37:55 pfsense dhclient: New Routers (sk0): xxx.xxx.208.1 Jun 4 20:37:55 pfsense dhclient: Adding new routes to interface: sk0 Jun 4 20:37:55 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 4 20:37:55 pfsense dhclient: Creating resolv.conf Jun 4 20:37:55 pfsense dhclient[20054]: bound to xxx.xxx.211.122 -- renewal in 43 194 seconds. Jun 5 08:37:45 pfsense dhclient[1633]: DHCPREQUEST on sk0 to 10.255.255.1 port 67 Jun 5 08:37:46 pfsense dhclient[1633]: DHCPACK from 10.83.100.2 Jun 5 08:37:46 pfsense dhclient: RENEW Jun 5 08:37:46 pfsense dhclient: Creating resolv.conf Jun 5 08:37:46 pfsense dhclient[1633]: bound to xxx.xxx.211.122 -- renewal in 432 00 seconds. Jun 5 08:37:49 pfsense dhclient[26256]: DHCPREQUEST on sk0 to 10.255.255.1 port 67 Jun 5 08:37:49 pfsense dhclient[26256]: DHCPACK from 10.83.100.2 Jun 5 08:37:49 pfsense dhclient: RENEW Jun 5 08:37:49 pfsense dhclient: Creating resolv.conf Jun 5 08:37:49 pfsense dhclient[26256]: bound to xxx.xxx.211.122 -- renewal in 43 198 seconds. Jun 5 13:33:55 pfsense dhclient[20343]: connection closed Jun 5 13:33:55 pfsense dhclient[20343]: connection closed Jun 5 13:33:55 pfsense dhclient[20343]: exiting. Jun 5 13:33:55 pfsense dhclient[20343]: exiting. Jun 5 13:33:56 pfsense dhclient[1633]: My address (xxx.xxx.211.122) was deleted, dhclient exiting Jun 5 13:33:56 pfsense dhclient[1633]: My address (xxx.xxx.211.122) was deleted, dhclient exiting Jun 5 13:33:56 pfsense dhclient: FAIL Jun 5 13:33:56 pfsense dhclient[59591]: connection closed Jun 5 13:33:56 pfsense dhclient[59591]: connection closed Jun 5 13:33:56 pfsense dhclient[59591]: exiting. Jun 5 13:33:56 pfsense dhclient[59591]: exiting. Jun 5 13:55:04 pfsense dhclient: PREINIT Jun 5 13:55:04 pfsense dhclient[45888]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:55:06 pfsense dhclient[45888]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:55:08 pfsense dhclient[45888]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:55:13 pfsense dhclient[45888]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:55:20 pfsense dhclient[45888]: DHCPDISCOVER on sk0 to 255.255.255.255 port 67 interval 2 Jun 5 13:55:22 pfsense dhclient[45888]: DHCPOFFER from 192.168.100.1 Jun 5 13:55:22 pfsense dhclient: ARPSEND Jun 5 13:55:24 pfsense dhclient: ARPCHECK Jun 5 13:55:24 pfsense dhclient[45888]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:55:24 pfsense dhclient[45888]: DHCPACK from 192.168.100.1 Jun 5 13:55:24 pfsense dhclient: BOUND Jun 5 13:55:24 pfsense dhclient: Deleting old routes Jun 5 13:55:24 pfsense dhclient: Starting add_new_address() Jun 5 13:55:24 pfsense dhclient: ifconfig sk0 inet 192.168.100.3 netmask 255.25 5.255.0 broadcast 192.168.100.255 Jun 5 13:55:24 pfsense dhclient: New IP Address (sk0): 192.168.100.3 Jun 5 13:55:24 pfsense dhclient: New Subnet Mask (sk0): 255.255.255.0 Jun 5 13:55:24 pfsense dhclient: New Broadcast Address (sk0): 192.168.100.255 Jun 5 13:55:24 pfsense dhclient: New Routers (sk0): 192.168.100.1 Jun 5 13:55:24 pfsense dhclient: Adding new routes to interface: sk0 Jun 5 13:55:24 pfsense dhclient: /sbin/route add default 192.168.100.1 Jun 5 13:55:24 pfsense dhclient: Creating resolv.conf Jun 5 13:55:24 pfsense dhclient[45888]: bound to 192.168.100.3 -- renewal in 30 seconds. Jun 5 13:55:54 pfsense dhclient[2823]: DHCPREQUEST on sk0 to 192.168.100.1 port 67 Jun 5 13:55:54 pfsense dhclient[2823]: DHCPACK from 192.168.100.1 Jun 5 13:55:54 pfsense dhclient: RENEW Jun 5 13:55:54 pfsense dhclient: Creating resolv.conf Jun 5 13:55:54 pfsense dhclient[2823]: bound to 192.168.100.3 -- renewal in 30 seconds. Jun 5 13:56:20 pfsense dhclient[46162]: connection closed Jun 5 13:56:20 pfsense dhclient[46162]: connection closed Jun 5 13:56:20 pfsense dhclient[46162]: exiting. Jun 5 13:56:20 pfsense dhclient[46162]: exiting. Jun 5 13:56:23 pfsense dhclient: PREINIT Jun 5 13:56:23 pfsense dhclient[20954]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:56:23 pfsense dhclient[20954]: DHCPACK from 192.168.100.1 Jun 5 13:56:23 pfsense dhclient: REBOOT Jun 5 13:56:23 pfsense dhclient: Starting add_new_address() Jun 5 13:56:23 pfsense dhclient: ifconfig sk0 inet 192.168.100.3 netmask 255.25 5.255.0 broadcast 192.168.100.255 Jun 5 13:56:23 pfsense dhclient: New IP Address (sk0): 192.168.100.3 Jun 5 13:56:23 pfsense dhclient: New Subnet Mask (sk0): 255.255.255.0 Jun 5 13:56:23 pfsense dhclient: New Broadcast Address (sk0): 192.168.100.255 Jun 5 13:56:23 pfsense dhclient: New Routers (sk0): 192.168.100.1 Jun 5 13:56:23 pfsense dhclient: Adding new routes to interface: sk0 Jun 5 13:56:23 pfsense dhclient: /sbin/route add default 192.168.100.1 Jun 5 13:56:23 pfsense dhclient: Creating resolv.conf Jun 5 13:56:23 pfsense dhclient[20954]: bound to 192.168.100.3 -- renewal in 30 seconds. Jun 5 13:56:53 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:56:54 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:56:55 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:56:56 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:56:57 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:56:59 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:57:01 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:57:05 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:57:13 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 192.168.100.1 por t 67 Jun 5 13:57:24 pfsense dhclient: EXPIRE Jun 5 13:57:24 pfsense dhclient: Deleting old routes Jun 5 13:57:24 pfsense dhclient: PREINIT Jun 5 13:57:24 pfsense dhclient[25733]: DHCPDISCOVER on sk0 to 255.255.255.255 port 67 interval 1 Jun 5 13:57:25 pfsense dhclient[25733]: DHCPOFFER from 10.83.100.2 Jun 5 13:57:25 pfsense dhclient: ARPSEND Jun 5 13:57:27 pfsense dhclient: ARPCHECK Jun 5 13:57:27 pfsense dhclient[25733]: DHCPREQUEST on sk0 to 255.255.255.255 p ort 67 Jun 5 13:57:28 pfsense dhclient[25733]: DHCPACK from 10.83.100.2 Jun 5 13:57:28 pfsense dhclient: BOUND Jun 5 13:57:28 pfsense dhclient: Deleting old routes Jun 5 13:57:28 pfsense dhclient: Starting add_new_address() Jun 5 13:57:28 pfsense dhclient: ifconfig sk0 inet xxx.xxx.211.122 netmask 255.25 5.248.0 broadcast 255.255.255.255 Jun 5 13:57:28 pfsense dhclient: New IP Address (sk0): xxx.xxx.211.122 Jun 5 13:57:28 pfsense dhclient: New Subnet Mask (sk0): 255.255.248.0 Jun 5 13:57:28 pfsense dhclient: New Broadcast Address (sk0): 255.255.255.255 Jun 5 13:57:28 pfsense dhclient: New Routers (sk0): xxx.xxx.208.1 Jun 5 13:57:28 pfsense dhclient: Adding new routes to interface: sk0 Jun 5 13:57:28 pfsense dhclient: /sbin/route add default xxx.xxx.208.1 Jun 5 13:57:28 pfsense dhclient: Creating resolv.conf Jun 5 13:57:28 pfsense dhclient[25733]: bound to xxx.xxx.211.122 -- renewal in 33 609 seconds.
-
Can anybody offer any help or advise?
-
I wonder why dhclient is exiting, for example:
@thestealth:Jun 4 16:29:46 pfsense dhclient[15771]: connection closed Jun 4 16:29:46 pfsense dhclient[15771]: connection closed Jun 4 16:29:46 pfsense dhclient[15771]: exiting. Jun 4 16:29:46 pfsense dhclient[15771]: exiting. Jun 5 13:56:20 pfsense dhclient[46162]: connection closed Jun 5 13:56:20 pfsense dhclient[46162]: connection closed Jun 5 13:56:20 pfsense dhclient[46162]: exiting. Jun 5 13:56:20 pfsense dhclient[46162]: exiting.
Does the system log show Link down/Link up reports at around the times dhclient exits?
If I recall correctly, stephenw10 has posted a number of reports on sk devices including how to update firmware to make them better behaved.
If you haven't already tried it, it might be worth installing a snapshot build of pfSense 2.1 because the snapshot builds include the latest release of FreeBSD and consequently the latest released device drivers.
-
Do you have a link to the discussion about these updated drivers?
-
Do you have a link to the discussion about these updated drivers?
snapshot builds of pfSense 2.1 can be downloaded by following the appropriate links on http://snapshots.pfsense.org
My recollection about updated firmware for sk devices appears to be incorrect. It appears msk devices can be made to behave better with a firmware update - see http://forum.pfsense.org/index.php/topic,20095.msg203322.html#msg203322 Sorry for the misleading hint.
-
Thanks for the help. With this information, I did a search for posts by stephenw10 and found the following post containing a script that cycles the WAN interface to do what I need.