DHCP leases are not automatically released
-
BTW this is even more interesting now. I rebooted my SG-1100 twice now and the printer is still unable to get the IP address assigned and it is holding on to that weird IP address so I am not sure what it is. I have tried connecting it directly to the unifi switch but same result, ip stays in that wierd IP.
-
By weird you mean 169.254.x.x - that is what clients give themselves when no dhcp is available...
What does your dhcp log say on pfsense when client tries to get an IP? You should see the discover in the log!!
-
@johnpoz said in DHCP leases are not automatically released:
Not sure what that has to do with anything?
Post up these leases your seeing in your lease table that you think should not be there.
If you have say leases time set to 2 weeks for exmaple with a pool of only 10 addresses, and you get more than 10 clients that connect to this scope - and clients are not actually releasing! then yeah you could have a problem.. Set your lease to 12 hours or 24 hours or something - you need too pick an appropriate length for the number of clients you have and the number of leases you have made available.
Thanks for the reply. Since I started working on this problem earlier today I did read that they could be removed manually which what I did for a lot of them. I them reduced the DHCP range to just 30 IP addresses and restarted the service to boot as many as I could from the list and it helped. I am posting what I have this very moment. this is inly for my main network, I am excluding the IOT network:
192.168.1.124 b8:ca:3a:b5:96:70 2019/05/03 12:59:44 2019/05/03 14:03:55 offline expired
192.168.1.120 f8:a9:63:e1:f2:be 2019/04/21 21:30:35 2019/04/21 23:30:35 offline expired
192.168.1.102 6c:ad:f8:80:e0:5c 2019/04/09 17:59:00 2019/04/09 18:13:51 offline expired
192.168.1.130 b8:27:eb:ef:da:40 2019/03/28 23:08:25 2019/03/29 01:08:25 offline expired
192.168.1.111 6c:33:a9:9a:d7:86 2019/03/24 00:04:57 2019/03/24 00:35:28 offline expired
192.168.1.129 00:1a:97:01:cd:8b 2019/03/24 00:29:11 2019/03/24 00:30:05 offline expired
192.168.1.118 10:1f:74:49:ac:fa 2019/03/14 18:36:12 2019/03/14 20:36:12 offline expired
192.168.1.127 00:c2:c6:76:ce:88 2019/03/13 15:59:51 2019/03/13 17:59:51 offline expired -
@alfaro said in DHCP leases are not automatically released:
192.168.1.124 b8:ca:3a:b5:96:70 2019/05/03 12:59:44 2019/05/03 14:03:55 offline expired
That lease can be reused and would be if runs out of FREE leases.. But as stated it would still be listed and not used until FREE leases are used up.
This allows for say the client to come back even after it has expired and get the same IP.
-
Sorry, I should have been more specific and remember where I was posing this to, nobody replying here is like a noob. Yes, by weird that is what I mean. HP printers seem to have been programmed to use either 169.254.96.32 or 169.254.96.20. I got the .32 address but when printers can't connect to a network and/or get and IP address, they get one of those two (at least) based on what I read on the HP forums earlier today.
-
Yeah well sometimes they do not handle going back to dhcp very well..
Look in your dhcp log - do you see a discover from the printers mac? If you do not then no you can not give it an IP... What does the dhcp log show you? you will see it either send and offer, nothing or a nak, etc.
-
@johnpoz said in DHCP leases are not automatically released:
@alfaro said in DHCP leases are not automatically released:
192.168.1.124 b8:ca:3a:b5:96:70 2019/05/03 12:59:44 2019/05/03 14:03:55 offline expired
That lease can be reused and would be if runs out of FREE leases.. But as stated it would still be listed and not used until FREE leases are used up.
This allows for say the client to come back even after it has expired and get the same IP.
Thanks again.
I read you loud and clear and that is my understanding. So, I am just guessing that is a behavior (maybe undocumented) of the DHCP server? Just guessing because when I increased the range to 130 IP addresses, it just worked. Now I am having the problem again as the printer has again lost the IP address. Not sure what it is then,......
BTW, just so I am aware and I like to refine my communication, did the long initial post make a point or did it create more questions? I am trying to be more clear and concise when I post in forums and am looking for some feedback. Thanks again for taking the time to reply. Netgate forums seems to have a a very active community.
-
@johnpoz said in DHCP leases are not automatically released:
Yeah well sometimes they do not handle going back to dhcp very well..
Look in your dhcp log - do you see a discover from the printers mac? If you do not then no you can not give it an IP... What does the dhcp log show you? you will see it either send and offer, nothing or a nak, etc.
I will look at the log when I sit down at the computer again in about 3 hours but I do have to take care of something else. I will leave a pc connected to the printer via USB and ubuntu so others can print until I can sort this out.
Thanks for replying.
-
There was a huge amount of info in your OP that has nothing to do with the actual problem and not needed to understand your issue.
Be it lan or vlan or whatever - be it you have 100 networks or just 1 has nothing to do with a dhcp issue on a specific L2..
Is the printer wired or wireless would be actual useful info! ;)
If you tried setting an IP on the device and not working you have few things that it could be - bad cable? Bad wifi connectivity? You set the IP wrong, or mask wrong, etc.
Or your doing something in pfsense with static arp, etc.. For devices like printers its prob a good idea to set a dhcp reservation.. So you always know what the printer IP.. For example my "wired" printer is 192.168.2.50, which I set static on the device. This is outside my 192.168.2/24 dhcp scope.
-
I have been having exactly the same problem today as the OP, first a laptop getting a weird IP in the 169 range, then a desktop also in the 169 range, then my daughters phone wouldn't connect to the wi-fi when she came home, it seemed to be having issues getting an IP address. In all three cases if I set the device to a static IP it would work.
Digging around in PfSense showed all of my pool in use, but I noticed that there seemed to be the same device associated with lots different IP addresses. Fortunately there was a clue in its name, which started with Amazon. So I went and turned off the Amazon Echo and two Fire TV boxes, the last one of which was extremely hot.
Seems that last Fire TV must have had some sort of issue and was using up all the leases before they had chance to expire and thus PfSense was running out of leases.
During testing I was turning off and on the wi-fi on my phone and everytime it was fine, and I now realise it was getting issued the same IP address, where as my daughter had been at work all morning, the laptop and PC had been off overnight.
Shame I rebooted Pfsense for this, it was up to 180 days uptime.
Anyway, just posted this as info in case any body else had a similar issue.
-