New install- no DHCP assignments after PC sleeping
-
Hi,
I am mostly happy at this point, with only a few issues to be resolved (no pun intended) It seems that on some mornings the firewall does not recognize that a PC woke up from sleep. On wakeup, there is no IP assignment. I tried ipconfig /release, no good. I had to go to the firewall, open the laptop, connect into the LAN port, Login, and reset the DHCP server. Then the newly awoken device shows up and is given an IP. Is there a way to fix this?
Thanks in advance -
@bill1 said in New install- no DHCP assignments after PC sleeping:
On wakeup, there is no IP assignment.
pfSense doesn't care about if devices are waking, sleep well, or whatever.
Also : DHCP is client server construction. That is, by default, the DHCP server does nothing. Knows nothing.
Things start to work wgen a device, the DHCP client starts to ask for a "DHCP Lease".The "wake up" is a valid and known 'device event'. Upon reception, the DHCP client will check the actual duration of the lease DHCP (IP, network, gateway, DNS etc) and use a renew, if the lease is half way its time, or a request, if needed to be redone entirely. If it doesn't, the DHCP client is broken. This is of course not the case for all known OS's these days.
@bill1 said in New install- no DHCP assignments after PC sleeping:
Is there a way to fix this?
As always : what do admins do ?
The first part of their lives : looks at logs .... because that's where the exceptional situations are noted down. Often, as I stated in another forum message today, by 'tailing' a log file.So :
Show the pfSense DHCP server log at that moment.
That is,show some minutes before up until some minutes after this event.
If there are no REQUEST's or RENEW's coming in from the client, the DHCP server will do nothing.
If the pfSense DHCP server doesn't work well, that would have been known, as it will break hundreds of thousands of pfSense set up's right away. And this forum would explode now.So : yeah, you probably have an issue. Yet you didn't mention any details about it.
The fixing part kick in as soon as the problem is defined. -
Also, run Packet Capture to see if there are any requests from that computer coming in.
-
@JKnott said in New install- no DHCP assignments after PC sleeping:
run Packet Capture
W'll get to that if needed
For the moment I like to see interface details, DHCP server settings per interface.
Knowing that DHCP traffic can not be blocked by the firewall - hidden pass rules exists for DHCP, which can not be undone, I like also to know if there are switches involved etc. -
@Gertjan said in New install- no DHCP assignments after PC sleeping:
The first part of their lives : looks at logs
SO, this happened again. Both my office machines after a sleep, wake up to no internet. Actually there is no DHCP assignment in the PC's. (other machines including Roku are working, cable modem is good) I checked with IPCONFIG, and the IP is incorrect. I dont know the process, but there was an odd ip, and no gateway assigned. I tried /release, I also tried ipconfig /renew and nothing.
I tried getting into the firewall @ 192.168.1.1, but nothing (i realize that I wasnt in the same subnet). SO I go over to the firewall, boot up the laptop, plug into the firewall, get into PF sense, and check the logs. Nothing jumps out at me, not that I know what to look for anyway, except that it was running and there were no fatal faults or anything. I reset the service. I see the log update, the time is 3 hours off. But the service restart added so many entries, it pushed the entries before the reset out of the log. And the office machines were working.
I fixed the time zone. Next time it happens I will get a screen shot before I reset the service. What would cause the machines to drop their DHCP config? This didnt happen before so I assume it must be related to the firewall.
Thanks for your help. -
@bill1 said in New install- no DHCP assignments after PC sleeping:
I fixed the time zone
That's a setting that should never change after initial pfSense setup.
No one change time zone during night, except if you have pfSense running in a plane.If the time isn't right, then everything based on time goes haywire. And that will be a lot.
@bill1 said in New install- no DHCP assignments after PC sleeping:
but there was an odd ip
The auto assigned one : 69....... ?
That happens when no DHCP server can be reached.
Or DHCP server replies not acceptable because, for example, the lease received was already in the past.
The transactions would be in the DHCP server log.
You should have :
Contact the console access of pfSense, and inspect the DHCP log - and at the same time renew the IP on your PC.
Was the request logged ? If not, the pfSEnse could be reached : Ethernet failure like a bad switch, cable ? -
the time wasnt right from the beginning. Probably had it set for west coast by accident. It made understanding the log more difficult.
The issue, as I am trying to understand it is that my office PC's somehow loose their DHCP settings while sleeping. Or maybe they loose it when they wake up. But when they do wake up, sometimes, the DHCP config is gone. The message indicates an unknown network connected but with the 69... ip .
I tried ipconfig /release and also ipconfig /renew, but nothing. I did not see these requests in the DHCP service log. Restarting the DHCP service works, but its a pia. To me, this indicates that its probably not a bad switch or cable. What do you think? -
Devices, like PC or anything else, can go to power down mode.If the NIC is also powered down, any IP address info will be lost upon re activation.
At the moment, the DHCP client on the device will start a classic IP request.
We all have device that goto sleep ion our networks. It's quiet common these days. Waking them up will update it's network settings.I just tried it with a PC next to me.
I activated the sleep mode. Waited 10 seconds, and moved the mouse. The PC woke up, and I saw the DHCP request in the DHCP, logs.
What I saw was a pait of DCPINFORM and DHCPACK right before it went to sleep mode.
After it woke up, and identical DCPINFORM and DHCPACK pair showed up in the logs.I guess the DHCP server will not 'stop' or 'break' if some device goes into sleep mode - that would be a huge bug.
If the DHCP server fails, then that has nothing to do with device. And it would have an effect on all devices on your network.There is a switch between the device and pfSEnse, right ?
-
yes, there is a switch, its a Netgear GS108. In the switch, I have 2 PC's, a printer, and a VOIP. Both PC's were down. Not sure on the VOIP and printer. I will check next time, as well as printing the DHCP service log.
-
SO, its been a while. There is still a problem.
A hardware problem was suggested. At first, I suspected the switch in my office (just down from the firewall). It was kind of old so I replaced it. Problem not solved.(not recognizing computer, not assigning IP, occasionally). Next hypothesis- the cable. I bought a 75' cat6 with ends and re-ran. Old is now spare. Still not solved, but I had a long run without problems, a month or 2. Last night there was a problem, I reset the DHCP server and most of the network came up- wife's laptop, roku. My office PC was still down, but I shut down and went to bed. This morning after bootup, it wouldnt get on. No DHCP IP assignment. I screen shotted the logs, but there was nothing that jumped out at me. No DHCP requests. I rebooted. Still no assignment. Then I assigned a manual IP, that worked 192.168.1.238 is outside the DHCP range. I was able to log into the firewall. The status showed that all was well. I had internet access. Then I reset my nic back to DHCP. Everything still worked, however even though I selected DHCP, the IP didnt change from the .238 which is outside the range. Also, in the DHCP lease list, .238 didnt show. Then my wife couldnt get net access on her laptop. Same problem. I reset the DHCP server. no luck. I power cycled the firewall. Still nothing. I rebooted the firewall from diagnostics>reboot. Still nothing. (my office PC working, wife's laptop no IP assignment. ) I tried to set her nic to manual, but we lacked the passwords to get in there. She bailed and went into work. Generally, it seems to me that the resets or reboots dont really reset everything. Here are the logs from before and after a reset. I dont know where to go from here. Any ideas?file:///home/william/Downloads/Screenshot_2020-09-18%20pfSense%20localdomain%20-%20Status%20System%20Logs%20DHCP(1).png
-
This post is deleted! -
-
Hi,
It's time to how your interface settings.
Your LAN settings in detail (especially everything you took away from the default settings)
Your DHCP settings.interface 'em1' is your LAN? right ?
Btw : Diagnostics > Packet Capture has been declared "non-rcoket-sience" since 2001.
Seeclt you LAN, select "Enable promiscuous mode" - remove all devices from LAN except the device you want to test, and start (boot) this device (PC).
The packet capture should start with a classic DHCP negotiation.@bill1 said in New install- no DHCP assignments after PC sleeping:
I power cycled the firewall
Power cycled pfSense ?
That not good at all, and close to perfect if you want to obtain random errors and weird behaviours (file system hosed => very bad ). See the special Netgate / Youtube video about that subject - and see pfSense boot process from the console if it complains about a 'dirty' file system.edit : ok, your second image goes straight into the weird behaviour category.
It shows issues with the IPv6 (!) DHCP client (that is : not the DHCP v6 server, the DHCP v6 client runs on the WAN side to obtain a IPv6 from your upstream ..... router/ISP ?? )
Clean up the system - never rip out the power again - even get an UPS if needed.
Or just export the config, re install pfSEnse, import config (config could even be hosed).Always keep an eye on the console boot process - it doesn't happen a lot, as pfSense doesn't need to be rebooted often (ones or twice a year just before and after upgrades).
-
@Gertjan Thanks so much for your help. FYI, is did NOT "rip" the plug out. I pressed the power button. Since this is the only way to shut it down, I thought it was ok. Its a Protectli vault. (I do have a dedicated UPS for it.) Yes, I believe that EM1 is the port marked LAN. Others are funny. The port labeled OPT1, shows up inside as OPT2, OPT2 shows as OPT3, etc. Usually I dont use the LAN port. When it jams up, I connect my laptop here to troubleshoot. It seems that just connecting to this port wakes up the DHCP most times. I am not sure what you mean by "clean up". I am not using IPv6. I block this traffic.
thanks again -
@bill1 said in New install- no DHCP assignments after PC sleeping:
what you mean by "clean up"
=> This one https://www.youtube.com/watch?v=4DKr1Dvan5I&t=1s
-
@Gertjan OK, I cleaned it up, no errors found. I rebooted and didnt see anything in the logs that jumped out at me. Working so far!