DHCP only get a lease on reboot
-
I've got a strange problem with my PFS.
In a unpredictable time, the pf will loose the IP adress of the WAN interface and dhclient isn't able to get a new lease. This happend about 2 weeks ago but I didn't care as much since it wasn't that frequent. But now it happends a few time each day. And the only way to fix it is to reboot. I was running 2.0-RC3 when the problem arose but have updated to 2.0-RELEASE yesterday without any luck.
My setup is simple for the WAN. Running as DHCP, using the local MAC, the two checkboxes at the bottom is unchecked. No firewall rules is preventing the traffic.
I also got a problem with my server on the LAN network (maybe it's related, maybe not). The connection have been working fine but last week when I was going to update some packages, it can't connect to the internet. Investigation show that SYN is passing out on the Internet but no packages are coming pack. I've got two other PC's on the LAN which have no problem connecting. Also, I can ssh IN to the server but not out. I'm using a reflective NAT-rule for the ssh-access.
I'm glad to give more related info on demand, unsure what you require to help.
-
I suggest you use the pfSense shell command
clog /var/log/system.log | grep dhclient
to examine the current dhclient entries in the system log so you know what they look like when dhclient is working.
Then when you think your WAN dhclient has failed to renew repeat the same command and see if there is anything different. It would also be worthwhile giving the command
ps ax | grep dhclient
to verify dhclient is still running.
-
I was checking the logs after a reboot (as always) and what I noted was that dhclient isn't logging a thing. The only trace I found of the WAN interface is from "php" using rc.newwanip.
And on top of all that, I'm not able to surf to surtain sites. The content of the sites I'm trying to visit are unrelated. I've tried sites I havn't been visiting for years and some of them work. The effect is that the titlebar change to the title of the page but no content is loaded, just saying "Connecting…".
Is it related?
-
I was checking the logs after a reboot (as always) and what I noted was that dhclient isn't logging a thing.
Where did you check? By default the web GUI log doesn't show all available entries.
Is dhclient running?
-
Yeah, I don't use the gui more than I need to so I always check the logs from commandline. And their was nothing from dhclient :/
Dhclient is running….
-
Yeah, I don't use the gui more than I need to so I always check the logs from commandline. And their was nothing from dhclient :/
I have no trouble with dhclient getting a new lease on my system. Here's an extract from the system log (lease renewal time is 1 hour):
clog /var/log/system.log | grep dhclient
Sep 18 21:41:16 pfsense2 dhclient: RENEW
Sep 18 21:41:16 pfsense2 dhclient: Creating resolv.conf
Sep 18 22:41:34 pfsense2 dhclient: RENEW
Sep 18 22:41:34 pfsense2 dhclient: Creating resolv.conf
Sep 18 23:41:52 pfsense2 dhclient: RENEW
Sep 18 23:41:52 pfsense2 dhclient: Creating resolv.conf
. . .
Sep 24 21:43:09 pfsense2 dhclient: RENEW
Sep 24 21:43:09 pfsense2 dhclient: Creating resolv.conf
Sep 24 22:43:09 pfsense2 dhclient: RENEW
Sep 24 22:43:09 pfsense2 dhclient: Creating resolv.conf
Sep 24 23:43:10 pfsense2 dhclient: RENEW
Sep 24 23:43:10 pfsense2 dhclient: Creating resolv.confWhat are your logs full of that the dhcp lease fails to get renewed a few times a day and there is no record of dhclient in your logs?
Dhclient is running….
Here's what dhclient processes look like on my system:
ps lax | grep dhclient
0 7393 1 0 76 0 3316 1328 select Is ?? 0:00.41 dhclient: vr0 [priv] (dhclient)
65 13400 1 0 44 0 3316 1452 select Is ?? 0:00.38 dhclient: vr0 (dhclient)
0 53718 53504 0 46 0 3524 1204 - R+ 0 0:00.01 grep dhclient