Given the fact that current "How to use DSA on OpenWRT"-documentation is a little bit sparse, and information in the wiki is mostly a compilation of (incomplete) LUCI screen shots
I have the need to ask myself, too.
I have a DGS-1210 running with a recent snapshot build and so far my current network config works.
Note:
-
lan1
is my psuedo out-of-band IPv6 LLA-Only interface -
lan8
is used as an uplink trunk-port to another OpenWRT router
# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'
config device
option name 'switch'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
list ports 'lan6'
list ports 'lan7'
list ports 'lan8'
list ports 'lan9'
list ports 'lan10'
option macaddr '08:5a:11:a2:7f:10'
##############################################################################
config bridge-vlan
option device 'switch'
option vlan '1'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'lan4:u*'
list ports 'lan5:u*'
list ports 'lan6:u*'
list ports 'lan7:u*'
config bridge-vlan
option device 'switch'
option vlan '16'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '17'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '64'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '65'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '66'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '67'
list ports 'lan8:t'
config bridge-vlan
option device 'switch'
option vlan '4094'
list ports 'lan1:u*'
##############################################################################
config interface 'vlan1'
option device 'switch.1'
option proto 'none'
config interface 'vlan16'
option device 'switch.16'
option proto 'dhcp'
config interface 'vlan16_v6'
option device 'switch.16'
option proto 'dhcpv6'
config interface 'vlan17'
option device 'switch.17'
option proto 'none'
config interface 'vlan64'
option device 'switch.64'
option proto 'none'
config interface 'vlan65'
option device 'switch.65'
option proto 'none'
config interface 'vlan66'
option device 'switch.66'
option proto 'none'
config interface 'vlan67'
option device 'switch.67'
option proto 'none'
config interface 'vlan4094'
option device 'switch.4094'
option proto 'static'
option ip6class 'local'
option ip6assign '64'
# bridge vlan
port vlan-id
lan1 4094 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 16
17
64
65
66
67
switch 1
16
17
64
65
66
67
4094
My questions are:
-
list ports lan<n>:u*
sets a port as untagged and it sets the PVID explicit? Right?- When do I need this? Does this come from chips with limited VLAN support?
- Wouldn't just
list ports lan<n>
be enough?
-
How do I set up a hybrid-port?
list ports lan<n>:t
for tagged, andlist ports lan<n>:u*
for untagged; or just usinglist ports lan<n>
for untagged? -
See
bridge-vlan
forvlan 4094
: Do I need:u*
or not? As far as I know if you configure an access port to be part of a VLAN, then the PVID is implicit, except for some "broken" platforms and their software. I see no difference inbridge vlan
output when I either uselan1:u*
or justlan1
. -
Is my assumption correct that I just want a single vlan-aware bridge device? Why would I want to create multiple bridge interfaces out of the switch device?
(See https://openwrt.org/docs/guide-user/network/dsa/dsa-mini-tutorial#multiple_bridged_networks vs https://openwrt.org/docs/guide-user/network/dsa/dsa-mini-tutorial#multiple_networks_using_vlans & https://openwrt.org/docs/guide-user/network/dsa/dsa-mini-tutorial#multiple_networks_using_vlan_tagging) -
What is the reasoning that every now and then people using asymmetric VLAN-ID and PVID, like setting VLAN 3 but then PVID 15? In my option this just leads to unnecessary confusion.
-
It is not possible to combine
config bridge-vlan
with options fromconfig interface
, correct? Like:
config bridge-vlan
option device 'switch'
option vlan '16'
list ports 'lan8:t'
option proto 'dhcp'
Thanks for hints and tips...
PS: Do I really still need two interfaces to get DHCP and DHCPv6 on a single interface?