LAN ports not active and interface missing after upgrade to DSA

I was previously using OpenWRT 21 on my router which was using swconfig. Because my model is apparently doing some unusual non-standard stuff, configuring VLANs always deactivates the WAN port. As I have upgraded my setup with a VLAN-capable switch I would like to use it.

I stumbled upon this thread: Wan offline with VLAN added - #12 by slh

So I build OpenWRT myself from https://github.com/openwrt/openwrt/pull/4721 as my model (GL.iNet GL-B2200) seems to already be supported by this patch.

I then applied the squashfs-sysupgrade. Now, only WLAN is working:

root@router:/etc/config# ip link | egrep '^[0-9]'
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-lan state UP qlen 1000
3: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
4: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
5: wan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
9: WLAN-smart: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
10: WLAN-home: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000

There is also the eth1 interface missing which previously existed:

root@router:/etc/config# ifconfig
WLAN-home Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:47  
          inet6 addr: fe80::9683:c4ff:fe0e:a47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9877 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7595 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:916298 (894.8 KiB)  TX bytes:980811 (957.8 KiB)

WLAN-smart Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          inet addr:10.8.9.1  Bcast:10.8.9.255  Mask:255.255.255.0
          inet6 addr: fe80::9683:c4ff:fe0e:a46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1269 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1195 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:271499 (265.1 KiB)  TX bytes:290442 (283.6 KiB)

br-lan    Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          inet addr:10.8.8.1  Bcast:10.8.8.255  Mask:255.255.255.0
          inet6 addr: fd8a:96f2:7bc8::1/60 Scope:Global
          inet6 addr: fe80::9683:c4ff:fe0e:a46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9876 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7483 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:777800 (759.5 KiB)  TX bytes:824346 (805.0 KiB)

eth0      Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:110 (110.0 B)  TX bytes:26019 (25.4 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:696 errors:0 dropped:0 overruns:0 frame:0
          TX packets:696 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:54288 (53.0 KiB)  TX bytes:54288 (53.0 KiB)

I am only able to access the router via SSH by tethering the WLAN from my phone to my PC. The web-interface appears to be offline (probably because it is bound to the eth0 interface which is down).

I am afraid to reset the router in this state as I fear that a reset could disable WLAN completely and lock me out.

What are my options and can I fix the switch config or whatever is wrong here?

What does brctl show say? You probably do not have the devices added to the bridge, since the ip output shows that the underlying devices are not UP.

You can do this in LuCI by going to network -> interfaces -> devices -> br-lan -> configure and making sure the bridge ports are set to include lan1 and lan2.

root@router:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.9483c40e0a46	no		eth0
							WLAN-home

At the moment, I can only access my router via SSH

eth0 should not be in the bridge, but lan1/lan2 should be.

You said WLAN was working, can you access LuCI there?

Anyway you just need to edit /etc/config/network to add the definition of the bridge. See https://openwrt.org/docs/guide-user/network/dsa/converting-to-dsa

1 Like

I tried, but it does not work.

Thank you so much, I'm gonna share whether it worked later.

I was able to make my PC connect to my router again, thanks for your help. I actually rebuilt the OS again because I forgot to include the LuCI module, so this now works, too. When upgrading I also reset the router because this gave me the hope that I may not lock myself out and it worked.

Now a new problem exists: When I connect to either the default OpenWRT WiFi or one that I configured, it does not bind to the interface and when I connect to it I don't get an IP (my phone disconnects after that).

Edit:
I created a new interface for the WiFi and then my router seems to correctly assign an IP and everything, but my phone doesn't seem to get that and disconnects.


The WiFi device does also not seem to bind to the LAN interface

ifconfig
root@router:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          inet addr:10.8.8.1  Bcast:10.8.8.255  Mask:255.255.255.0
          inet6 addr: fe80::9683:c4ff:fe0e:a46/64 Scope:Link
          inet6 addr: fd78:1d4d:6c4f::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12675 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10305 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1461555 (1.3 MiB)  TX bytes:4782382 (4.5 MiB)

eth0      Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          inet6 addr: fe80::9683:c4ff:fe0e:a46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:50134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29566 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9102954 (8.6 MiB)  TX bytes:11640447 (11.1 MiB)

lan1      Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23620 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20714 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2878796 (2.7 MiB)  TX bytes:10282687 (9.8 MiB)

lan2      Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1321 errors:0 dropped:0 overruns:0 frame:0
          TX packets:529 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:60766 (59.3 KiB)  TX bytes:61682 (60.2 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:2989 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2989 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:276308 (269.8 KiB)  TX bytes:276308 (269.8 KiB)

wan       Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:46  
          inet addr:134.XXX.XXX.XXX  Bcast:134.XXX.XXX.XXX  Mask:255.255.255.128
          inet6 addr: fe80::9683:c4ff:fe0e:a46/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25193 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8316 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5461516 (5.2 MiB)  TX bytes:1294560 (1.2 MiB)

wlan-home Link encap:Ethernet  HWaddr 94:83:C4:0E:0A:47  
          inet6 addr: fe80::9683:c4ff:fe0e:a47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:61 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:11104 (10.8 KiB)  TX bytes:13370 (13.0 KiB)

What do you get from brctl show at the command line? And/or bridge vlan?

I don't use WiFi on OpenWRT so I don't know personally. But it's covered by the documentation and lots of people use this config obviously.

Sorry for being late on this, I'm on my phone now.
Just before going offline the problem magically fixed itself, probably because the interfaces restarted. Thank you very much for your time ^^

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.