TL-WR740N no wan IP after reboot

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3, 4  Next
Author Message
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Fri Jul 01, 2011 16:24    Post subject: TL-WR740N no wan IP after reboot Reply with quote
I have a big problem getting IP when I reboot the router.
Everything works fine until i reboot it, it just doesn't get WAN IP, it stays at 0.0.0.0.
However, I found a simple solution - I just go to Setup -> Click "Apply settings", the router reboots again and I have WAN IP and internet.

My question is how to make it work every time without having to go to DD-WRT, clicking, reboot again - All I want is when I reboot to get my connection working as it was.

Thanks.
Sponsor
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Fri Jul 01, 2011 17:08    Post subject: Reply with quote
Check my signature.
_________________
DD-WRT Forum - Atheros Recommended Build
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Fri Jul 01, 2011 17:52    Post subject: Reply with quote
fyi2000 wrote:
Check my signature.

Thanks. I tried build 15704 but it doesn't solve the problem Sad
What build would you recommend?
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Fri Jul 01, 2011 18:18    Post subject: Reply with quote
I don't know. Have you tried another ethernet cable? What's the hardware version of your TL-WR740N?
_________________
DD-WRT Forum - Atheros Recommended Build
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Fri Jul 01, 2011 19:54    Post subject: Reply with quote
fyi2000 wrote:
I don't know. Have you tried another ethernet cable? What's the hardware version of your TL-WR740N?

It's v2.1.
And I don't know why should I change the cable, it worked perfectly with the original firmware.
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Sat Jul 02, 2011 16:43    Post subject: Reply with quote
I created a video that exactly explains my problem!
Watch it here: http://youtu.be/_kiChyQkuOI?hd=1 (Watch it in 720p so you can see better).

I'm sure there is a way this can be resolved Crying or Very sad
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Mon Jul 04, 2011 12:09    Post subject: Reply with quote
Bump. Anyone? -.-'
scoot
DD-WRT Novice


Joined: 29 Jul 2011
Posts: 2

PostPosted: Fri Jul 29, 2011 21:43    Post subject: Reply with quote
Hey krstep:

I had the exact same problem with my WR740N. Whenever I'd turn it on, I need to "apply" the settings in order to get a WAN connection. Tried a couple of different builds (15778, 17201) and both had the problem.

However, I found that if I run the Automatic Connection Repair script, then it will fix the WAN connection. (Go to Administration > Commands to access the shell.) And if I set it to run at startup, then it will run the script when I turn it on and my problem is practically fixed!

I'd still like to find another way to fix this without having to run this script upon startup. (Could this possibly be a modem-specific issue?) But this will do for now.

-scoot[/url]
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Fri Jul 29, 2011 21:51    Post subject: Reply with quote
scoot wrote:
Hey krstep:

I had the exact same problem with my WR740N. Whenever I'd turn it on, I need to "apply" the settings in order to get a WAN connection. Tried a couple of different builds (15778, 17201) and both had the problem.

However, I found that if I run the Automatic Connection Repair script, then it will fix the WAN connection. (Go to Administration > Commands to access the shell.) And if I set it to run at startup, then it will run the script when I turn it on and my problem is practically fixed!

I'd still like to find another way to fix this without having to run this script upon startup. (Could this possibly be a modem-specific issue?) But this will do for now.

-scoot[/url]

I'll try this to see if this works.
Thanks so much!
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Sat Jul 30, 2011 16:00    Post subject: Reply with quote
krstep wrote:
scoot wrote:
Hey krstep:

I had the exact same problem with my WR740N. Whenever I'd turn it on, I need to "apply" the settings in order to get a WAN connection. Tried a couple of different builds (15778, 17201) and both had the problem.

However, I found that if I run the Automatic Connection Repair script, then it will fix the WAN connection. (Go to Administration > Commands to access the shell.) And if I set it to run at startup, then it will run the script when I turn it on and my problem is practically fixed!

I'd still like to find another way to fix this without having to run this script upon startup. (Could this possibly be a modem-specific issue?) But this will do for now.

-scoot[/url]

I'll try this to see if this works.
Thanks so much!


OK, I was trying this for hours, tried both the first and the seconds script, but with no luck. When I restart the router I still don't have WAN IP.
Can you tell me your exact build version and steps how to make it work.
Thanks.
scoot
DD-WRT Novice


Joined: 29 Jul 2011
Posts: 2

PostPosted: Sat Jul 30, 2011 18:54    Post subject: Reply with quote
Hmmm, here's what I did:

* I'm using BrainSlayer build 17201, although I'm not sure if this matters: ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2011/06-14-11-r17201/tplink_tl-wr740nv2/
* Go to Administration tab
* Go to Commands tab
* You see a Command Shell box. Paste this in:
Code:
#!/bin/sh
INTERVAL=10
PACKETS=1
UDHCPC="udhcpc -i vlan1 -p /var/run/udhcpc.pid -s /tmp/udhcpc"
IFACE=vlan1


ME=`basename $0`
RUNNING=`ps | awk '/'"$ME"'/ {++x}; END {print x+0}'`
if [ "$RUNNING" -gt 3 ]; then
   echo "Another instance of \"$ME\" is running"
   exit 1
fi

while sleep $INTERVAL
do
   TARGET=`ip route | awk '/default via/ {print $3}'`
   RET=`ping -c $PACKETS $TARGET 2> /dev/null | awk '/packets received/ {print $4}'`

   if [ "$RET" -ne "$PACKETS" ]; then
      echo "Ping failed, releasing IP address on $IFACE"
   #send a RELEASE signal
      kill -USR2 `cat /var/run/udhcpc.pid` 2> /dev/null
   #ensure udhcpc is not running
      killall udhcpc 2> /dev/null
      echo "Renewing IP address: $IFACE"
      $UDHCPC
      echo "Waiting 10 s..."
      sleep 10
   else
      echo "Network is up via $TARGET"
   fi
done

* If you want to merely TEST the script, click "Run Commands"
* If you want to make it run at startup, click "Save Startup"
* Later, if you want to remove it, click the "Edit" button below where the script appears, empty the box above, and click "Save Startup"

hope this works better for you! Have you made any tweaks to your system that might prevent the script from running or something?
ck0ne
DD-WRT Novice


Joined: 27 Jul 2011
Posts: 2

PostPosted: Mon Aug 08, 2011 1:23    Post subject: Reply with quote
Hi krstep,

i'm also using build 17201 on my WZR-HP-G300NH.

For me the reason for no WAN IP by dhcp (cable) was the cloned mac which was not set properly at startup. Just call "ipconfig" via ssh/telnet if your router got no WAN IP after (re-)boot. The WAN-interface on the WZR-HP-G300NH is eth1, don't know if the interface on a WR740N is really vlan1 as used in the always_on.sh-script. To be sure, which interface is the right, just call "ifconfig" again after doing "Apply settings".

I tried several steps: restarting udhcpc as shown in always_on.sh, setting the mac manually, restart udhcpc after setting mac manually and and and ... nothing ... BTW: the always_on.sh isn't meant to use as code in the startup.

But finally, just very simple ...
Code:
#    _________________________________________________________ for Buffalo
#   /  ___   / ______/ ______/_   ___/ ___   / ___   /_   ___/     WZR-HP-G300NH
#  /  __   _/ ___/__/____   / /  / /  ___   / __   _/ /  /    with DD-WRT r17201
# /__/  \__\_______/_______/ /__/ /__/  /__/_/  \__\ /__/_   _____________   ___
#                                                     /  /__/  / ___   /  \ /  /
# Workaround to fix issue of "MAC Address Clone" is  /  /  /  / ___   / /  /  /
# not set properly before starting dhcp-client.     /________/_/  /__/_/ \___/
#
# The "SLEEPER" is needed to prevent repeatedly run by calling "rc restart".
#
# Remark: Don't forget "#!/bin/sh" when no other startupcode is set before!
#

# *1

if [ `ps | grep -c "sleep\ 12345"` -ne "0" ]; then
  kill `ps | awk '/sleep\ 12345/ {print $1}'`
else
  TARGET=`ip route | awk '/default via/ {print $3}'`
  RET=`ping -c 1 $TARGET 2> /dev/null | awk '/packets received/ {print $4}'`
  if [ -z "$RET" -o "$RET" != "1" ]; then
    sleep 12345 &
    rc restart
  fi
fi


*edit*If there is no code which causes some sleep, you may need to insert "sleep 5" or "sleep 10" before (on "# *1"). Didn't test without and my code waits at least 7 secs before reaching the restart-sequence. */edit*

It simply does what you doing manually. It makes a "rc restart" when no gateway ip is found (like always_on.sh), what seems to be the same like pressing "Apply settings".

Hope it helps out while this issue isn't fixed in DD-WRT.
krstep
DD-WRT Novice


Joined: 08 Jun 2011
Posts: 11

PostPosted: Sun Sep 18, 2011 16:57    Post subject: Reply with quote
OK, because for a long time I've been on the stock firmware, I decided to try DD-WRT yet again.

No mater what I try, I just *can't!* get this script to work. I don't have WAN IP after I turn the router on/off.

I tried everything I could possibily think of. Reseted settings, reflashed DD-WRT, still nothing.
Only thing that works is "Apply Settings".

Help Neutral
nebbia88
DD-WRT User


Joined: 08 Mar 2010
Posts: 174

PostPosted: Sun Sep 18, 2011 20:25    Post subject: Reply with quote
already tried this 2 lines in start up commands section?

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=609104#609104
ck0ne
DD-WRT Novice


Joined: 27 Jul 2011
Posts: 2

PostPosted: Sun Sep 18, 2011 21:11    Post subject: Reply with quote
ok, how is the result, when you do under Commands: "rc restart" -> Run Commands after the router has fully rebooted and has no wan-ip?
Goto page 1, 2, 3, 4  Next Display posts from previous:    Page 1 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum