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

    Since a few day's losing the wan (dhcp) ip address

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    52 Posts 11 Posters 24.3k 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.
    • C
      cmb
      last edited by

      Upgrade to the latest and post back if it continues

      1 Reply Last reply Reply Quote 0
      • W
        woutervb
        last edited by

        I did not have any logging, so it looked like a corrupted filesystem (for unknown reason). Logging in via ssh confirmed that there was a lot of binary data in the log files.

        This morning I did a clean install using the image: pfSense-memstick-2.1-BETA1-i386-20130215-1542.img.gz

        It dit tell me to upgrade, which I did.

        Can confirm that I have logging now, so if the problem happens again I will be back to post it.

        1 Reply Last reply Reply Quote 0
        • W
          woutervb
          last edited by

          Almost inmediately after the upgrade I lost my wan ip adress. Logging is:

          Feb 16 13:02:25 php: /index.php: Successful login for user 'admin' from: 192.168.10.100
          Feb 16 13:02:25 php: /index.php: Successful login for user 'admin' from: 192.168.10.100
          Feb 16 13:01:43 php: : Could not find IPv4 gateway for interface (wan).
          Feb 16 13:01:43 php: : Could not find IPv4 gateway for interface (wan).
          Feb 16 13:01:43 php: : Could not find IPv4 gateway for interface (wan).
          Feb 16 13:01:43 php: : Could not find IPv4 gateway for interface (wan).
          Feb 16 13:01:43 php: : Could not find IPv4 gateway for interface (wan).
          Feb 16 13:01:42 php: : DynDNS (160263) There was an error trying to determine the public IP for interface - wan(ue0). Probably interface is not a WAN interface.
          Feb 16 13:01:42 php: : DynDNS (160263): running get_failover_interface for wan. found ue0
          Feb 16 13:01:42 php: : DynDns: updatedns() starting
          Feb 16 13:01:39 check_reload_status: Reloading filter
          Feb 16 13:01:39 check_reload_status: Restarting OpenVPN tunnels/interfaces
          Feb 16 13:01:39 check_reload_status: Restarting ipsec tunnels
          Feb 16 13:01:39 check_reload_status: Updating all dyndns
          Feb 16 13:01:25 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:01:25 php: : The command '/sbin/ifconfig gif0 tunnel 216.66.84.46' returned exit code '1', the output was 'ifconfig: 'tunnel' requires 2 arguments'
          Feb 16 13:01:25 php: : The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output' returned exit code '1', the output was ''
          Feb 16 13:01:25 dhclient[62608]: exiting.
          Feb 16 13:01:25 dhclient[62608]: dhclient already running, pid: 44979.
          Feb 16 13:01:23 check_reload_status: Configuring interface wan
          Feb 16 13:01:23 php: : rc.newwanip: Failed to update wan IP, restarting…
          Feb 16 13:01:23 php: : rc.newwanip: on (IP address: ) (interface: wan) (real interface: ue0).
          Feb 16 13:01:23 php: : rc.newwanip: Informational is starting ue0.
          Feb 16 13:01:21 kernel: arpresolve: can't allocate llinfo for 89.98.245.1
          Feb 16 13:01:21 php: : Clearing states to old gateway 89.98.245.1.
          Feb 16 13:01:21 miniupnpd[75455]: ioctl(s, SIOCGIFADDR, …): Can't assign requested address
          Feb 16 13:01:21 miniupnpd[75455]: ioctl(s, SIOCGIFADDR, …): Can't assign requested address
          Feb 16 13:01:20 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:01:20 dhclient[36994]: bound to 89.98.245.209 – renewal in 129146 seconds.
          Feb 16 13:01:20 check_reload_status: rc.newwanip starting ue0
          Feb 16 13:01:20 dhclient: Creating resolv.conf
          Feb 16 13:01:20 dhclient: /sbin/route add default 89.98.245.1
          Feb 16 13:01:20 dhclient: Adding new routes to interface: ue0
          Feb 16 13:01:20 dhclient: New Routers (ue0): 89.98.245.1
          Feb 16 13:01:20 dhclient: New Broadcast Address (ue0): 255.255.255.255
          Feb 16 13:01:20 dhclient: New Subnet Mask (ue0): 255.255.255.0
          Feb 16 13:01:20 dhclient: New IP Address (ue0): 89.98.245.209
          Feb 16 13:01:20 miniupnpd[75455]: SendNATPMPPublicAddressChangeNotification: sendto(s_udp=14): No route to host
          Feb 16 13:01:20 miniupnpd[75455]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping
          Feb 16 13:01:20 miniupnpd[75455]: Failed to get IP for interface ue0
          Feb 16 13:01:20 miniupnpd[75455]: ioctl(s, SIOCGIFADDR, …): Can't assign requested address
          Feb 16 13:01:20 dhclient: ifconfig ue0 inet 89.98.245.209 netmask 255.255.255.0 broadcast 255.255.255.255
          Feb 16 13:01:20 dhclient: Starting add_new_address()
          Feb 16 13:01:20 dhclient: Removing states through old gateway '' (new gateway '89.98.245.1')
          Feb 16 13:01:20 dhclient: Comparing Routers: Old: New: 89.98.245.1
          Feb 16 13:01:20 dhclient: Comparing IPs: Old: New: 89.98.245.209
          Feb 16 13:01:20 dhclient: Starting delete_old_states()
          Feb 16 13:01:20 dhclient: REBOOT
          Feb 16 13:01:20 dhclient[36994]: DHCPACK from 10.15.180.129
          Feb 16 13:01:20 dhclient[36994]: DHCPREQUEST on ue0 to 255.255.255.255 port 67

          I checked both the /tmp/ue0_output* files, bot both where empty. Manually restarting dhclient gave me back a wan ip adres, logging of that action is shown below:

          Feb 16 13:06:10 php: : phpDynDNS: No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.
          Feb 16 13:06:10 php: : DynDns (160263): Current WAN IP: 89.98.245.209 Cached IP: 89.98.245.209
          Feb 16 13:06:10 php: : DynDns debug information (160263): 89.98.245.209 extracted from local system.
          Feb 16 13:06:10 php: : DynDNS (160263): running get_failover_interface for wan. found ue0
          Feb 16 13:06:10 php: : DynDns debug information (160263): 89.98.245.209 extracted from local system.
          Feb 16 13:06:10 php: : DynDns: updatedns() starting
          Feb 16 13:06:06 check_reload_status: Reloading filter
          Feb 16 13:06:06 check_reload_status: Restarting OpenVPN tunnels/interfaces
          Feb 16 13:06:06 check_reload_status: Restarting ipsec tunnels
          Feb 16 13:06:06 check_reload_status: Updating all dyndns
          Feb 16 13:06:06 php: : ROUTING: setting default route to 89.98.245.1
          Feb 16 13:06:06 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:06:06 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:06:06 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:06:06 php: : ROUTING: setting IPv6 default route to 2001:470:1f14:8bb::1
          Feb 16 13:06:06 php: : rc.newwanip: on (IP address: 89.98.245.209) (interface: wan) (real interface: ue0).
          Feb 16 13:06:06 php: : rc.newwanip: Informational is starting ue0.
          Feb 16 13:06:04 dhclient[5483]: bound to 89.98.245.209 – renewal in 129004 seconds.
          Feb 16 13:06:04 check_reload_status: rc.newwanip starting ue0
          Feb 16 13:06:03 dhclient: Creating resolv.conf
          Feb 16 13:06:03 dhclient: /sbin/route add default 89.98.245.1
          Feb 16 13:06:03 dhclient: Adding new routes to interface: ue0
          Feb 16 13:06:03 dhclient: New Routers (ue0): 89.98.245.1
          Feb 16 13:06:03 dhclient: New Broadcast Address (ue0): 255.255.255.255
          Feb 16 13:06:03 dhclient: New Subnet Mask (ue0): 255.255.255.0
          Feb 16 13:06:03 dhclient: New IP Address (ue0): 89.98.245.209
          Feb 16 13:06:03 miniupnpd[75455]: SendNATPMPPublicAddressChangeNotification: sendto(s_udp=14): No route to host
          Feb 16 13:06:03 miniupnpd[75455]: SendNATPMPPublicAddressChangeNotification: sendto(s_udp=14): No route to host
          Feb 16 13:06:03 dhclient: ifconfig ue0 inet 89.98.245.209 netmask 255.255.255.0 broadcast 255.255.255.255
          Feb 16 13:06:03 dhclient: Starting add_new_address()
          Feb 16 13:06:03 dhclient: Removing states through old gateway '' (new gateway '89.98.245.1')
          Feb 16 13:06:03 dhclient: Comparing Routers: Old: New: 89.98.245.1
          Feb 16 13:06:03 dhclient: Comparing IPs: Old: New: 89.98.245.209
          Feb 16 13:06:03 dhclient: Starting delete_old_states()
          Feb 16 13:06:03 dhclient: REBOOT
          Feb 16 13:06:03 dhclient[5483]: DHCPACK from 10.15.180.129
          Feb 16 13:06:03 dhclient[5483]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
          Feb 16 13:06:03 dhclient: Comparing Routers: Old: New:
          Feb 16 13:06:03 dhclient: Comparing IPs: Old: New:
          Feb 16 13:06:03 dhclient: Starting delete_old_states()
          Feb 16 13:06:03 miniupnpd[75455]: SendNATPMPPublicAddressChangeNotification: sendto(s_udp=14): No route to host
          Feb 16 13:06:03 dhclient: PREINIT
          Feb 16 13:05:15 sshd[85450]: Accepted keyboard-interactive/pam for admin from 192.168.10.100 port 54818 ssh2

          As can be seen my 'dhcp server' for the wan is in the private range, so the option to block rfc1918 networks is disabled (just to be sure)

          If more information is required please post an I will get back to it as soon as possible

          1 Reply Last reply Reply Quote 0
          • W
            woutervb
            last edited by

            During a second loss of wan ip I tried the command as shown in the logfile on the shell:
            /sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output
            This resulted in an abigious redirect error message.

            Omitting the stdout and stderr redirects from the command seems to be accepted just fine.

            So I hacked /etc/inc/interfaces.inc to omit the stdout and stderr redirects. Now hopefully I get some more usefull loggin (or even better not loose the wan ip again)

            1 Reply Last reply Reply Quote 0
            • D
              dhatz
              last edited by

              @woutervb:

              During a second loss of wan ip I tried the command as shown in the logfile on the shell:
              /sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output
              This resulted in an abigious redirect error message.

              This is probably due to the fact that you ran the command from tcsh instead of sh (bourne shell) … and the change you did has no bearing to the problem you're experiencing.

              1 Reply Last reply Reply Quote 0
              • W
                woutervb
                last edited by

                I did notice that indeed chaning interfaces.inc did not make any difference. Still loosing my IP adres after roughly 3 - 4 hours.

                The only clue I have is that in the logging I see that: rc.newwanip is triggered or triggering something. No idea yet where this comes from or what it does. Have not checked any inner workings of pfsense yet

                1 Reply Last reply Reply Quote 0
                • Z
                  Zorac
                  last edited by

                  I'm still running into same issues.  is there any additional logging I can provide to help address the issue?

                  1 Reply Last reply Reply Quote 0
                  • T
                    TravisD
                    last edited by

                    I'll try to scare up more details, but I was having this same problem on 2.0.2, so I went ahead and moved to a 2.1 BETA to see if it helped. No real improvement. For a while I could get the WAN IP back by release/renew in the Status->Interfaces page.

                    Since it just started happening all of a sudden I've been assuming it was something external to pfSense. I went ahead and swapped out my cablemodem since Comcast has been warning me that it needed to be done anyway since my old one was not DOCSIS 3.0.

                    No change there, so swapped in a new USB Ethernet adaptor (SiiG) and still no change. New ethernet cable too.

                    It's been stable for a bit now, but I still don't trust it. Only thing that seems to be at all different now is that I killed by Bittorrent client (only had a single torrent running, nothing excessive).  I'll try bringing it back up later if things seem stable and see what happens. Also just updated to the latest snapshot.

                    The is running on a 1.6GHz Ion, booting from USB (NanoBSD image).

                    If it comes back, I will return with logs and such.

                    1 Reply Last reply Reply Quote 0
                    • Z
                      Zorac
                      last edited by

                      I've tested with two different modems as well with no improvement.  2.0.1 had no issues, and early versions of the 2.1 beta were reliable for me as well.

                      1 Reply Last reply Reply Quote 0
                      • T
                        TravisD
                        last edited by

                        No luck, died again. Couldn't even get it back with release/renew in the GUI.

                        Feb 26 23:19:36 gw kernel: ue0: link state changed to UP
                        Feb 26 23:19:37 gw php: : DEVD Ethernet detached event for wan
                        Feb 26 23:19:37 gw dhclient[39419]: connection closed
                        Feb 26 23:19:37 gw dhclient[39419]: exiting.
                        Feb 26 23:19:37 gw php: : The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output' returned exit code '15', the output was '' 
                        Feb 26 23:19:39 gw php: : DEVD Ethernet attached event for wan
                        Feb 26 23:19:39 gw php: : HOTPLUG: Configuring interface wan
                        Feb 26 23:19:39 gw dhclient: PREINIT
                        Feb 26 23:19:39 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:39 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:39 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:39 gw dhclient: Starting delete_old_states()
                        Feb 26 23:19:39 gw dhclient: Comparing IPs: Old: New: 
                        Feb 26 23:19:39 gw dhclient: Comparing Routers: Old: New: 
                        Feb 26 23:19:39 gw dhclient[56796]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:40 gw dhclient[56796]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:41 gw dhclient[56796]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:41 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:41 gw kernel: ue0: link state changed to UP
                        Feb 26 23:19:42 gw php: : DEVD Ethernet detached event for wan
                        Feb 26 23:19:42 gw dhclient[56945]: connection closed
                        Feb 26 23:19:42 gw dhclient[56945]: exiting.
                        Feb 26 23:19:42 gw php: : The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output' returned exit code '15', the output was '' 
                        Feb 26 23:19:44 gw php: : DEVD Ethernet attached event for wan
                        Feb 26 23:19:44 gw php: : HOTPLUG: Configuring interface wan
                        Feb 26 23:19:44 gw dhclient: PREINIT
                        Feb 26 23:19:44 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:44 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:44 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:44 gw dhclient: Starting delete_old_states()
                        Feb 26 23:19:44 gw dhclient: Comparing IPs: Old: New: 
                        Feb 26 23:19:44 gw dhclient: Comparing Routers: Old: New: 
                        Feb 26 23:19:44 gw dhclient[68249]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:46 gw dhclient[68249]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:46 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:46 gw kernel: ue0: link state changed to UP
                        Feb 26 23:19:47 gw php: : DEVD Ethernet detached event for wan
                        Feb 26 23:19:47 gw dhclient[68398]: connection closed
                        Feb 26 23:19:47 gw dhclient[68398]: exiting.
                        Feb 26 23:19:47 gw php: : The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf ue0 > /tmp/ue0_output 2> /tmp/ue0_error_output' returned exit code '15', the output was '' 
                        Feb 26 23:19:49 gw php: : DEVD Ethernet attached event for wan
                        Feb 26 23:19:49 gw php: : HOTPLUG: Configuring interface wan
                        Feb 26 23:19:49 gw dhclient: PREINIT
                        Feb 26 23:19:49 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:49 gw dhclient: Starting delete_old_states()
                        Feb 26 23:19:49 gw kernel: ue0: link state changed to DOWN
                        Feb 26 23:19:49 gw dhclient: Comparing IPs: Old: New: 
                        Feb 26 23:19:49 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:49 gw dhclient: Comparing Routers: Old: New: 
                        Feb 26 23:19:49 gw dhclient[72692]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:50 gw dhclient[72692]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
                        Feb 26 23:19:51 gw check_reload_status: Linkup starting ue0
                        Feb 26 23:19:51 gw kernel: ue0: link state changed to UP
                        
                        

                        Going off now to try and downgrade to 2.0.1.  Any pointers to where to find it for download still?

                        1 Reply Last reply Reply Quote 0
                        • Z
                          Zorac
                          last edited by

                          some of the mirrors keep the old versions….

                          http://pfsense.mirrors.ovh.net/pfsense.org/downloads/old/

                          let me know how it works out for you.

                          1 Reply Last reply Reply Quote 0
                          • T
                            TravisD
                            last edited by

                            Thanks! That had it. Wasn't able to downgrade via the GUI, so off to yank the USB stick and re-image it.

                            1 Reply Last reply Reply Quote 0
                            • T
                              TravisD
                              last edited by

                              Update: Doesn't look like this is a 2.1 issue, unless it's something in the 2.1 config file.

                              I did a clean re-install of 2.0.1 and restored my config file (taken from the 2.1 instance).  Same problem still occurring. Guess I'm in the wrong sub forum at this point  :(

                              Back to the drawing board…

                              1 Reply Last reply Reply Quote 0
                              • A
                                abeowitz
                                last edited by

                                I've been having this problem since January.  I found that if I pull out the ethernet cable and replug it back in, it'll start working again for a while.

                                It's been getting worse recently.  Thought it was my DSL or Clearwire, but bypassing the FW proved they were fine.

                                I thought it might be my USB ethernet adapters.  (Since my box only has one ethernet port, I have to use USB for WAN and OPT1.)  But other brands of USB ethernet also failed.

                                After reading this thread, I went back to 2.0.2, but forgot that my ethernet card isn't supported in FreeBSD 8.1, so I tried the 2.1 beta disc I made back on Nov 29th, and things seem very stable at the moment.  – I started fresh with minimal configuration/tweaking and have not upgraded.

                                I did have an AMD proc and powernow settings enabled.  In retrospect, I should've tested that, or some of the other advanced ethernet settings...

                                1 Reply Last reply Reply Quote 0
                                • T
                                  TravisD
                                  last edited by

                                  Update: Stable overnite running on 2.0.1. Will continue to monitor.

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tworush
                                    last edited by

                                    woutervb
                                    I have the same problem my work around is creating a script which pings google and if packet lost my network card restarts

                                    copy and save this file in the root home directory called wan_check.sh

                                    #!/usr/bin/env bash
                                    #/usr/local/bin/network_check
                                    
                                    # Script to monitor and restart network card
                                    
                                    maxPloss=10 #Maximum percent packet loss before a restart
                                    
                                    restart_networking() {
                                            # Add any commands need to get network back up and running
                                            sh /root/wan.sh
                                    
                                    }
                                    
                                    # First make sure we can resolve google, otherwise 'ping -w' would hang
                                    if ! $(host -W5 www.google.com > /dev/null 2>&1); then
                                            #Make a note in syslog
                                            logger "network_check: Network connection is down, restarting network ..."
                                            restart_networking
                                            exit
                                    fi
                                    
                                    # Initialize to a value that would force a restart
                                    # (just in case ping gives an error and ploss doesn't get set)
                                    ploss=101
                                    # now ping google for 10 seconds and count packet loss
                                    ploss=$(ping -q -w10 www.google.com | grep -o "[0-9]*%" | tr -d %) > /dev/null 2>&1
                                    
                                    if [ "$ploss" -gt "$maxPloss" ]; then
                                            logger "Packet loss ($ploss%) exceeded $maxPloss, restarting network ..."
                                            restart_networking
                                    fi
                                    
                                    

                                    This code will restart Wan if ping loses packets.  change de1 to your wan interface
                                    name this file wan.sh

                                    ifconfig de1 down
                                    sleep 5
                                    ifconfig de1 up
                                    dhclient de1
                                    
                                    

                                    change the attriputes (Chmod) to 777 on both files
                                    and setup cron job to check the wan interface every 30 min
                                    30  0  *  *  *  root  /root/wan_check.sh

                                    Note I had to make the folowing change because running under Hyper-v.  Change Speed and duplex to "100 base tx full duplex" this located under interface–> WAN

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      abeowitz
                                      last edited by

                                      What do you all have powerd set to?

                                      Mine seems to fail when powerd is checked.  But that could be just coincidence…  (Looking for patterns.)

                                      1 Reply Last reply Reply Quote 0
                                      • Z
                                        Zorac
                                        last edited by

                                        mine is unchecked (off)

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          abeowitz
                                          last edited by

                                          So, I updated from 2012-11-29 to today and the problem returned.

                                          However, reconfiguring from scratch, I made the WAN & OPT IP's static, and it seems stable.  (Though static means I have to NAT again through the modems.)

                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            TravisD
                                            last edited by

                                            Do you guys have OpenVPN configured (but perhaps not used) by any chance? I'm starting to think that this may have started for me about the time I started messing with OpenVPN (I got interested when the IOS OpenVPN App came out). I came across a post here somewhere that seemed to correlate one of the various error messages with OpenVPN.

                                            I just whacked the OpenVPN config on my system to see if it stabilizes at all. We'll see what happens.

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