No WAN connection after a blackout

I am using TP-Link TL-WDR4300. I already flashed OpenWrt on it, and have been using it without any problem for quite a long time.

Yesterday, there was a quick blackout that lasted less than a second. Though the router booted to OpenWrt without problem, since then it lost its ability to connect to the internet. A quick inspection doesn't show any sign of damage in the circuitry, and the problem persists even when I convert one of the LAN ports to a WAN port.

Things I tried are:

  • completely power-cycling the device (left unpowered for at least 6 hours)
  • reviewing network configurations (diffing the files gave no evidence of corruption)
  • converting a LAN port to a WAN port and using that, just to confirm that WAN port isn't damaged
  • spoofing MAC address of the eth0.2 device (bound to WAN interface) so that I can get a new IP address from the ISP
  • performing factory reset

None of them were effective. Note that if I connect my computer directly at the wall socket, the internet work correctly. But I still have at least 4 devices that are dependent on my router, and I need them to be connected ASAP.

Thanks!

P.S. I am currently at a dormitory room, so I do not know the ISP and have no way to contact them. (Bringing a router is prohibited in the first place, too...)

Anything useful in the logs?

Here is the system log file obtained from LuCI: https://pastebin.com/DYedgLTs

The last ~10 lines are logged when I tried ifdown wan && ifup wan. I tried calling the command multiple times, but no IP available to me.

I just tried calling udhcpc directly, but it also hangs after 3 attempts of sending discover.

While I don't really expect a change, sysupgrading to the current OpenWrt version (or the same again) would rule out potential silent corruption of the base firmware.

1 Like

Just tried reflashing the firmware. Unfortunately, the problem persists... I was informed that a technician has checked the internet connection last midnight, but still I cannot get an IP...

It may be possible that they have detected your router, and are blocking its MAC address(s) from obtaining an IP. Can you spoof your computer's MAC address onto the WAN port and see if you get an IP then?

1 Like

If you haven't done so already, a factory reset (not keeping/ restoring settings) would also be on the schedule (configuration errors might be subtle and evade the naked eye), before declaring defeat or pronouncing it as dead.

Aside from the potential MAC locking mentioned by jk3wl, some ISPs 'retaliate' if you reconnect too often for their liking, so keeping everything (including the modem) switched off for upwards of 15 minutes sometimes helps as well.

2 Likes

Verify that your PC works when connected directly to the upstream router/switch.
Try to clone its MAC and set up the working IP+netmask+gateway+DNS statically on OpenWrt.
If the issue persists, try replacing the cables.

Thank you for your suggestion.

As jk3wl suggested, I tried copying both br0 and eno2 interface's of MAC address to the WAN interface, but it is still unable to get IP address.

Now even direct wired connection is unable to get an IP, so I guess I am on the retaliation period? So now I am currently using wireless to connect to the internet. I'll try your suggestion once this retaliation is over.

1 Like

If your PC logs its DHCP client activity, you can try to find the latest working parameters and configure the network connection statically without DHCP.

1 Like

The retaliation period was over, so I tried setting up a static IP.

From the LuCI Interfaces menu, I changed the protocol to "static address" and entered my IPv4 address and gateways, which I got from running ip addr and ip route on my desktop beforehand. Also in the advanced settings tab, I overrode my desktop's MAC address, and changed the MAC address for eth0.2 device using uci set network.wan_eth0_2_dev.macaddr=xx:xx:xx:xx:xx:xx.

Now udhcpc doesn't complain in the system log, but running ping still gives bad address error...

1 Like

Bad address error means DNS was unable to lookup the name you were trying to ping-- no DNS server is configured, or the DNS server is unreachable on the Internet.

Try pinging a site by number instead such as 8.8.8.8.

1 Like

Unfortunately, that didn't work as well. I tried pinging publicly known services like 1.1.1.1 and 8.8.8.8, but the packets went nowhere...

If the ISP has banned you they would block everything, not only DHCP.

Since this is still open, it can help other people arriving here. Refer to:

It seems there is some issue with the WAN port being down upon a reboot, and not being correctly detected by the counter-party.