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

    Keep loosing WAN IP Address - dhclient does not seem to do update

    Scheduled Pinned Locked Moved DHCP and DNS
    199 Posts 27 Posters 113.8k 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
      sullrich
      last edited by

      We already have code to detect this but it doesnt appear to be working.

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

        Good news!

        I was able to replicate this problem thanks to sdale and Vescovo.

        Vescovo had the final fix and it has been commited.  Please upgrade to a snapshot about an hour from this message.

        1 Reply Last reply Reply Quote 0
        • Y
          yoda715
          last edited by

          @sullrich:

          Good news!

          I was able to replicate this problem thanks to sdale and Vescovo.

          Vescovo had the final fix and it has been commited.  Please upgrade to a snapshot about an hour from this message.

          I think you forgot to wave your magic voodoo wand, problem still exists  ;). I think the problem lies in the rc.newwanip not catching the interface being assigned 0.0.0.0 IP address.

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

            i did a workaround for that problem a couple of months ago:

            rc.newwanip:
            –---------------------------
            if($curwanip == "0.0.0.0") {
                    log_error("Failed to update WAN IP, restarting dhclient.");
                    exec("dhclient {$interface_real}");
                    /* die now, dhclient will kick off rc.newwanip again? */
                    exit;
            }

            1 Reply Last reply Reply Quote 0
            • F
              freax
              last edited by

              Is not the real deal but if you disconnect the cable and connect it again you won't have link.
              I have both ends with fixed ip (the router and firewall interface) and it should have link again like it should.

              Like I said, i think it's a good way to debug whenever you want. Tests always available.

              Sorry if i'm wrong.

              1 Reply Last reply Reply Quote 0
              • K
                Krakke
                last edited by

                Tried this  "fetch -o /etc/inc http://www.pfsense.com/~sullrich/filter.inc"

                Now i have to reinstall pfsense  :'(

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

                  I have added a workaround and verified that it does indeed seem to work.

                  Update to the latest snapshot at least an hour from now.  Currently 11:46PM EST.

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

                    im sorry to say this but, the new snapshot (02-18) is not working :(
                    –------------------------------

                    Feb 20 23:40:20 php: : rc.newwanip working with IP address 0.0.0.0 wan rl0.
                    Feb 20 23:40:20 php: : Informational: rc.newwanip is starting rl0.
                    Feb 20 23:40:19 dhclient: exit_with_hooks()
                    Feb 20 23:40:19 dhclient: PREINIT
                    Feb 20 23:40:19 dhclient: netstat
                    Feb 20 23:40:19 dhclient[21934]: DHCPOFFER from 90.224.168.1
                    Feb 20 23:40:19 dhclient[21934]: DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 8
                    Feb 20 23:40:19 dhclient: exit_with_hooks()
                    Feb 20 23:40:19 check_reload_status: rc.newwanip starting
                    Feb 20 23:40:19 dhclient: PREINIT
                    Feb 20 23:40:19 dhclient: netstat
                    Feb 20 23:40:19 dhclient: exit_with_hooks()
                    Feb 20 23:40:18 dhclient: Deleting old routes
                    Feb 20 23:40:18 dhclient: EXPIRE FAIL
                    Feb 20 23:40:18 dhclient: netstat
                    Feb 20 23:40:18 dhclient: exit_with_hooks()
                    Feb 20 23:40:18 dhclient: PREINIT
                    Feb 20 23:40:18 dhclient: netstat
                    Feb 20 23:18:20 dhclient[280]: exiting.
                    Feb 20 23:18:20 dhclient[280]: exiting.
                    Feb 20 23:18:20 dhclient[280]: short write: wanted 21 got 0 bytes
                    Feb 20 23:18:20 dhclient[280]: short write: wanted 21 got 0 bytes
                    Feb 20 23:18:20 dhclient[280]: DHCPACK from 90.224.168.1
                    Feb 20 23:18:20 dhclient[280]: DHCPREQUEST on rl0 to 255.255.255.255 port 67
                    Feb 20 23:16:07 last message repeated 6 times
                    Feb 20 23:12:37 last message repeated 7 times
                    Feb 20 23:10:43 last message repeated 4 times
                    Feb 20 23:10:13 dhclient[280]: DHCPREQUEST on rl0 to 213.67.15.234 port 67
                    Feb 20 23:00:37 php: : FTP proxy disabled for interface opt2 - ignoring.
                    Feb 20 23:00:37 php: : FTP proxy disabled for interface opt1 - ignoring.
                    Feb 20 23:00:37 php: : FTP proxy disabled for interface LAN - ignoring.
                    Feb 20 23:00:36 check_reload_status: reloading filter
                    Feb 20 23:00:30 check_reload_status: updating dyndns
                    Feb 20 23:00:27 php: : FTP proxy disabled for interface opt2 - ignoring.
                    Feb 20 23:00:27 php: : FTP proxy disabled for interface opt1 - ignoring.
                    Feb 20 23:00:27 php: : FTP proxy disabled for interface LAN - ignoring.
                    Feb 20 23:00:23 check_reload_status: reloading filter
                    Feb 20 23:00:23 php: : Configuring slbd
                    Feb 20 23:00:23 php: : Resyncing configuration for all packages.
                    Feb 20 23:00:19 php: : Creating rrd update script

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

                      I really don't see how it could not work.

                      Run this from a shell:

                      cat /sbin/dhclient | grep reload

                      What does the results say?

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

                        it does not say anything:
                        –----------------------------

                        Enter an option: 8

                        cat /sbin/dhclient | grep reload

                        Binary file (standard input) matches

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

                          Can someone else please test?  This absolutely works for me after 20 hours when normally it would break in 30 minutes…

                          1 Reply Last reply Reply Quote 0
                          • K
                            Krakke
                            last edited by

                            @sullrich:

                            Can someone else please test?  This absolutely works for me after 20 hours when normally it would break in 30 minutes…

                            Works fine for me, only lost my ip 2 times, and that was before the latest snapshot.

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

                              @Krakke:

                              Works fine for me, only lost my ip 2 times, and that was before the latest snapshot.

                              Great!  Almost started to go insane, because I know this fixed my issue.  Please, someone else test?

                              1 Reply Last reply Reply Quote 0
                              • K
                                Krakke
                                last edited by

                                @sullrich:

                                @Krakke:

                                Works fine for me, only lost my ip 2 times, and that was before the latest snapshot.

                                Great!  Almost started to go insane, because I know this fixed my issue.  Please, someone else test?

                                Im sorry sullrich, went out for a while, when i came back

                                Feb 21 20:01:24 dhclient[300]: DHCPREQUEST on fxp0 to 172.21.249.50 port 67
                                Feb 21 20:01:24 dhclient[300]: DHCPACK from 172.21.249.50
                                Feb 21 20:01:24 dhclient[300]: short write: wanted 21 got 0 bytes
                                Feb 21 20:01:24 dhclient[300]: short write: wanted 21 got 0 bytes
                                Feb 21 20:01:24 dhclient[300]: exiting.
                                Feb 21 20:01:24 dhclient[300]: exiting.

                                1 Reply Last reply Reply Quote 0
                                • H
                                  hoba
                                  last edited by

                                  Atm there is a workaround in pllace that will restart the dhclient when it exits. Does it get restarted?

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    Krakke
                                    last edited by

                                    @hoba:

                                    Atm there is a workaround in pllace that will restart the dhclient when it exits. Does it get restarted?

                                    Nope at 20:01:24 it exited, at 21:01 i lost my ip, then i had to do a renew.

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

                                      It can take up to 5 minutes to restart dhclient depending on if check_reload_status is running.

                                      So if you still have trouble please check that check_reload_status is running from a shell by doing:

                                      ps awux | grep check_reload_status

                                      Also, cat /etc/crontab | grep check

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

                                        I found yet another problem.  This WAN DHCP issue has been nothing but fun!

                                        Try out a recent snapshot atleast an hour from now.

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

                                          damn! snapshot 02-21 is not working  :'( :'( :'(
                                          –----------------

                                          Feb 22 20:02:39 dhclient[283]: exiting.
                                          Feb 22 20:02:39 dhclient[283]: exiting.
                                          Feb 22 20:02:39 dhclient[283]: short write: wanted 21 got 0 bytes
                                          Feb 22 20:02:39 dhclient[283]: short write: wanted 21 got 0 bytes
                                          Feb 22 20:02:39 dhclient[283]: DHCPACK from 90.224.168.1
                                          Feb 22 20:02:39 dhclient[283]: DHCPREQUEST on rl0 to 255.255.255.255 port 67
                                          Feb 22 19:59:46 last message repeated 5 times
                                          Feb 22 19:56:08 last message repeated 6 times
                                          Feb 22 19:54:11 last message repeated 4 times
                                          Feb 22 19:53:39 dhclient[283]: DHCPREQUEST on rl0 to 213.67.15.234 port 67
                                          Feb 22 19:44:03 php: : FTP proxy disabled for interface opt2 - ignoring.
                                          Feb 22 19:44:03 php: : FTP proxy disabled for interface opt1 - ignoring.
                                          Feb 22 19:44:03 php: : FTP proxy disabled for interface LAN - ignoring.
                                          Feb 22 19:44:02 check_reload_status: reloading filter

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

                                            @Selective:

                                            damn! snapshot 02-21 is not working  :'( :'( :'(

                                            Yes the problem still exists and we have been racking our brains out – literally.

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