TL-WR740N no wan IP after reboot

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


Joined: 25 Jun 2008
Posts: 87

PostPosted: Tue Sep 20, 2011 15:31    Post subject: Reply with quote
Does your WAN MAC address change after reboot? I'm wondering if it's related to the same issue I'm having. See my post here.

Basically, with DD-WRT on my router, on reboot all interfaces on the router have the same MAC address, including WAN. After clicking "apply settings" on any configuration page, the WAN MAC address changes to what it was on boot +1.

If you have an ISP that only hands out a single IP address to a single MAC (sometime rebooting your modem, then your router, will allow you get a new IP address on a different MAC address, sometimes you need to call your ISP to report your new MAC address -- depends on the ISP.) the MAC address changing will cause you to lose your WAN IP.
Sponsor
Rayrox
DD-WRT Novice


Joined: 06 Oct 2011
Posts: 1

PostPosted: Thu Oct 06, 2011 14:06    Post subject: This worked for me !!! Reply with quote
Code:

sleep 30
stopservice wan
sleep 30
startservice wan


It does what it says:

Line 1) After reboot the execution will be delayed by 30 seconds allowing the router to completely restart

Line 2) will STOP WAN

Line 3) will wait again

Line 4) will START WAN

To fine tune the delays, you can ping any website via the terminal or cmd and get the timing adjusted (minimize delays) accordingly.

To restart the router whenever the connection (ping) fails:

Setup "WDS/Connection Watchdog" to ping any reliable ip (8.8.8.8 or 208.67.222.222), delay of 180-300 seconds works fine.

DD-WRT Rocks, Thanks
brainbone
DD-WRT User


Joined: 25 Jun 2008
Posts: 87

PostPosted: Thu Oct 06, 2011 15:47    Post subject: Reply with quote
I understand that there are work-around, but they should not be needed. It's a bug that should be fixed.
cityismine
DD-WRT Novice


Joined: 09 Feb 2007
Posts: 25

PostPosted: Wed Dec 14, 2011 5:12    Post subject: Reply with quote
Check:

Setup > Connection Type

I found mines was set to disabled when I flashed dd-wrt for the first time. I changed it to automatic configuration-dhcp and wan started working.
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 14:14    Post subject: Reply with quote
I already thought that here is a fix for me for this same problem but it didn't work for me Sad I have a Netgear R7800 router with the latest DD-WRT or r41791.

My problem is that every time I have to restart my router I do not have the correct WAN IP address and the internet connection does not work. I have to restart my ISP modem and my Negear R7800 router several times to get my WAN IP address correctly.


Is there a script that would help me? This is a really annoying problem. When I tried this script it didn't work and I saved it with the save startup button. Can someone help me?

#!/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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Fri Dec 27, 2019 14:48    Post subject: Reply with quote
Your interface is not vlan1 it is eth0

Strange that you loose your WAN, what is the lease time set?

Your modem is in bridge mode, i.e. you have a public WAN ip?

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 14:53    Post subject: Reply with quote
Yes my Netgear R7800 is in Gateway mode and its WAN port is connected via ethernet cable to the ISP fiber optic cable modem.


This is a really embarrassing problem. For example, if I put some settings on my router and press save and apply settings, the connection will be lost and the WAN IP will change. I have to restart the ISP modem and my Netgear R7800 router several times to get the correct WAN IP address and a working internet connection again.


Is there any way to fix this annoying problem?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Fri Dec 27, 2019 15:17    Post subject: Reply with quote
you can try the script but instead of vlan1 use eth0
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 15:34    Post subject: Reply with quote
How can I change this properly for this to succeed?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Fri Dec 27, 2019 15:38    Post subject: Reply with quote
In the script you see vlan1, substitute it with eth0 (that is a zero) and see of that works
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 16:34    Post subject: Reply with quote
I moved eth0 to every vlan1 but this didn't work for me Sad So my problem is not resolved.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Fri Dec 27, 2019 18:39    Post subject: Reply with quote
The wan interface on N and AC devices is vlan2. While eth0 is the switch, it is not the WAN port. At least that is how I understand things. I could be wrong. You can try changing it to vlan2 in your script and seeing how it works.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 20:47    Post subject: Reply with quote
According to this, my WAN port would be eth0. I don't really understand why the script doesn't work for me? I saved it with the startup save button.


Please click on this link to see the whole picture.:
https://aijaa.com/pebpdR
Mazufa
DD-WRT User


Joined: 20 Jul 2019
Posts: 100
Location: Finland

PostPosted: Fri Dec 27, 2019 22:51    Post subject: Reply with quote
It is very special, I think that I am here to help Script Can get Sad I have not so far found a solution to this problem although I have DD-WRT Forum read today. I had time already to think that this script solves the problem but does not ....

For example, it is very uncomfortable to start setting up some settings because I know that I have to fight back to get the internet connection back for maybe hours to get the correct WAN IP address.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sat Dec 28, 2019 1:32    Post subject: Reply with quote
Well, I offered something to try. FWIW, eth0 as far as I know, never receives an IP address (you can check ifconfig), but vlan2 does. What is assigned as WAN port in the webUI under networking....
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 2 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