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.
    • S
      ssattannae
      last edited by

      Hi all,
      I've been trying to figure this problem out for the last week but no luck. I have a pfsense router and a mac connect to it using ethernet port. If I leave the ethernet cable in over night then the next day the mac will lose connection to the router (so I guess it's not really randomly losing connection). Weirdly enough If I disconnect the mac then the next day I will have connection to the router after plugging it back in.

      Pinging the router will not work (getting sendto no route to host error) because I have no connection, and the arp command shows that the 192.168.1.1 entry is either missing or incomplete (which is an indication of no connection if I remember correctly)

      On the router side, it can still ping other hosts so I believe it can still access internet.

      Most of the solutions that came up during my research does not really apply to me. There was one interesting post that suggests the problem can be solved with deleting and readding the default route. This did not work for me and ideally I prefer the mac does not lose connection at all.

      Any help is appreciated

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by kiokoman

        uhm to be sure of what happen in that time we would need a packet capture. my 2 cent is that the mac does not renew his lease when it expire
        ...
        maybe try for a day to set a static ip

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

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

          What is the lease time have set? But guessing would have something to do with the dhcp lease.

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

            1 Reply Last reply Reply Quote 0
            • kiokomanK
              kiokoman LAYER 8
              last edited by

              it's more like the mac does not accept the new lease

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

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

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

                1 Reply Last reply Reply Quote 0
                • kiokomanK
                  kiokoman LAYER 8
                  last edited by

                  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 working

                  renew-dhcp-lease-mac.jpg

                  take 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

                  ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                  Please do not use chat/PM to ask for help
                  we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                  Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                  1 Reply Last reply Reply Quote 0
                  • 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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.