Network Unreachable after upgrade (Raspberry Pi 4B 21.02.2 to 23.05.5)

I recently upgraded from 21.02.2 to 23.05.5 on a Raspberry Pi 4B.
It was working fine prior, but since the upgrade, I am unable to ping outside the network, my subnets and internal routing seem to work just fine.

I have a suspicion something is wrong with the routing, but can't seem to fix it.
I have tried

  • Full factory flashing - still nothing with default settings
  • Restoring configs
  • Copying /etc/config/network from the raspberry pi setup, seems to break more things, and had to restore configs

Additionally, Luci is not working, I can ssh into the router @ 192.168.1.1 but not access the web interface.
This router is the main one, and thus I am without internet. :frowning:

There is a Virgin Media Hub 5 in modem mode between the pi and the wall, but no setup was required before hand to set that up.

root@OpenWrt:/etc/config# cat 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 'fd7f:f869:2942::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	option promisc '1'
	option acceptlocal '1'
	list ports 'eth0.18'
	list ports 'eth1'

config interface 'Trusted'
	option device 'eth0.42'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.42.1'
	option type 'bridge'
	list dns '1.1.1.1'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '1'
	option name 'eth0.1'

config interface 'wan'
	option proto 'dhcp'
	option type 'bridge'
	option device 'eth1'

config interface 'Management'
	option proto 'static'
	option device 'eth0.1'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option type 'bridge'
	list dns '1.1.1.1'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '18'
	option name 'eth0.18'
	option promisc '1'

config interface 'Servers'
	option proto 'static'
	option device 'eth0.18'
	option ipaddr '192.168.18.1'
	option netmask '255.255.255.0'
	option type 'bridge'

config interface 'IOT'
	option proto 'static'
	option device 'eth0.421'
	list ipaddr '192.168.142.1/24'
	option type 'bridge'

config device
	option name 'eth0.42'
	option type '8021q'
	option ifname 'eth0'
	option vid '42'

config device
	option name 'Wireguard'

config device
	option name 'eth0'


root@OpenWrt:/etc/config# cat dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	option confdir '/tmp/dnsmasq.d'
	option rebind_protection '0'
	list server '192.168.18.128'

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'

config dhcp 'Trusted'
	option interface 'Trusted'
	option limit '150'
	option leasetime '12h'
	option start '10'
	list ra_flags 'none'

config dhcp 'Management'
	option interface 'Management'
	option start '100'
	option limit '150'
	option leasetime '12h'
	list ra_flags 'none'

config dhcp 'Servers'
	option interface 'Servers'
	option limit '150'
	option leasetime '12h'
	option start '10'
	list ra_flags 'none'

config dhcp 'IOT'
	option interface 'IOT'
	option limit '150'
	option leasetime '12h'
	option start '10'
	option force '1'
	list ra_flags 'none'


root@OpenWrt:/etc/config# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0.1
192.168.18.0    *               255.255.255.0   U     0      0        0 eth0.18
192.168.42.0    *               255.255.255.0   U     0      0        0 eth0.42
192.168.142.0   *               255.255.255.0   U     0      0        0 eth0.421
root@OpenWrt:/etc/config# ifconfig 
eth0      Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3775 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2575 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:644418 (629.3 KiB)  TX bytes:527040 (514.6 KiB)

eth0.1    Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1308 (1.2 KiB)

eth0.18   Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.18.1  Bcast:192.168.18.255  Mask:255.255.255.0
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:1883 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1520 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:130013 (126.9 KiB)  TX bytes:389566 (380.4 KiB)

eth0.42   Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.42.1  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1138 errors:0 dropped:21 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:84918 (82.9 KiB)  TX bytes:119068 (116.2 KiB)

eth0.421  Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.142.1  Bcast:192.168.142.255  Mask:255.255.255.0
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:966 (966.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5328 (5.2 KiB)  TX bytes:5328 (5.2 KiB)

root@OpenWrt:/etc/config# ubus call system board
{
	"kernel": "5.15.167",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 3",
	"model": "Raspberry Pi 4 Model B Rev 1.1",
	"board_name": "raspberrypi,4-model-b",
	"rootfs_type": "ext4",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.5",
		"revision": "r24106-10cc5fcd00",
		"target": "bcm27xx/bcm2711",
		"description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
	}
}
root@OpenWrt:/etc/config# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
ping: sendto: Network unreachable
root@OpenWrt:/etc/config# ping downloads.openwrt.org
ping: bad address 'downloads.openwrt.org'

I don't have time for a thorough review now, but:

  • eth1 seems to be missing, are you sure the required kmod is installed?
  • not sure if it's down to your redacting, but the last two device stanzas (Wireguard and eth0) seem to be orphaned
  • I don't even want to check if the 8021q stanzas match up to your VLAN definitions
  • the VLAN definitions themselves seem 'weird', the name matters rather little, but ifname (depreacted) and vid seem wrong
  • are you sure about bridging eth1 and eth0.18?
  • you are using a quite wild mix of different ways to enumerate ports/ VLANs
  • these likely aren't the only issues, just the ones that really jump out

I haven't even checked dhcp/ firewall settings, as my hunch of a missing kmod and a severely problematic /etc/config/network already point at enough potential causes. I would strongly suggest to start the configuration all over again, piece by piece and to check/ review each new interface/ VLAN before adding the others one by one.

Thanks for the response,
I agree it’s quite a weird setup I made for the vlans, blame me 4 years ago when I was beginning this journey.
I have tried already to entirely flash the drive with a new install, that still resulted in the network unreachable errors.
Unless of cause I missed some setup.

WireGuard is orphaned due to my redacting but I did not touch eth0 information… I’ll follow up on that.

Additionally if I’m missing a kmod, how I am to install it without network access?

Identify what kmod you need, download it (and its dependencies), scp -O kmod*.ipk root@192.168.1.1:/tmp/ it over, opkg install /tmp/kmod*.ipk it - or use the (online-)imagebuilder to generate a new image including the necessary packages.

So, I've done a fresh install with 23.05.5, and added

    RTL8153: kmod-usb-net-rtl8152
    AX8817: kmod-usb-net-asix-ax88179

to the online image builder as mentioned here.
I synced the time with my browser through Luci.
But still network unreachable.

root@OpenWrt:/etc/config# cat 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 'fd8e:33f2:123c::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

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'

root@OpenWrt:/etc/config# ifconfig 
br-lan    Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd8e:33f2:123c::1/60 Scope:Global
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3477 errors:0 dropped:87 overruns:0 frame:0
          TX packets:1821 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:472342 (461.2 KiB)  TX bytes:865870 (845.5 KiB)

eth0      Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3480 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2058 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:527110 (514.7 KiB)  TX bytes:881512 (860.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:468 errors:0 dropped:0 overruns:0 frame:0
          TX packets:468 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:35984 (35.1 KiB)  TX bytes:35984 (35.1 KiB)


There's still no eth1 in your network config.
If you still have got the config files from the 21.02 installation, you could check what's missing...

image

I added it with the Luci config

root@OpenWrt:/etc/config# ifconfig 
br-lan    Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::dea6:32ff:fe3e:3c1f/64 Scope:Link
          inet6 addr: fd8e:33f2:123c::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6243 (6.0 KiB)  TX bytes:6914 (6.7 KiB)

eth0      Link encap:Ethernet  HWaddr DC:A6:32:3E:3C:1F  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7111 (6.9 KiB)  TX bytes:6914 (6.7 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3120 (3.0 KiB)  TX bytes:3120 (3.0 KiB)

root@OpenWrt:/etc/config# cat 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 'fd8e:33f2:123c::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

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 device
	option name 'eth1'

So, you're half way done.

So, you're half way done.

The suspense, I would love to know the other half.

Now you can configure your WAN in 'Interfaces'.

config interface 'wan'
	option proto 'dhcp'
	option device 'eth1'

This is how I've got it configured.

You should receive an IPv4 address from your upstream device.
Edit: And maybe even an IPv6 address.

Don't forget to put your WAN in WAN firewall zone.

So I’ve been waiting for an ip address to be assigned to eth1.
I’ve even reset the modem, and configured back into a routing mode. Connecting a device directly to that works just fine, gets an ip and connects to the wan.
However, the OpenWrt router still doesn’t, and cannot even ping the known working ip of the upstream modem/router.

run logread -f in cli, unplug and reconnect the wan ethernet cable, post the output.

The upstream modem isn't doing MAC caching, by any chance?

Sat Feb  1 12:54:17 2025 daemon.notice netifd: Network device 'eth1' link is down
Sat Feb  1 12:54:17 2025 daemon.notice netifd: Interface 'wan' has link connectivity loss
Sat Feb  1 12:54:17 2025 kern.info kernel: [ 1397.604435] br-lan: port 2(eth1) entered disabled state
Sat Feb  1 12:54:17 2025 daemon.notice netifd: wan (3968): udhcpc: received SIGTERM
Sat Feb  1 12:54:17 2025 kern.info kernel: [ 1397.628983] r8152 2-1:1.0 eth1: carrier off
Sat Feb  1 12:54:17 2025 daemon.notice netifd: wan (3968): udhcpc: entering released state
Sat Feb  1 12:54:17 2025 daemon.notice netifd: wan (3968): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sat Feb  1 12:54:17 2025 daemon.notice netifd: Interface 'wan' is now down
Sat Feb  1 12:54:18 2025 daemon.warn odhcpd[988]: No default route present, overriding ra_lifetime!
Sat Feb  1 12:54:19 2025 kern.notice kernel: [ 1400.134635] r8152 2-1:1.0 eth1: Promiscuous mode enabled
Sat Feb  1 12:54:19 2025 kern.info kernel: [ 1400.143713] r8152 2-1:1.0 eth1: carrier on
Sat Feb  1 12:54:19 2025 daemon.notice netifd: Network device 'eth1' link is up
Sat Feb  1 12:54:19 2025 daemon.notice netifd: Interface 'wan' has link connectivity
Sat Feb  1 12:54:19 2025 daemon.notice netifd: Interface 'wan' is setting up now
Sat Feb  1 12:54:19 2025 kern.info kernel: [ 1400.151868] br-lan: port 2(eth1) entered blocking state
Sat Feb  1 12:54:19 2025 kern.info kernel: [ 1400.151883] br-lan: port 2(eth1) entered forwarding state
Sat Feb  1 12:54:19 2025 daemon.notice netifd: wan (4129): udhcpc: started, v1.36.1
Sat Feb  1 12:54:19 2025 daemon.notice netifd: wan (4129): udhcpc: broadcasting discover
Sat Feb  1 12:54:23 2025 daemon.notice netifd: wan (4129): udhcpc: broadcasting discover
Sat Feb  1 12:54:26 2025 daemon.notice netifd: wan (4129): udhcpc: broadcasting discover

I don't know if it is doing MAC caching, I'll check now

Rather than giving a fish teach him to fish!
what is the modem gateway address?
ip=...

dns address 1.1.1.1 and 1.0.0.1
Good luck!

You probably can't check it, but Openwrt appears to be doing what's it's supposed to - asking for an IP.

Start by rebooting the modem.

Rebooting now,
In the modem's dhcp records, I can see that the openwrt router appears to be assigned an ip,
Also, the log, continually is warning about,

No default route present, overriding ra_lifetime!

Not sure if that is relevant.

Does the MAC attached to the IP match the one belonging to the WAN ethernet dongle?

Yes, it does.
I see the same HWaddr between ifconfig and the modem's records