[RFC PATCH v2 0/1] Introduce UCI support for configuring DSA VLAN filter rules
Adrian Schmutzler
mail at adrianschmutzler.de
Sun Aug 16 10:14:26 EDT 2020
Hi,
> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Jo-Philipp Wich
> Sent: Dienstag, 7. Juli 2020 22:11
> To: openwrt-devel at lists.openwrt.org
> Cc: Jo-Philipp Wich <jo at mein.io>
> Subject: [RFC PATCH v2 0/1] Introduce UCI support for configuring DSA VLAN
> filter rules
>
> This patch series introduces a new package "dsaconfig" which provides the
> necessary logic to allow configuration of bridge vlan filter rules for DSA
> switches.
>
> While well supported DSA switches can be programmed by solely bridging
> per-port netdevices together, explicit bridge VLAN filter rules are needed for
> more complex scenarios or for DSA switches that do not support a tagging
> protocol.
>
> The UCI configuration interpreted by the dsaconfig package closely follows
> the structure and semantics of the legacy swconfig architecture, honouring
> "dsa", "dsa_vlan" and "dsa_port" sections within the /etc/config/network
> file. The only difference compared to swconfig is that "dsa" sections are
> optional and that the syntax of ports within the "dsa_vlan" section differs,
> instead of <portnumber><tag>?, e.g.
> "0t", "1u" or "2", it is now <portname>(.<tag>)?, e.g. "wan.u", "lan1.t"
> or "lan2".
>
> The dsaconfig package will spawn a bridge device named "switchN" for each
> DSA switch, where N denotes the number of the switch. In contrast to
> swconfig, interfaces do not use the CPU port to target VLAN port groups on
> the switch but reference a VLAN on top of the switch, e.g.
> "option ifname switch0.1" to use the VLAN 1 port group on the first DSA
> switch.
>
> A complete configuration example for a simple LAN/WAN setup might look
> like below. Note that this configuration should be equivalent to just bridging
> lan1..lan4 without any VLAN filter rules.
>
> -- 8< --
> config dsa_vlan
> option vlan 1
> option ports 'lan1 lan2 lan3 lan4'
>
> config dsa_vlan
> option vlan 2
> option ports 'wan'
>
> config interface lan
> option ifname switch0.1
> option proto static
> option ipaddr 192.168.1.1/24
>
> config interface wan
> option ifname switch0.2
> option proto dhcp
Looking at this from yet another angle, with the new "port names" we got ourselves an ambiguous "wan":
We may have a "port" labelled "wan" and use the same name for the "interface" wan in uci config.
While this most probably will work for a basic implementation, I'm starting to wonder whether there will be cases where "wan", e.g. used as an ifname, wouldn't be uniquely assignable to one of the two cases (apart from the general confusion for the unaware user)?
Best
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200816/65a43536/attachment-0001.sig>
More information about the openwrt-devel
mailing list