While trying to get some funky switch configuration working involving creating a bridge across two (or more) vlans I encountered this bug on the latest wndr3700 image:
I have manually adjusted the /lib/network/switch.sh file with the information listed in that ticket and that has solved the issue.
Maybe it is an idea to get the solution as listed in that ticket included into the wndr3700 build. Because the support of fid in vlan configurations is model/hardware depended it can not be included as a standard OpenWRT fix currently
just to be clear here is the diff between the standard version and my adjusted version
@@ -1,5 +1,7 @@
# Copyright (C) 2009 OpenWrt.org
+# added extra function based on https://dev.openwrt.org/ticket/8701
@@ -7,9 +9,25 @@
[ -d "/sys/class/net/$name" ] && ifconfig "$name" up
swconfig dev "$name" load network
+ config_foreach fid_switch_vlan switch_vlan
config_foreach setup_switch_dev switch
+# newly added KD
+ local fid vlan
+ config_get fid "$1" fid
+ config_get vlan "$1" vlan
+ config_get device "$1" device
+ if [[ -n "$fid" ]]; then
+ swconfig dev $device vlan $vlan set fid $fid
and then I manually added the following lines to the relevant /etc/config/network sections
option device 'switch0'
option fid '2'
option vlan '2'
option ports '1 5t'
so here the FID is set to 2 for this vlan. Ideally you also make it possible to set the FID via the Luci interface for the switch when changing the switch configuration but I'm not capable of doing that :-)
Without this change to the way the switch is setup it is not possible to setup a bridged interface that is bridging two or more vlans. The reason why I wanted that is so that I can very easily capture all traffic going to a specific host connected to a port using tcpdump for debugging purposes. So now I can hookup a host to port 3 (as listed on the wndr3700 it self) and than it is considered as part of the LAN (so br-lan) and then run tcpdump -i eth0.2 to capture all trafic to that device only.
You could possibly also do that with filters on MAC or IP .. but this is a generic solution and can work with any host now.
I understood that using this setup makes the network throughput a bit slower .. but that does not matter to me now.