randomly lose connection to pfsense router
-
What is the lease time have set? But guessing would have something to do with the dhcp lease.
-
@johnpoz The default lease time and maximum lease time options under Service -> DHCP Server have not been set so I assume pfsense is using initial values. I still see expired leases in the past. Can something like this happen: DHCP is trying to lease 192.168.1.100 to the mac but sees it expired and do nothing? Sorry I'm not too knowledgeable in Networking.
-
it's more like the mac does not accept the new lease
-
@kiokoman thanks for the suggestion. I'm going to try set a static ip for my mac and see how it goes. Is it possible for my mac to request a dhcp lease renew if it can't ping my router?
-
if it is without a valid ip it can't ping your router but it can listen to a dhcp solicit message.
or you can press this button when internet is not workingtake in mind that i'm only speculating here because we still don't know what it's happening
anyway it's worth a try until someone else come in with a better idea -
well the default is 7200 seconds, but that is only for clients that don't request a specific value... So look on your client what is the lease time..
But yeah a client could ask for, and get an offer for renewal - but then not actually use the renew, until expire and then not send out a discover..
As mentioned this is just all speculation - but something that disconnects on a time frame, does make dhcp a possible suspect.
What does your dhcpd log say on pfsense - is it flooded with renewal requests? As a client gets closer and closer to expire it will ask more and more often.. Until its pretty much screaming hey can I get a renewal..
-
@johnpoz Unfortunately pfsense only shows maximum of 50 logs so after rebooting the router I think the old ones got flushed out. I also found this post regarding dhcp not renewing https://forum.netgate.com/topic/115832/solved-wan-dhcp-not-renewing/3. I can't find the Option modifiers but I assume it got moved to Service -> DHCP server -> Other Options -> Default lease time. Thanks again for the inputs and I'll report back tomorrow to see if problem is resolved.
-
Change your log length, I have mine set to 2000..
Wan dhcp not renewing would have ZERO to do with your client..
Your rebooting pfsense? And not this client?
-
@johnpoz I rebooted pfsense. After changing log size I see a lot of DHCPREQUEST on em0 to 255.255.255.255 port 67 but no RENEW message after the request it seems.
-
My gut tells me you have a bad Ethernet cable.
-
After changing some dhcp server options, it seems to fix the problem today. I'll have to do to more tests to be completely sure though.
-
What option(s)?
-
I don't know which one of these are relevant so I'm just gonna list them all
- extended range from 192.168.1.100 - 192.168.1.199 to 192.168.1.100 - 192.168.1.254
- set default lease time to 86340 and maximum lease time to 86400
- enabled DNS resolver
- set idle timeout to 1320 minutes on CP
- set hard timeout to 1325 minutes, shorter than lease time.
Again my networking knowledge is limited so I'm not sure which one of those options (or a combination of those) matters, or if any of them matter at all.
One interesting observation though, yesterday after my mac lost connection, I tried to connect another device to the router but that device also does not have connection. It seems to me that if we are right about our speculation then the dhcp server just stopped working for whatever reason.
-
Why are you running a captive portal on a wired network? Curious..
-
I was assigned to customize a CP for our business, but my boss doesn't want to install a wifi card on the router. I think eventually the device will wirelessly connect to a switch and that switch will be wired to the router.
-
Ah ok - that makes sense ;)
right about our speculation then the dhcp server just stopped working for whatever reason
So did it stop, simple enough to see if its running on the router..
-
Currently everything is working right now, I'll have to try to reproduce the error since it's kind of inconsistent, I'll update this post again if anything happens. Thanks again for everyone's inputs, they really helped.
-
@ssattannae said in randomly lose connection to pfsense router:
I was assigned to customize a CP for our business, but my boss doesn't want to install a wifi card on the router. I think eventually the device will wirelessly connect to a switch and that switch will be wired to the router.
That's not how it works...
You add wireless access points around your building or campus, wire those access points into the switch(es), and then the switch(es) is/are wired into pfsense/router.
Jeff
-
Sorry for the super late update, I was starting to think the problem is fixed since it's been a week but it popped up again this morning. It SEEMS like the dhcp server just decided to stop working. My laptop is sending ARP request who-has 192.168.1.1 but on my pfsense box the lan interface never received the arp request. I'm using tcpdump -i ue0 to check these packets. From what I know since my laptop's arp request is never answered it does not know where 196.168.1.1 is and thus no connection. Is this still related to DHCP or a problem with pfsense ignoring arp for some reason?
-
If your not getting back answer to arp, then there is connectivity issue. No that would have nothing to do with dhcp.
Not going to ignore arp.. Unless it doesn't have that IP anymore.
When you say laptop - its wireless? If you are sending arp, and the pfsense doesn't see this arp.. Then no it can never answer.