Request for testing LuCI on DSA devices

But I'm not overriding any VLAN settings, I'm just pressing edit then save and LuCI wants to add configuration changes to network config.

Kia Ora,

Just rolled a 21.02 today for WRT190ACS. Everything is default for the model except I added the advanced reboot pkg

Using LuCI I have created a second interface assigned to lan2 (tamariki), which works fine. However when I try to bridge the wlan0 (kids wifi) connection to lan2 the lan2 interface gets disabled - port light in router goes out. wlan0 works fine.

Looking at /etc/config/network & ./wireless all looks OK however when I run "brctl show" lan2 is absent from the bridge br-tamariki

root@OpenWrt:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.<hidden>           no              lan3
                                                        lan1
br-tamariki             7fff.<hidden>        no              wlan0

If I bridge wlan0 to br-lan, then all interfaces appear

root@OpenWrt:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.<hidden>           no              wlan0
                                                        lan3
                                                        lan1

How do I get br-tamariki to bridge lan2 and wlan0? I cannot seem to see a config file for this.

Here is my ./network

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

config globals 'globals'
        option ula_prefix 'fddb:782a:c615::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ifname 'lan1 lan3'

config interface 'wan'
        option proto 'dhcp'
        option ifname 'wan.10'

config device 'wan_wan_dev'
        option name 'wan'
        option macaddr '<hidden>'

config interface 'wan6'
        option proto 'dhcpv6'
        option auto '0'
        option ifname 'wan.10'
        option reqaddress 'none'
        option reqprefix 'auto'

config interface 'tamariki'
        option proto 'static'
        option ifname 'lan2'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'

and here is my ./wireless (just in case :man_shrugging: ) where wlan0 is bridged lan2

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
        option htmode 'VHT80'
        option country 'AU'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option macaddr '<hidden>'
        option ssid 'Bunny_Tamariki'
        option encryption 'psk2+ccmp'
        option key '***'
        option wpa_disable_eapol_key_retries '1'
        option network 'tamariki'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
        option htmode 'HT20'
        option disabled '1'
        option country 'AU'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option macaddr '<hidden>'

Apologies in advance as this may be slightly off topic; sound like a rant; and not offer any solution.

Any recommendations on where to from here would be greatly appreciated.

I have tried looking to in way to create the bridge between lan and wlan in the hopes of advising what was done to possibly enable a solution that could be baked in to LuCI to help others.

I have tried using brctl however I just cannot get it to work - as soon as a bridge is created to wlan outside of br-lan, the lan ports become disabled.

In my searches what I am finding is that there are (too?) many possible paths to travel to try to resolve the issue. There are so many different packages that may be able to offer a solution but none that explicitly say, "hey I work with bridging lan to wlan using DSA" (I could be searching for the wrong thing admittedly).

Again, recommendations are welcome!

Does the link to the example I posted above not get the job done. Not clear to me if the LuCI interface is doing that or not, I have not tested.

apologies I missed this - not clear how the wlan is bridged to lan but will give it a go and report back.

Right - this works but has to be done manually through the command line.
Looks like we are basically recreating swconfig to me in a way...?

Steps I took

  1. Using LuCI I removed bridge from br-lan
  2. from the cmd line I setup my lan and tamariki (kids) interfaces as per above link
    /etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd51:e760:d1b7::/48'

config device
        option type 'bridge'
        option name 'switch0'

config bridge-vlan
        option device 'switch0'
        option vlan '1'
        option ports 'lan1 lan3'

config bridge-vlan
        option device 'switch0'
        option vlan '2'
        option ports 'lan2'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ifname 'switch0.1'

config interface 'tamariki'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option ifname 'switch0.2'

config interface 'wan'
        option proto 'dhcp'
        option ifname 'wan.10'

config device 'wan_wan_dev'
        option name 'wan'
        option macaddr '**hidden**'

config interface 'wan6'
        option proto 'dhcpv6'
        option auto '0'
        option reqaddress 'none'
        option reqprefix 'auto'
        option ifname 'wan.10'

config device
        option name 'wan.10'
        option macaddr '**hidden**'
        option ipv6 '0'
  1. once config/network saved I had to go in to the interface, via LuCI and enable DCHP on tamariki (easier than cmd)
  2. using LuCI I created my wlan0 and associated that with interface tamariki
  3. using LuCI I setup my firewall rules for DHCP and DNS

NB: My ISP requires I connect the wan on VLAN.10 so using LuCI I just rename wan to wan.10

All is working. Thank you! :+1:

I believe part of my struggles was due to my understanding that with DSA each port is a separate device so I would not have to use a VLAN for each bridge... I could just bridge 'lan1 lan3' (which seems to work) then add wlan to that interface.

Now mentioned in the other thread was something about 'switch' going away? I don't understand. Will I need to redo my setup in the near future?

FYI - I am using kernel 5.4.110

1 Like

I have a WRT1200AC router v2 running a 21.02 configuration with no changes from the snapshot build. With Luci under Network - Interfaces there is only Interfaces - Global Network Settings. Missing is the Devices option entirely.

Hostname WRT1200AC
Model Linksys WRT1200AC
Architecture ARMv7 Processor rev 1 (v7l)
Firmware Version OpenWrt 21.02-SNAPSHOT r16015-beab1bf163 / LuCI openwrt-21.02 branch git-21.106.55967-06dd6b5

etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd71:4c07:ee12::/48'

config interface 'lan'
option type 'bridge'
option ifname 'lan1 lan2 lan3 lan4'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'

config interface 'wan'
option ifname 'wan'
option proto 'dhcp'

config device 'wan_wan_dev'
option name 'wan'
option macaddr 'masked out'

config interface 'wan6'
option ifname 'wan'
option proto 'dhcpv6'

Nework is created from the build. I initialize during the build so it should be a clean install.

Thanks

IIRC old swconfig had a page for link speed of each physical ports of the switch. can it be revived? or it's already there and just I missed it?

it would be nice to see this info in the status page
just to let you know your cables are good & confirm connection speed
would be good if it included none switch ports as well
I have missed the wan on a few that had there own ethx port

I have DGS-1210-28 switch i have installed OpenWRT sysupgrade on it.
All ports (1-28) untagged with VLAN1 .
WAN cable plugged on port1 and switch takes IP from DHCP
PC LAN cable plugged on port3 but it is not taking any IP .
When i assigned IP manually to PC it only reachs switch IP
So what can be the problem? a bug may be?
thanks.

root@SW:/# bridge vlan

port              vlan-id  
lan1              1 PVID Egress Untagged
lan2              1 PVID Egress Untagged
lan3              1 PVID Egress Untagged
lan4              1 PVID Egress Untagged
lan5              1 PVID Egress Untagged
lan6              1 PVID Egress Untagged
lan7              1 PVID Egress Untagged
lan8              1 PVID Egress Untagged
lan9              1 PVID Egress Untagged
lan10             1 PVID Egress Untagged
lan11             1 PVID Egress Untagged
lan12             1 PVID Egress Untagged
lan13             1 PVID Egress Untagged
lan14             1 PVID Egress Untagged
lan15             1 PVID Egress Untagged
lan16             1 PVID Egress Untagged
lan17             1 PVID Egress Untagged
lan18             1 PVID Egress Untagged
lan19             1 PVID Egress Untagged
lan20             1 PVID Egress Untagged
lan21             1 PVID Egress Untagged
lan22             1 PVID Egress Untagged
lan23             1 PVID Egress Untagged
lan24             1 PVID Egress Untagged
lan25             1 PVID Egress Untagged
lan26             1 PVID Egress Untagged
lan27             1 PVID Egress Untagged
lan28             1 PVID Egress Untagged
switch            1

root@SW:~# cat /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd72:41ee:6d64::/48'
	option packet_steering '1'

config device 'switch'
	option name 'switch'
	option type 'bridge'
	list ifname 'lan1'
	list ifname 'lan10'
	list ifname 'lan11'
	list ifname 'lan12'
	list ifname 'lan13'
	list ifname 'lan14'
	list ifname 'lan15'
	list ifname 'lan16'
	list ifname 'lan17'
	list ifname 'lan18'
	list ifname 'lan19'
	list ifname 'lan2'
	list ifname 'lan20'
	list ifname 'lan21'
	list ifname 'lan22'
	list ifname 'lan23'
	list ifname 'lan24'
	list ifname 'lan25'
	list ifname 'lan26'
	list ifname 'lan27'
	list ifname 'lan28'
	list ifname 'lan3'
	list ifname 'lan4'
	list ifname 'lan5'
	list ifname 'lan6'
	list ifname 'lan7'
	list ifname 'lan8'
	list ifname 'lan9'

config bridge-vlan 'wan_vlan'
	option device 'switch'
	option vlan '1'
	option ports ' lan1 lan10 lan11 lan12 lan13 lan14 lan15 lan16 lan17 lan18 lan19 lan2 lan20 lan21 lan22 lan23 lan24 lan25 lan26 lan27 lan28 lan3 lan4 lan5 lan6 lan7 lan8 lan9'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'switch.1'

U-Boot Dumps

Board: RTL838x CPU:500MHz LXB:200MHz MEM:300MHz
DRAM:  128 MB
SPI-F: 1x32 MB
Loading 1024B env. variables from offset 0x80000
Board Model = DGS-1210-28-F1 Cameo_bdinfo_get_BoardID [293] 
Switch Model: RTL8382M_8218B_INTPHY_8218B_8214FC_DEMO (Port Count: 28)
Switch Chip: RTL8382

This is what I... don't... see as well. Just "Interfaces" and "Global network options".

I believe this commit has only been applied to master - not sure of the plan (or the benefit) to include in 21.0x...?

I've finally found a moment to test DSA on my own. I find some LuCI details unclear or confusing.

  1. "Bridge interfaces" and selecting interfaces
    When editing interface that has "Bridge interfaces" checked, the label that follows, says "Bridge ports". It's clear and also matches what I see when adding device of type bridge. All good. See:


    When adding interface with "Bridge interfaces" checked however, then same label says "Interface", see:

  2. Managing devices
    When adding a new device I can change any option (Device type, Base device, VLAN ID, Device name), see:


    When editing it however I can't change any of above. All options are greyed out:

    Finally clicking the "Reset" button results in greying out a given device without a way to fully remove it:

    After saving changes such a device disappears however.

  3. Custom bridge ports
    It's possible to add custom bridge port that doesn't exist. In case of typos (e.g. using uppercase name) it may result in hard to debug issues. What's probably worse LuCI thinks that LAN6.90 is actual software VLAN interface even if it won't ever be created.


    Could/should some validation be added there? Or maybe custom interfaces should be disallowed?

Finally I may also need some help on bridges and VLANs.

  1. Bridge of selected switch ports
    I want some switch ports assigned to different network. Should I add a new interface like:


    Or should it be a new device like:

    What's the difference?

  2. Tagged VLAN traffic on selected port
    Should that be done by using a custom port name like lan.nn, see:


    Or should "Bridge VLAN filtering" be used for that, see:

    What's the difference?

Is there a config / condition that will cause the Bridge VLAN filtering tab to not show. With the same build running on two different mvebu targets, it displays on one but not the other.

Did your green buttons work (todays master snapshot) when doing this? The Save and create interface buttons?
Every time I pushed on a green button half of a “turning save circle” was squished between the green button and the Dismiss button.
But nothing happened and the only way to close the menu window was to push the dismiss button.
I got tired and didn’t thought it actually did anything and luci showed no blue “changes waiting” at the top of the GUI.
But when I then tried to log out, then it suddenly asked if I wanted to save all 51 changes?

WRT3200ACM and Win10 Pro with Firefox web browser.

No. If you take a look at the commit eeef38d53412 ("luci-mod-network: add support for bridge vlan filtering") you'll see that following line is not conditional:

s.tab('bridgevlan', _('Bridge VLAN filtering'));

Your LuCI must be outdated on one device.

Saving works for me fine.

1 Like

Ok, probably some strange thing with yesterdays snapshot then.

Both will work, the latter is preferred though since it'll be more explicit. After adding your "office" bridge device you'll also need a new interface (unbridged) using "office" as physical device.

The latter.

That is because the type of devices can not be changed after they've been created by netifd, that would confuse the runtime state and result in undefined behavior (imagine e.g. changing the type of lan2.13 from 802.1q vlan to bridge or macvlan, it'll most likely just fail, leaving the network in an inconsistent state.)

This is because conceptionially, you're just removing the configuration for these netdevs, but they're still existing in the system and in use by netifd.

This is because the VLAN netdev got destroyed by netifd upon applying the configuration. Other devices such as lan1, lan2 are fixed though and will always exist in the system, even if unused/unreferenced.

This is allowed by netifd and actually needed to be able to create configurations where certain bridge ports only appear later (think of e.g. tap devices, gretap tunnels etc.)

1 Like