1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

WAN_Connection: ISP's DHCP did not function properly.

Discussion in 'Asuswrt-Merlin' started by Allan Marcus, Apr 20, 2019.

  1. Allan Marcus

    Allan Marcus Regular Contributor

    Joined:
    Dec 26, 2018
    Messages:
    59
    Anyone can send a ping to a an IP address. That is unlikely the answer. Have the modem not registered properly certainly could be a solution. They might also have just been saying that as a placebo. Who knows; maybe they did something, maybe they just sent a restart. I haven't seen the issue on my router since Jul 11, but it happened many times on Jul 11, and just a few times before that. It possible merlin firmware updates have resolved the issue.
     
  2. abir1909

    abir1909 Occasional Visitor

    Joined:
    May 22, 2019
    Messages:
    27
    Hi Allan, were you able to solve that problem? i am getting that error for the past week. have to reboot the router every time to get the internet back. i restored the router and it didnt solve the problem.
    i have AC86U with the latest firmware. thanks
     
  3. Allan Marcus

    Allan Marcus Regular Contributor

    Joined:
    Dec 26, 2018
    Messages:
    59
    First off, There is a big icon in the internet status box, and I didn't realize I could click on that to get connection info! Also to force a renew (WAN off/on). Try that before rebooting.

    Comcast replaced the wire from the curb to my house. I think that helped. I also had the modem itself replaced. Both happened at the same time, no can’t tell which might happened help.

    I also wrote a script to check the status of the external connection. It runs every minute, and uses very little resources. If the external connection is in the wrong state (see which variables I’m checking), it renews the lease. If you need it, I can post it, but you need to know how to use ssh.
     
  4. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Very Senior Member

    Joined:
    Jun 4, 2019
    Messages:
    1,130
    I would like to know your script on how you renew the lease.
     
  5. Allan Marcus

    Allan Marcus Regular Contributor

    Joined:
    Dec 26, 2018
    Messages:
    59
    Code:
    #!/bin/sh
    # Purpose: script to add the ip check script to cron
    # Author: Allan Marcus under GPL version 2.x or above
    # /jffs/scripts/services-start
    # -------------------------------------------------------------
    # cru command
    # https://www.cyberciti.biz/faq/how-to-add-cron-job-on-asuswrt-merlin-wifi-router/
    cru a ipcheck "*/2 * * * * /jffs/scripts/ip_check.sh"   
    logger "*** added ip_check.sh to cron"
    # chmod a+rx /jffs/scripts/*
    
    
    
    
    
    
    #!/bin/sh
    # Purpose: restart the DHCP lease process if no external IP detected
    # Author: Allan Marcus under GPL version 2.x or above
    # -------------------------------------------------------------
    # remember to make this script executable
    # /jffs/scripts/ip_check.sh
    
    # set the default
    RESET=0
    
    # get the external IP address
    # could use:
    # nvram get wan0_realip_ip
    # nvram get wan0_ipaddr
    # but the ifconfig command seems more reliable and return the correct IP faster
    myIP=`/sbin/ifconfig eth0 | /bin/grep 'inet addr' | /usr/bin/cut -d: -f2 | /usr/bin/awk '{print $1}'`
    
    if [ -z "$myIP" ]
    then
            RESET=1
    fi
    
    # get the WAN state
    wan0_auxstate_t=`nvram get nvram get wan0_auxstate_t`
    
    if [ $wan0_auxstate_t != "0" ]
    then
            RESET=1
            logger "*** wan0_auxstate_t = $wan0_auxstate_t - will reset"
    fi
    
    # if needed, reset the WAN
    
    if [ $RESET == 1 ]
    then
            logger "*** releasing lease" 
            killall -SIGUSR2 udhcpc
            sleep 5
            logger "*** renewing lease" 
            killall -SIGUSR1 udhcpc
            sleep 1
            myIP=`/sbin/ifconfig eth0 | /bin/grep 'inet addr' | /usr/bin/cut -d: -f2 | /usr/bin/awk '{print $1}'`
            sleep 1
            logger "*** external IP address is $myIP"
    #else
            #logger "*** external IP address is $myIP and wan0_auxstate_t = $wan0_auxstate_t"
    fi
    
     
  6. abir1909

    abir1909 Occasional Visitor

    Joined:
    May 22, 2019
    Messages:
    27
    Thanks Allen, and thanks for the script, will give it a try.
     
  7. Vax

    Vax New Around Here

    Joined:
    Oct 8, 2012
    Messages:
    8
    This probably just saved me hours of fiddling. Indeed I either had to wait 60+ minutes (my ISP lease time) to switch over from N66U to the new RT-AC86U. Or, after reading your comment I just spoofed the N66U's MAC on the RT-AC86U's WAN port and boom connected :D thank you Merlin!
     
  8. vblackman

    vblackman New Around Here

    Joined:
    Aug 9, 2017
    Messages:
    3
    This is mistake?
     
  9. Allan Marcus

    Allan Marcus Regular Contributor

    Joined:
    Dec 26, 2018
    Messages:
    59
    Nope, why do you ask?
     
  10. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    3,320
    Location:
    UK
    Because the syntax you posted is incorrect?
    Code:
    echo `nvram get nvram get wan0_auxstate_t`
    
    usage: nvram [get name] [set name=value] [unset name] [show] [commit] [save] [restore] [erase] [fb_save file]
    usage: nvram [save_ap file] [save_rp_2g file] [save_rp_5g file] [save_rp_5g2 file]
    it should be
    Code:
     echo `nvram get wan0_auxstate_t`
    
    0
    
     
    Last edited: Jan 21, 2020
    joe scian and L&LD like this.
  11. camedia

    camedia Occasional Visitor

    Joined:
    Jan 7, 2018
    Messages:
    22
    I have had this problem on my AC68P with Comcast/Xfinity on and off for years. I have a dual WAN setup and my secondary WAN is a mobile hotspot with a Google Fi data SIM. Failing over to Google Fi would cost me extra money, so I wrote a script to turn on a red light near my TV and restart WAN0 when it occurs. In the past few months the problem went away without any changes on my end, but it suddenly came back last Monday evening. And it was really bad - there were over 20 failovers everyday. Last night I decided to change Network Monitoring under Dual WAN from Ping to DNS Query. I had no disconnects for an entire day. Tonight I changed it back from DNS Query to Ping, and the problem came back within 30 minutes.
     
  12. supo

    supo New Around Here

    Joined:
    Jan 16, 2014
    Messages:
    4
    Hi all, I'm literally going crazy trying to find a fix for this WAN_Connection: ISP's DHCP did not function properly error. I have a Asus ac86u modem brand new one, and previously I had ac66u which I have been using for years without an issue. But ever since I got a new modem/router from my ISP 2 months ago which is a Sagemcom 3890 V3 (DOCSIS modem I suppose), I started to have this DHCP problem. I had a Sagemcom V3686 previously for years and never had this issue with my Asus router.

    I tried everything I can think of, however every ~50 hours I loose my internet connection and to establish a connection again I can just unplug the ethernet cable from the back of the modem and plug it back again. No need to restart the modem or the Asus... I tried latest stock fw and also merling fw but it doesn't help. I tried changing quiet a few settings as much as I can but no help. As far as I understand this is a Asus issue? I mean people with this problem have different kind of modems but Asus routers are the culprit here?
     
  13. shareonline

    shareonline New Around Here

    Joined:
    Feb 3, 2020
    Messages:
    2
    I have the exact same problem here..
    My ISP is Yousee (Denmark) and have tried both Sagemcom 3890 V2 and Sagemcom 3890 V3. 3 Brand new from ISP.
    It is pretty clear to me that this is an Asus bug. Right now i'm trying an older Merlin FW to see if it's at fault, but i need to give a couple of days each time i test. Mine happens approx every 50-60 hours.
     
  14. shareonline

    shareonline New Around Here

    Joined:
    Feb 3, 2020
    Messages:
    2
    I have changed my configuration to a double NAT scenario where I disabled everything (dhcp, wifi, etc) from the cable modem and forwarded all traffic to my Ac1900.
    This has now been running stable for a week now..
    It's this bridge mode setup that's trouble. But running double NAT is less than ideal..

    Really hope that Merlin or anyone else can figure out what the problem is.
    Maybe a more granually settings based WAN dhcp mode? You know a manual setting of the dhcp pool frequency rather than just two settings?
     
  15. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    20
    You're not alone,... I updated my ac68u to 384.15 and now I get this same mess,... I have to go to WAN settings, scroll all the way down and hit Apply,...a minute later, I'm back online. I hate it....no one seems to have an answer. I mean I have a very non-complicated setup, AC68U as a router, AC1900p as a AiMesh node,...factory reset after updating,....I mean, WTH is going on?
     
  16. Zonkd

    Zonkd Very Senior Member

    Joined:
    Oct 19, 2014
    Messages:
    516
    My Ac86U also still has this issue from time to time. It used to occur constantly at least once every 48 hours. Now it only happens occasionally maybe every two or three weeks but is still a huge nuisance. Happened to me just a week ago. The AC86U is good when it works but very unreliable. Even gets stuck during soft reboot. ASUS QC is lacking. If you’ve got this problem you’re probably not going to be able to fix it. Get a new router.
     
  17. dlandiss

    dlandiss Very Senior Member

    Joined:
    Jul 14, 2013
    Messages:
    545
    Location:
    St. Louis, MO
    I suspect that a large percentage of us are running double-NAT. Sometimes bridge-mode is hard to find in the modem setup.

    I run double-NAT here (WAN-to-modem, modem-to-router) and sometimes even triple with a third network on 10.1.1.xxx for setting up hardware to go into other homes. I can see no meaningful difference in speed or latency down at the third level -- still getting 9 to 10ms ping and 230Mbps downstream from my "200Mbps" Spectrum feed.
     
  18. kosander

    kosander New Around Here

    Joined:
    Apr 9, 2020
    Messages:
    2
    I had to register here to reply to you who are suffering from this "bug" on Asus routers.

    I have RT-N66U and had these problems with Cisco cable modem previously (I have used 4G-modem for almost 3 years now). Recently I reactivated the cable modem subscription because of lack of bandwidth on the 4G. I received a new cable modem (Technicolor CGA2121) from my ISP Telia and changed it to bridge mode with Asus RT-N66U. Randomly between 2-4 days the connection went down with the message "Your ISPs dhcp did not function properly". I bought a new RT-AX58U and the problem persisted. I changed the WAN dhcp query frequency from "aggressive" to "normal", did not help. Then I copied my Lenovo's LAN-adapter MAC-address to the Asus WAN mac address. Now the connection has been stable for almost two weeks!
     
  19. Vexira

    Vexira Part of the Furniture

    Joined:
    Jan 20, 2017
    Messages:
    2,102
    Location:
    Australia
    There is a fix form Asus call dhcp continuous mode, it should be in a future firmware soon.
     
  20. kosander

    kosander New Around Here

    Joined:
    Apr 9, 2020
    Messages:
    2
    Nice to know, thanks! Today my connection went down during web-browsing and the same old message in the log "WAN Connection: ISP's DHCP did not function properly."