/config/network is not processed properly when using pvid, also swconfig misconfigures vlan/pvid port assignment
|Reported by:||hvandrie||Owned by:||juhosg|
|Component:||base system||Version:||Backfire 10.03|
|Keywords:||config/network, vlan, pvid||Cc:|
Description (last modified by jow)
Whenever you want to do port based vlan, this is a pain in the @ss with openwrt! Network config file is not parsed properly and messes up configuration, and swconfig does not set (un)tagging properly on ports.
Example, only way to set a vlan to an pvid on a port using /etc/config/network config file is to use:
option 'device' 'rtl8366rb'
option 'vlan' '4'
option 'pvid' '4'
option 'ports' '0t 1 5t'
However, the above desired configuration is interpreted differently by the system:
VLAN 2: info: VLAN 2: Ports: 1 vid prio member untag fid MC: 4 0 0x0023 0x001f 0 4K: 4 0x0023 0x001f 0 ports: 0 1 5t VLAN 4: info: VLAN 4: Ports: vid prio member untag fid MC: 0 0 0x0023 0x0002 0 4K: 0 0x0025 0x0000 0 ports: 0t 1 5t
VLAN 2 gets the pvid set, but incorrect tagging is set on ports!
VLAN 4 gets the ports set, however the pvid is not set!
swconfig is not able to remove ports properly from the VLAN's, causing individual ports to be assigned to multiple pvid's or tagging is set incorrectly.
Correct operation would be that following /config/network settings would be configured during startup:
config 'switch_vlan' option 'device' 'rtl8366rb' option 'vlan' '2' option 'pvid' '4' option 'ports' '0t 1 5t'
Where VLAN 2 is assigned to ports '0t 1 5t' with pvid '4'.
Change History (9)
comment:2 Changed 6 years ago by jow
- Description modified (diff)
- Owner changed from developers to nbd
- Status changed from new to assigned