Request for testing LuCI on DSA devices

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

It is the same mvebu build that I have running. In playing around with DSA config possibilities I have just been editing by hand and there is something about this snippet:

/etc/config/network
###################################
config device
	option type 'bridge'
	option name 'switch0'

config bridge-vlan
	option device 'switch0'
	option vlan '10'
	option ports 'lan2:t lan3 lan4:*'
	option alias 'lan'

config interface 'lan'
	option ifname 'switch0.lan'
	option proto 'static'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	option igmp_snooping '1'
	option ip6assign '60'

which breaks the display of the tab mentioned. Looking at netifd it seems this should all be legitimate configuration.

root@mamba:/etc/config# bridge vlan
port              vlan-id  
lan4              10 PVID Egress Untagged
lan3              10 PVID Egress Untagged
lan2              10
switch0           10

Using Openwrt 19.07.7 I was able to separate the built in switch of my Linksys WRT3200ACM into two VLANs.

With upgrading to Openwrt 21.02.0-rc1 the switch configuration has changed to DSA und I can see four separate ports (lan1+lan2+lan3+lan4).

I created two bridged interfaces (LAN with ports lan3+lan4; LAN2 with ports lan1+lan2) as this screenshot shows:
openwrt1

Unfortunatly the following log messages appear during creation of interface LAN2 and the ports (lan1+lan2) stay unconnected:

mv88e6085 f1072004.mdio-mii:00: p3: hw VLAN 1 already used by port 0 in br-lan
mv88e6085 f1072004.mdio-mii:00 lan1: failed to initialize vlan filtering on this port
br-lan2: port 1(lan1) entered blocking state
br-lan2: port 1(lan1) entered disabled state
mv88e6085 f1072004.mdio-mii:00: p3: hw VLAN 1 already used by port 0 in br-lan
mv88e6085 f1072004.mdio-mii:00 lan1: failed to initialize vlan filtering on this port
mv88e6085 f1072004.mdio-mii:00 lan2: configuring for phy/gmii link mode
8021q: adding VLAN 0 to HW filter on device lan2
br-lan2: port 1(lan2) entered blocking state
br-lan2: port 1(lan2) entered disabled state

The command "brctl show" does not show any ports for interface LAN2:

$ brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan2         7fff.000000000000       no
br-lan          7fff.302303df1428       no              lan4
                                                        lan3

This is my /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 'fddd:92fc:e63b::/48'
config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.10.14'
        option netmask '255.255.0.0'
        option ip6assign '60'
        option gateway '192.168.10.10'
        option ifname 'lan3 lan4'
config device 'wan_wan_dev'
        option name 'wan'
        option macaddr '32:23:03:df:14:28'
config interface 'lan2'
        option proto 'static'
        option ipaddr '10.1.0.10'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ifname 'lan1 lan2'
        option delegate '0'

Obviously there is some additional VLAN configuration required. Formerly (with Openwrt 9.07.7) there was a switch/VLAN configuration page. But how/where could this be done for DSA in 21.02.0-rc1?

I read about a "Bridge VLAN filtering" tab in the GUI. But I cannot find such a tab in the GUI of my Linksys WRT3200ACM. I also tried with 21.02.SNAPSHOT, but still no such configuration tab in the GUI:
openwrt2

Any advice is highly appreciated.

Regards
Alex

1 Like

Read (follow the link) in the 6th post in this thread about pull 4307.

You first make a switch bridge and then make vlans as you wish, then connect the interfaces to those vlans and delete all other bridges.

I have tested this method on one of my WRT3200ACM with five VLAN and a TUN0 device the whole weekend and it runs just as with 19.07.7.

1 Like

Hi all,

I'm using a WRT32X (basically WRT3200ACM) and I've been trying 12+ hours to create VLAN IDs.... starting to lose the will to live... ha

I thought as my device is DSA supported and this is the way things are going I'd use 21.02.0-rc1 which I'm starting to feel was a mistake as I can't find any guides on it.

Ideally - all I need is just one trunk port - is this possible?

If anyone has any suggestions please let me know.

As mentioned I know there is nothing in LuCI for VLAN tagging currently. I'm happy to edit the network config file in nano!

Thanks all

I cannot build from master as I don't have a linux machine sadly, plus I really don't want to go through hours more work compiling builds in a VM of some kind :(.

See my above post and read and understand the whole “pull 4307” link, you can easily write the config your self.

1 Like

Thanks for this, but sadly when using the uci commands they do not make any changes to the config file found in /etc/config/network.

I guess I could edit it manually, I'll try that now...