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

    Problems reestablishing the connection

    Scheduled Pinned Locked Moved General pfSense Questions
    20 Posts 4 Posters 1.4k 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.
    • P
      Panja
      last edited by Panja

      Whenever there is something wrong with my internet connection, it goes down for whatever reason, I have to reboot the pfSense box before I can use the internet.

      If my modem resets, reboots or updates. If the connection is lost (on the modem) for a few mins. I always have to reboot pfSense in order to have a working connection.

      Is there a way to reestablishing the connection on the pfSense box automatically? Running pfSense 2.4.4-RELEASE-p3 (don't mind the signature, I cannot change it).

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

        what network card do you have? what kind of connection is it ? pppoe?

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        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
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          If it's dhcp it could be this: https://redmine.pfsense.org/issues/9267
          Check the dhcp logs.

          Steve

          1 Reply Last reply Reply Quote 0
          • P
            Panja
            last edited by

            @kiokoman
            I have an Intel network card.
            It's a cable internet connection, DHCP.

            @stephenw10
            It's a DHCP connection indeed.

            I guess I'll have to wait a little for it to be fixed than.

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Well check the dhcp log to make sure the client is timing out and failing as described there. It could be something else entirely.

              Steve

              1 Reply Last reply Reply Quote 0
              • P
                Panja
                last edited by

                Once it happens I'll check! Thx

                1 Reply Last reply Reply Quote 0
                • P
                  Panja
                  last edited by

                  Here is the DHCP log after a connection loss and the connection not reestablishing.
                  I filtered out the local DHCP client request and masked my IP address.

                  Feb 18 09:24:06 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:24:06 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:55 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:55 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:32 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:32 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:22 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:22 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:10 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:10 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67 
                  Feb 18 09:23:05 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:05 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:04 	dhcpleases 		Sending HUP signal to dns daemon(3659)
                  Feb 18 09:23:04 	dhcpleases 		Sending HUP signal to dns daemon(3659)
                  Feb 18 09:23:04 	dhcpd 		Server starting service.
                  Feb 18 09:23:04 	dhcpd 		Sending on Socket/fallback/fallback-net
                  Feb 18 09:23:04 	dhcpd 		Wrote 91 leases to leases file.
                  Feb 18 09:23:04 	dhcpd 		Wrote 0 new dynamic host decls to leases file.
                  Feb 18 09:23:04 	dhcpd 		Wrote 0 deleted host decls to leases file.
                  Feb 18 09:23:04 	dhcpd 		For info, please visit https://www.isc.org/software/dhcp/
                  Feb 18 09:23:04 	dhcpd 		All rights reserved.
                  Feb 18 09:23:04 	dhcpd 		PID file: /var/run/dhcpd.pid
                  Feb 18 09:23:04 	dhcpd 		Copyright 2004-2018 Internet Systems Consortium.
                  Feb 18 09:23:04 	dhcpd 		Database file: /var/db/dhcpd.leases
                  Feb 18 09:23:04 	dhcpd 		Internet Systems Consortium DHCP Server 4.4.1
                  Feb 18 09:23:04 	dhcpd 		Config file: /etc/dhcpd.conf
                  Feb 18 09:23:04 	dhcpd 		For info, please visit https://www.isc.org/software/dhcp/
                  Feb 18 09:23:04 	dhcpd 		All rights reserved.
                  Feb 18 09:23:04 	dhcpd 		Copyright 2004-2018 Internet Systems Consortium.
                  Feb 18 09:23:04 	dhcpd 		Internet Systems Consortium DHCP Server 4.4.1
                  Feb 18 09:23:03 	dhcpleases 		Sending HUP signal to dns daemon(3659)
                  Feb 18 09:23:03 	dhcpleases 		kqueue error: unknown
                  Feb 18 09:23:03 	dhcpleases 		Could not deliver signal HUP to process because its pidfile (/var/run/unbound.pid) does not exist, No such process.
                  Feb 18 09:23:03 	dhcpleases 		Sending HUP signal to dns daemon(44912)
                  Feb 18 09:23:03 	dhcpleases 		/etc/hosts changed size from original!
                  Feb 18 09:23:03 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:03 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:01 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:01 	dhclient 	72805 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:01 	dhclient 	30696 	send_packet: No route to host
                  Feb 18 09:23:01 	dhclient 	29508 	DHCPREQUEST on igb0 to 10.160.98.129 port 67
                  Feb 18 09:23:01 	dhclient 	29508 	bound: immediate renewal.
                  Feb 18 09:23:01 	dhclient 		Deleting old routes
                  Feb 18 09:23:00 	dhclient 		New Routers (igb0): xxx.XX.XX.xxx
                  Feb 18 09:22:59 	dhclient 		New Routers (igb0): xxx.XX.XX.xxx
                  Feb 18 09:22:59 	dhclient 		New Broadcast Address (igb0): 255.255.255.255
                  Feb 18 09:22:59 	dhclient 		New Subnet Mask (igb0): 255.255.255.0
                  Feb 18 09:22:59 	dhclient 		New IP Address (igb0): xxx.XX.XX.xxx
                  Feb 18 09:22:59 	dhclient 		ifconfig igb0 inet xxx.XX.XX.xxx netmask 255.255.255.0 broadcast 255.255.255.255
                  Feb 18 09:22:59 	dhclient 		Starting add_new_address()
                  Feb 18 09:22:59 	dhclient 		TIMEOUT
                  Feb 18 09:22:59 	dhclient 	29508 	Trying recorded lease xxx.XX.XX.xxx
                  Feb 18 09:22:59 	dhclient 	29508 	No DHCPOFFERS received.
                  Feb 18 09:22:53 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 6
                  Feb 18 09:22:35 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 18
                  Feb 18 09:22:25 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 10
                  Feb 18 09:22:10 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 15
                  Feb 18 09:22:04 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 6
                  Feb 18 09:22:00 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 4
                  Feb 18 09:21:58 	dhclient 	29508 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 2
                  Feb 18 09:21:53 	dhclient 	29508 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                  Feb 18 09:21:48 	dhclient 	29508 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                  Feb 18 09:21:46 	dhclient 	29508 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                  Feb 18 09:21:46 	dhclient 		PREINIT
                  Feb 18 09:19:56 	dhclient 	20265 	exiting.
                  Feb 18 09:19:56 	dhclient 	20265 	connection closed 
                  
                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Is 10.160.98.129 the correct DHCP server when the link is up correctly?

                    If not it might be stuck using a lease from the modem itself if the cable connection went down.
                    If that is the case you can just reject leases from the modem:
                    https://docs.netgate.com/pfsense/en/latest/book/interfaces/ipv4-wan-types.html?highlight=reject%20leases#dhcp

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • P
                      Panja
                      last edited by Panja

                      I've added 10.160.98.129 to the rejected list but it still doesn't work.
                      Releasing and renewing the WAN can be done as well (instead of rebooting) to get a connecting back but it does not come back automatically.

                      New log:

                      Feb 18 20:09:25 	dhcpleases 		Sending HUP signal to dns daemon(16860)
                      Feb 18 20:09:25 	dhcpleases 		Sending HUP signal to dns daemon(16860)
                      Feb 18 20:09:25 	dhcpd 		Server starting service.
                      Feb 18 20:09:25 	dhcpd 		Sending on Socket/fallback/fallback-net
                      Feb 18 20:09:25 	dhcpd 		Wrote 91 leases to leases file.
                      Feb 18 20:09:25 	dhcpd 		Wrote 0 new dynamic host decls to leases file.
                      Feb 18 20:09:25 	dhcpd 		Wrote 0 deleted host decls to leases file.
                      Feb 18 20:09:25 	dhcpd 		For info, please visit https://www.isc.org/software/dhcp/
                      Feb 18 20:09:25 	dhcpd 		All rights reserved.
                      Feb 18 20:09:25 	dhcpd 		PID file: /var/run/dhcpd.pid
                      Feb 18 20:09:25 	dhcpd 		Copyright 2004-2018 Internet Systems Consortium.
                      Feb 18 20:09:25 	dhcpd 		Database file: /var/db/dhcpd.leases
                      Feb 18 20:09:25 	dhcpd 		Internet Systems Consortium DHCP Server 4.4.1
                      Feb 18 20:09:25 	dhcpd 		Config file: /etc/dhcpd.conf
                      Feb 18 20:09:25 	dhcpd 		For info, please visit https://www.isc.org/software/dhcp/
                      Feb 18 20:09:25 	dhcpd 		All rights reserved.
                      Feb 18 20:09:25 	dhcpd 		Copyright 2004-2018 Internet Systems Consortium.
                      Feb 18 20:09:25 	dhcpd 		Internet Systems Consortium DHCP Server 4.4.1
                      Feb 18 20:09:24 	dhcpleases 		Sending HUP signal to dns daemon(16860)
                      Feb 18 20:09:24 	dhcpleases 		kqueue error: unknown
                      Feb 18 20:09:24 	dhcpleases 		Could not deliver signal HUP to process because its pidfile (/var/run/unbound.pid) does not exist, No such process.
                      Feb 18 20:09:24 	dhcpleases 		Sending HUP signal to dns daemon(51884)
                      Feb 18 20:09:24 	dhcpleases 		/etc/hosts changed size from original!
                      Feb 18 20:09:22 	dhclient 	12229 	bound: renewal in 90283 seconds.
                      Feb 18 20:09:22 	dhclient 		Deleting old routes
                      Feb 18 20:09:21 	dhclient 		New Routers (igb0): xxx.XX.XX.xxx
                      Feb 18 20:09:20 	dhclient 		New Routers (igb0): xxx.XX.XX.xxx
                      Feb 18 20:09:20 	dhclient 		New Broadcast Address (igb0): 255.255.255.255
                      Feb 18 20:09:20 	dhclient 		New Subnet Mask (igb0): 255.255.255.0
                      Feb 18 20:09:20 	dhclient 		New IP Address (igb0): xxx.XX.XX.xxx
                      Feb 18 20:09:20 	dhclient 		ifconfig igb0 inet xxx.XX.XX.xxx netmask 255.255.255.0 broadcast 255.255.255.255
                      Feb 18 20:09:20 	dhclient 		Starting add_new_address()
                      Feb 18 20:09:20 	dhclient 		TIMEOUT
                      Feb 18 20:09:20 	dhclient 	12229 	Trying recorded lease xxx.XX.XX.xxx
                      Feb 18 20:09:20 	dhclient 	12229 	No DHCPOFFERS received.
                      Feb 18 20:09:03 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 17
                      Feb 18 20:08:52 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 11
                      Feb 18 20:08:38 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 14
                      Feb 18 20:08:28 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 10
                      Feb 18 20:08:23 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 5
                      Feb 18 20:08:21 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 2
                      Feb 18 20:08:19 	dhclient 	12229 	DHCPDISCOVER on igb0 to 255.255.255.255 port 67 interval 2
                      Feb 18 20:08:14 	dhclient 	12229 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                      Feb 18 20:08:10 	dhclient 	12229 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                      Feb 18 20:08:07 	dhclient 	12229 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                      Feb 18 20:08:05 	dhclient 	12229 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                      Feb 18 20:08:04 	dhclient 	12229 	DHCPREQUEST on igb0 to 255.255.255.255 port 67
                      Feb 18 20:08:04 	dhclient 		PREINIT 
                      
                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        So you manually did something during that log to make it connect?

                        1 Reply Last reply Reply Quote 0
                        • P
                          Panja
                          last edited by

                          The log does not show that it connects. It doesn't automatically...
                          But I mean I can reboot pfSense in order to get the connection back or I can do a release and renew on the WAN interface (status --> interfaces -> WAN).

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            So it spends 1m broadcasting for DHCP servers and gets no replies and then uses the old address and gateway?

                            Probably time for a packet capture to see what's actually being sent and recieved.

                            1 Reply Last reply Reply Quote 0
                            • P
                              Panja
                              last edited by Panja

                              The strange thing is that the old ip and gateway are correct.
                              They are dynamic but do not change (or maybe once in 5 years).
                              So for some strange reason the connection stays down...

                              1 Reply Last reply Reply Quote 0
                              • P
                                Panja
                                last edited by Panja

                                I can confirm it's not a problem with DHCP.

                                I removed the DHCP (WAN) Gateway and created a static one.
                                When I pull the power cord on the modem and let it come back up after a few minutes the connection is not reestablished and I have to reboot pfSense in order to get connectivity.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Mmm, packet capture time.

                                  Does removing the WAN cable and reconnecting it also bring back the connection?

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    Panja
                                    last edited by

                                    Will try the cable tomorrow.
                                    Where to start with the capture?
                                    Can you put me in the right direction?

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bcruze
                                      last edited by

                                      this is happening on every pfsense device I own since changing ISP this now makes sense 😔

                                      Following this thread for possible resolution

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Capture on WAN when it's down. See if you see any packets coming in at all.

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bcruze
                                          last edited by bcruze

                                          just went down again. packetcapture.cap [0_1582154630708_packet capture.docx](Uploading 100%)

                                          i went to status > interface. release and renewed and was backonline instantly

                                          Feb 19 18:21:53 dhcpd DHCPREQUEST for 192.168.1.240 from 18:e8:29:46:fb:3f via igb1
                                          Feb 19 18:21:53 dhcpd DHCPACK on 192.168.1.240 to 18:e8:29:46:fb:3f via igb1
                                          Feb 19 18:21:59 dhclient Internet Systems Consortium DHCP Client 4.3.6-P1
                                          Feb 19 18:21:59 dhclient Copyright 2004-2018 Internet Systems Consortium.
                                          Feb 19 18:21:59 dhclient All rights reserved.
                                          Feb 19 18:21:59 dhclient For info, please visit https://www.isc.org/software/dhcp/
                                          Feb 19 18:21:59 dhclient Listening on BPF/igb0/00:08:a2:09:e9:be
                                          Feb 19 18:21:59 dhclient Sending on BPF/igb0/00:08:a2:09:e9:be
                                          Feb 19 18:21:59 dhclient Can't attach interface {} to bpf device /dev/bpf0: Device not configured
                                          Feb 19 18:21:59 dhclient If you think you have received this message due to a bug rather
                                          Feb 19 18:21:59 dhclient than a configuration issue please read the section on submitting
                                          Feb 19 18:21:59 dhclient bugs on either our web page at www.isc.org or in the README file
                                          Feb 19 18:21:59 dhclient before submitting a bug. These pages explain the proper
                                          Feb 19 18:21:59 dhclient process and the information we find helpful for debugging.
                                          Feb 19 18:21:59 dhclient exiting.
                                          Feb 19 18:21:59 dhclient 30894 connection closed

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            There are only 100 packets there, it's all outbound from 100.92.220.245 and none of it is DHCP.

                                            But you should start your own thread. Unless this turns out to be identical it's only going to confuse things here.

                                            Steve

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