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.
I already thought that here is a fix for me for this same problem but it didn't work for me 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?
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
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
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.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Fri Dec 27, 2019 18:39 Post subject:
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
It is very special, I think that I am here to help Script Can get 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.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Sat Dec 28, 2019 1:32 Post subject:
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