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...)
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.
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?
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.
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.
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.
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.
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...
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.