Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    randomly lose connection to pfsense router

    Scheduled Pinned Locked Moved General pfSense Questions
    25 Posts 5 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      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..

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.8, 24.11

      S 1 Reply Last reply Reply Quote 0
      • S
        ssattannae @johnpoz
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by johnpoz

          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?

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          S 1 Reply Last reply Reply Quote 0
          • S
            ssattannae @johnpoz
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • NollipfSenseN
              NollipfSense
              last edited by

              My gut tells me you have a bad Ethernet cable.

              pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
              pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

              1 Reply Last reply Reply Quote 0
              • S
                ssattannae
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  What option(s)?

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • S
                    ssattannae
                    last edited by

                    I don't know which one of these are relevant so I'm just gonna list them all

                    1. extended range from 192.168.1.100 - 192.168.1.199 to 192.168.1.100 - 192.168.1.254
                    2. set default lease time to 86340 and maximum lease time to 86400
                    3. enabled DNS resolver
                    4. set idle timeout to 1320 minutes on CP
                    5. 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.

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      Why are you running a captive portal on a wired network? Curious..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • S
                        ssattannae
                        last edited by

                        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.

                        A 1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          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..

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • S
                            ssattannae
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • A
                              akuma1x @ssattannae
                              last edited by

                              @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

                              1 Reply Last reply Reply Quote 0
                              • S
                                ssattannae
                                last edited by

                                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?

                                1 Reply Last reply Reply Quote 0
                                • johnpozJ
                                  johnpoz LAYER 8 Global Moderator
                                  last edited by johnpoz

                                  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.

                                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                                  If you get confused: Listen to the Music Play
                                  Please don't Chat/PM me for help, unless mod related
                                  SG-4860 24.11 | Lab VMs 2.8, 24.11

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    ssattannae
                                    last edited by ssattannae

                                    the laptop is connected to the pfsense box via a usb to ethernet adapter. I've tried different cables but no dice. Though I'm curious as to why restarting pfsense would make it work again.

                                    Edit: I forgot to mention one detail is that dhcp is on LAN interface.

                                    1 Reply Last reply Reply Quote 0
                                    • johnpozJ
                                      johnpoz LAYER 8 Global Moderator
                                      last edited by

                                      @ssattannae said in randomly lose connection to pfsense router:

                                      box via a usb to ethernet adapter.

                                      Yeah there is your problem, bet you case of beer ;)

                                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                                      If you get confused: Listen to the Music Play
                                      Please don't Chat/PM me for help, unless mod related
                                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        ssattannae
                                        last edited by

                                        Yup, I remembered now I was showing a technician how to install a production version of our pfsense onto a generic build. He resetted to factory default first and changed the interfaces so WAN was on a usb port. At the time I didn't think too much about it but it turns out to be a big head for me. @johnpoz I would so buy you a case of beer if I can.

                                        Thanks everyone for the inputs, I believe this is now solved.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.