No internet after updating firmware to 23.05.3

I have OpenWRT installed on a TP-Link Archer C7 v2 and have been using it for several years. Here are the bullet points to save time, more detailed explanation below:

  • Update router to 23.05.3.
  • No internet connection.
  • Factory reset, still same.
  • Check modem, all good.
  • Revert back to previous firmware, still same.
  • Minor TX activity on wan but no connection.
  • Called ISP, no issues on their end.

I recently updated the firmware to 23.05.3 via the usual method, the web UI. Kept my settings as I have done in the past successfully. wan settings are all default, as it connected fine when I first set it up.

After the router booted back up, I signed into LuCi and noticed I had no external IP address. Diagnostics, IPv4 ping, no internet connectivity. I went and performed a factory reset, as I know from previous experience that the default settings allowed me to at least connect to the internet.

After signing in again, the situation had not changed. No internet. I then checked the next device in the chain, my internet modem. It reported no issues, but I power cycled it anyway. It turns back on, LEDs on and indicate a valid connection, but still no internet on the router.

I can see in the interfaces menu that the wan port is connected, and there appears to be some TX activity (like it's attempting to connect but failing). I've inspected all the cables and it appears good. I'm doubtful it's a hardware problem as this happened right as I updated the firmware.

I downgraded the firmware back to a last known working firmware I had, 23.05.0. No change.

I even called my ISP to check if they could see any issues on their end. No network outages. Modem is reporting good health. We even connected a computer directly to the modem and it got a connection so the internet itself is fine.

I don't know what to check next. Tempted to flash back the factory firmware, but researching it the process seems complicated and there is conflicting information on whether or not the boot image needs to be trimmed to avoid a brick. Any help is appreciated.

Is the ISP modem in bridge mode i.e. did you had a Public IP address on the WAN?
If so disconnect OpenWRT router from ISP modem and power down ISP modem for at least 5 minutes, after that powerup the ISP modem and connect OpenWRT router.

If the ISP modem is not in bridge mode change the LAN IP from OpenWRT router from 192.168.1.1 to 192.168.2.1

Maybe it helps

Yes, I had a public IP address on the wan (starting with 200.X) and the modem itself only has one ethernet port.

I have tried power cycling the modem, but it's still the same. When calling the ISP, they also attempting issuing a new IP address for me, but still the same.

I did discover something though, connecting the modem straight to my computer shows similar behaviour of it attempting to get a connection but failing. I will investigate this further.

If there is a command I can run from openwrt to analyse what it's doing in regards to attempting to get an IP that might make it clearer.

This is an annoying standard issue on most cable Internet modems: cable modems remember the MAC address of your router WAN port on the first connect and from then on refuse to connect to a different device (as that has a different MAC address).
Power cycling (we assume you mean rebooting) the modem is often not enough to undo this. You need to completely power down the cable modem for several minutes to reset this MAC address memory. This is also what edc wanted to point out in his post: MAC addresses are often software-defined, maybe the WAN MAC address of the router had changed due to the OpenWRT update.

1 Like

Ok, so after some investigation I have discovered:

Connecting my computer directly to the modem was at first exhibiting the same problems, but after plugging out the cable and plugging it back in it connected successfully with a public IP starting with 200.X.

I unplugged it from the computer, the cable that was successfully giving data to the computer, straight into the router, and OpenWRT continues to not see a connection.

Next I will try doing the extended power cut from the modem to completely reset it. Maybe that will cause it to "reseek" the MAC? But for today I have run out of time so I will continue tomorrow. I feel like I am on the cusp of discovering what the actual issue is.

I have tried turning off the modem and router for ten minutes, and then connecting and turning them back on. Still no internet.

I don't think my modem is MAC limited, as when I got my internet plan in the first place I chose the "Bring Your Own Router" option. I've used it with both this current TP-link router and an older D-link router I had years ago.

From which version you upgraded? Do you have original config backed up?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

The version immediately before the upgrade was 23.05.0. I have tried that version since, and still no internet. I even restored a backed up config I had, still nothing.

I tried flashing the stock factory firmware back onto it via TFTP. It successfully connects to the internet there. I also tried flashing dd-wrt, it too is able to successfully connect to the internet.

I also tried flashing the first version of OpenWRT I ever loaded on the router, 19.07.7, and it failed to connect to the internet. Now I know that it successfully connected in the past. I've thus re-upgraded the firmware to the current version, 23.05.3, still no internet connection. Things are not making sense to me. Here are the logs as you've requested:

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.150",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
        "model": "TP-Link Archer C7 v2",
        "board_name": "tplink,archer-c7-v2",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "ath79/generic",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"
        }
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdb3:775a:dff7::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 6t'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-MLD
        option src              wan
        option proto            icmp
        option src_ip           fe80::/10
        list icmp_type          '130/0'
        list icmp_type          '131/0'
        list icmp_type          '132/0'
        list icmp_type          '143/0'
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-IPSec-ESP
        option src              wan
        option dest             lan
        option proto            esp
        option target           ACCEPT

config rule
        option name             Allow-ISAKMP
        option src              wan
        option dest             lan
        option dest_port        500
        option proto            udp
        option target           ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  00:11:22:33:44:66
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp

It is default configuration, if wan port is connected to "internet" it is nat-ed for lan ports.

Sorry, I don't quite understand. Are you suggesting that I change a setting? If so, could you specify which one?

What is the output of

ifstatus wan

I left everything connected overnight, and to my surprise when I woke up I had an internet connection! Here is the output of ifstatus wan with the internet connection (with the IPs censored):

root@OpenWrt:~# ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 52888,
        "l3_device": "eth0.2",
        "proto": "dhcp",
        "device": "eth0.2",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "159.XXX.XXX.XXX",
                        "mask": 22
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "159.XXX.XXX.XXX",
                        "source": "159.XXX.XXX.XXX/32"
                }
        ],
        "dns-server": [
                "202.XXX.XXX.XXX",
                "202.XXX.XXX.XXX"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "dhcpserver": "159.XXX.XXX.XXX",
                "hostname": "openwrt",
                "leasetime": 1800
        }
}

However, the internet is unusually slow and sluggish to respond (my plan is 25Mbps download speed). I checked on speedtest and saw my download rate was a consistent third of my previous speed, 8Mbps. On OpenWRT I went to Interfaces > Switch and saw that my WAN port was detecting the plugged in ethernet cable as 10Mbps half-duplex instead of 1000Mbps. This explains the speed (losing 2Mbps could be explained by overhead?) but not the inability to connect initially.


Now, it's possible that the ethernet cable I had to the router had become damaged at the exact moment I upgraded OpenWRT, so I switched it out for one of my LAN cables which in the switch menu was registering as 1000Mbps. But when connected to the WAN port, it too is only detected as 10Mbps.
So, the possibility now is that the WAN port is damaged, or my modem. I plugged my modem directly into my computer, and it too was registering it as 10Mbps.

In summary:

  • Three days ago on OpenWRT 23.5.0, I was receiving full 25Mbps download speeds on my internet connection.
  • After upgrading to 23.5.3, router is unable to connect to the internet. Testing the connection on other devices works fine after a delay (but only at 10Mbps).
  • Test various firmwares on the router, they too connect fine. Go back to OpenWRT, unable to connect again.
  • Called my ISP and they report there's no issues with their end, and the modem reports itself as healthy.
  • Left the OpenWRT on overnight, and it's now successfully connected, but at that same slower speed of 10Mbps.

The cables are tested. The router itself works fine for local network transfers at full speed. I don't think it's the modem, as the ISP has already confirmed that it reports itself as healthy.

I have done further testing.

I was using the ethernet port plugged in the wall, I tested bringing my computer over to the modem and plugging in directly there. Speedtest on that is 25Mbps, matching my internet plan.

Going back to the router, it has gone back to the state of not having an internet connection. ifstatus wan outputs the following:

root@OpenWrt:~# ifstatus wan
{
        "up": false,
        "pending": true,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "proto": "dhcp",
        "device": "eth0.2",
        "data": {
              
        }
}

Under Network > Switches, the WAN port now says it is 100Mbps full-duplex.

Restart wan from luci and check logread additions.

When I logged back in to try that, my internet was connected again. Nevertheless I tried restarting the wan and got the following:

Sun Aug 18 14:39:33 2024 daemon.notice netifd: wan (XXXX): udhcpc: received SIGTERM
Sun Aug 18 14:39:33 2024 daemon.notice netifd: wan (XXXX): udhcpc: unicasting a release of 159.XXX.XXX.XXX to 159.XXX.XXX.XXX
Sun Aug 18 14:39:33 2024 daemon.notice netifd: wan (XXXX): udhcpc: sending release
Sun Aug 18 14:39:33 2024 daemon.notice netifd: wan (XXXX): udhcpc: entering released state
Sun Aug 18 14:39:33 2024 daemon.notice netifd: wan (XXXX): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sun Aug 18 14:39:33 2024 daemon.notice netifd: Interface 'wan' is now down
Sun Aug 18 14:39:33 2024 daemon.notice netifd: Interface 'wan' is setting up now
Sun Aug 18 14:39:33 2024 daemon.warn miniupnpd[XXXX]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping
Sun Aug 18 14:39:34 2024 daemon.notice netifd: wan (XXXX): udhcpc: started, v1.36.1
Sun Aug 18 14:39:34 2024 daemon.notice netifd: wan (XXXX): udhcpc: broadcasting discover
Sun Aug 18 14:39:36 2024 user.notice https-dns-proxy: Starting service instances on_interface_trigger ✓✓
Sun Aug 18 14:39:37 2024 daemon.notice netifd: wan (XXXX): udhcpc: broadcasting discover
Sun Aug 18 14:39:37 2024 daemon.notice netifd: wan (XXXX): udhcpc: broadcasting select for 159.XXX.XXX.XXX, server 159.XXX.XXX.XXX
Sun Aug 18 14:39:37 2024 daemon.notice netifd: wan (XXXX): udhcpc: lease of 159.XXX.XXX.XXX obtained from 159.XXX.XXX.XXX, lease time 1800
Sun Aug 18 14:39:37 2024 daemon.notice netifd: Interface 'wan' is now up
Sun Aug 18 14:39:38 2024 user.notice firewall: Reloading firewall due to ifup of wan (eth0.2)
Sun Aug 18 14:39:40 2024 user.notice https-dns-proxy: Starting service instances on_interface_trigger ✓✓

But there is a difference between beofre when it was connected, I'm back to 25Mbps full internet speed on the router. So possibly the act of disconnecting from the wall and using the individual computer connected to speedtest cause the speed issue to go away?

One thing that's persistent though, is when the router is first connected to the modem, it takes hours to actually get a public IP address. Not the preferable outcome, and it's caused me to make this thread before I knew what was going on, but I can live with it.

I'd look for bent pins or debris on the 4 connectors (i.e. both ends of the cable and the jacks on both ends, too). You may also benefit from changing the cable out with a known good one -- just to eliminate that as a potential culprit (it's possible you have a marginal cable that is intermittently making contact or where one or more of the conductors has relatively high resistance).

Hardware issues with the router are also possible, although not quite as likely as issues with a cable or the jacks.

1 Like

cable works for gigabit only with all conductors intact and falls to 100Mbps if any is damaged using undamaged 4 conductors.
Follow the logs again when you see internet down.

1 Like