Hi, Did the latest netjsonconfig Release Address the issue? Or was it about something else.
Cheers Marten BlueMail for Android herunterladen Am 10. Juli 2025, 16:44, um 16:44, Federico Capoano <[email protected]> schrieb: >I tried parsing the configuration file generated via UCI that you have >provided, but the library can't parse it, which is not a good sign. > >Can you share the UCI configuration in /etc/config/network? > >The Bridge VLAN fitlering implementation needs to be improved, I opened >an >issue for this: >https://github.com/openwisp/netjsonconfig/issues/356 >If you can share the UCI code I'll add it to the issue (or you can add >it >yourself there). > >In the meantime as a workaround, could you define the configuration you >need by supplying files? >It's a bit uncomfortable but it will help you get around this issue, >you >can also use variables freely in files which is nice. > >Best regards >*Federico Capoano* >OpenWISP OÜ >Kotkapoja tn 2a-10, 10615, Harju maakond, Tallinn, Estonia >VAT: EE101989729 >+372 59361689 >*openwisp.io* <http://openwisp.io> > > >On Thu, 10 Jul 2025 at 10:49, 'Marten Lucas' via OpenWISP < >[email protected]> wrote: > >> Hi, >> first of all great project. I am new to openwrt but still managed to >get >> openwisp running with several devices. But now I am struggeling with >a VLAN >> setup for a ZyXEL GS1900-8 >> v2 (with DSA). >> >> The switch is connected via a trunked port to the mainrouter which is >the >> dhcp server. >> The target config is this 4 VLANs with different ports that get the >IPs >> from the mainrouter. >> >> This is the template I created: >> >> { >> "interfaces": [ >> { >> "type": "bridge", >> "bridge_members": [ >> "lan1", >> "lan2", >> "lan3", >> "lan4", >> "lan5", >> "lan6", >> "lan7" >> ], >> "name": "br-lan", >> "vlan_filtering": [ >> { >> "vlan": 178, >> "ports": [ >> { >> "ifname": "lan1", >> "tagging": "t" >> }, >> { >> "ifname": "lan2", >> "tagging": "t" >> }, >> { >> "ifname": "lan3", >> "tagging": "t" >> }, >> { >> "ifname": "lan4", >> "tagging": "t" >> } >> ] >> }, >> { >> "vlan": 70, >> "ports": [ >> { >> "ifname": "lan1", >> "tagging": "t" >> }, >> { >> "ifname": "lan4", >> "tagging": "t" >> }, >> { >> "ifname": "lan6", >> "tagging": "u" >> } >> ] >> }, >> { >> "vlan": 80, >> "ports": [ >> { >> "ifname": "lan1", >> "tagging": "t" >> }, >> { >> "ifname": "lan4", >> "tagging": "t" >> }, >> { >> "ifname": "lan7", >> "tagging": "u" >> } >> ] >> }, >> { >> "vlan": 100, >> "ports": [ >> { >> "ifname": "lan1", >> "tagging": "u" >> }, >> { >> "ifname": "lan2", >> "tagging": "u" >> }, >> { >> "ifname": "lan3", >> "tagging": "u" >> }, >> { >> "ifname": "lan4", >> "tagging": "u" >> }, >> { >> "ifname": "lan5", >> "tagging": "u" >> } >> ] >> } >> ] >> }, >> { >> "type": "other", >> "name": "infra", >> "device": "br-lan.100", >> "proto": "dhcp", >> "ifname": "infra" >> }, >> { >> "type": "other", >> "name": "user", >> "device": "br-lan.178", >> "proto": "dhcp", >> "ifname": "user" >> }, >> { >> "type": "other", >> "name": "server", >> "device": "br-lan.70", >> "proto": "dhcp", >> "ifname": "server" >> }, >> { >> "type": "other", >> "name": "jail", >> "device": "br-lan.80", >> "proto": "dhcp", >> "ifname": "jail" >> } >> ] >> } >> >> After I applied it to the switch without error, the >/etc/config/network on >> the device is: >> config interface 'infra' >> option proto 'dhcp' >> option device 'br-lan.100' >> option ifname 'infra' >> >> config interface 'br_lan' >> option device 'br-lan' >> option proto 'none' >> >> config interface 'vlan_br_lan_70' >> option device 'br-lan.70' >> option proto 'none' >> >> config interface 'vlan_br_lan_178' >> option device 'br-lan.178' >> option proto 'none' >> >> config interface 'jail' >> option device 'br-lan.80' >> option ifname 'jail' >> option proto 'dhcp' >> >> config interface 'debug' >> option device 'lan8' >> option ipaddr '192.168.1.1' >> option netmask '255.255.255.0' >> option proto 'static' >> >> config interface 'vlan_br_lan_100' >> option device 'br-lan.100' >> option proto 'none' >> >> config interface 'user' >> option device 'br-lan.178' >> option ifname 'user' >> option proto 'dhcp' >> >> config device 'device_br_lan' >> option name 'br-lan' >> list ports 'lan1' >> list ports 'lan2' >> list ports 'lan3' >> list ports 'lan4' >> list ports 'lan5' >> list ports 'lan6' >> list ports 'lan7' >> option type 'bridge' >> >> config interface 'vlan_br_lan_80' >> option device 'br-lan.80' >> option proto 'none' >> >> config interface 'server' >> option device 'br-lan.70' >> option ifname 'server' >> option proto 'dhcp' >> >> config bridge-vlan >> option device 'br-lan' >> option vlan '100' >> list ports 'lan1' >> >> You see the port tagging is not applied. >> >> When I manually setup the config with VLANs in luci it works and I >get the >> following config: >> >> config interface 'infra' >> option proto 'dhcp' >> option device 'br-lan.100' >> option ifname 'infra' >> >> config interface 'br_lan' >> option device 'br-lan' >> option proto 'none' >> >> config interface 'vlan_br_lan_70' >> option device 'br-lan.70' >> option proto 'none' >> >> config interface 'vlan_br_lan_178' >> option device 'br-lan.178' >> option proto 'none' >> >> config interface 'jail' >> option device 'br-lan.80' >> option ifname 'jail' >> option proto 'dhcp' >> >> config interface 'debug' >> option device 'lan8' >> option ipaddr '192.168.1.1' >> option netmask '255.255.255.0' >> option proto 'static' >> >> config interface 'vlan_br_lan_100' >> option device 'br-lan.100' >> option proto 'none' >> >> config interface 'user' >> option device 'br-lan.178' >> option ifname 'user' >> option proto 'dhcp' >> >> config device 'device_br_lan' >> option name 'br-lan' >> list ports 'lan1' >> list ports 'lan2' >> list ports 'lan3' >> list ports 'lan4' >> list ports 'lan5' >> list ports 'lan6' >> list ports 'lan7' >> option type 'bridge' >> >> config interface 'vlan_br_lan_80' >> option device 'br-lan.80' >> option proto 'none' >> >> config interface 'server' >> option device 'br-lan.70' >> option ifname 'server' >> option proto 'dhcp' >> >> config bridge-vlan >> option device 'br-lan' >> option vlan '100' >> list ports 'lan1' >> list ports 'lan2' >> list ports 'lan3' >> list ports 'lan4' >> >> config bridge-vlan >> option device 'br-lan' >> option vlan '178' >> list ports 'lan1:t' >> list ports 'lan2:t' >> list ports 'lan3:t' >> list ports 'lan4:t' >> list ports 'lan5' >> >> config bridge-vlan >> option device 'br-lan' >> option vlan '80' >> list ports 'lan1:t' >> list ports 'lan4:t' >> list ports 'lan6' >> >> config bridge-vlan >> option device 'br-lan' >> option vlan '70' >> list ports 'lan1:t' >> list ports 'lan4:t' >> list ports 'lan7' >> >> I also tried the programmable switch but it not deploy without error. >The >> template was: >> { >> "interfaces": [ >> { >> "type": "bridge", >> "name": "br-lan", >> "bridge_members": [ >"lan1","lan2","lan3","lan4","lan5","lan6","lan7" >> ] >> }, >> { "type":"other", "name":"infra", "device":"br-lan.100", >> "proto":"dhcp", "ifname":"infra" }, >> { "type":"other", "name":"user", "device":"br-lan.178", >> "proto":"dhcp", "ifname":"user" }, >> { "type":"other", "name":"server", "device":"br-lan.70", >> "proto":"dhcp", "ifname":"server" }, >> { "type":"other", "name":"jail", "device":"br-lan.80", >> "proto":"dhcp", "ifname":"jail" } >> ], >> "switch": [ >> { >> "name": "br-lan", >> "reset": true, >> "enable_vlan":true, >> "vlan": [ >> { "device":"br-lan", "vlan":178, "ports":"lan1t lan2t lan3t >lan4t" >> }, >> { "device":"br-lan", "vlan":70, "ports":"lan1t lan4t lan6u" >}, >> { "device":"br-lan", "vlan":80, "ports":"lan1t lan4t lan7u" >}, >> { "device":"br-lan", "vlan":100, "ports":"lan1u lan2u lan3u >lan4u >> lan5u" } >> ] >> } >> ] >> } >> >> I also saw the https://github.com/openwisp/netjsonconfig/pull/261 >and >> assumed it is now merged. >> >> Can you please help me to either correct the template which correctly >sets >> up the VLAN tagging or help me refine my requirements for a easier >> implementation. >> >> Thank you so much. >> >> >> DISCLAIMER: The Templates were generated with the help of AI >> >> -- >> You received this message because you are subscribed to the Google >Groups >> "OpenWISP" group. >> To unsubscribe from this group and stop receiving emails from it, >send an >> email to [email protected]. >> To view this discussion, visit >> >https://groups.google.com/d/msgid/openwisp/7d00ca6c-b098-4cbb-ad52-682a366e6465n%40googlegroups.com >> ><https://groups.google.com/d/msgid/openwisp/7d00ca6c-b098-4cbb-ad52-682a366e6465n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > >-- >You received this message because you are subscribed to a topic in the >Google Groups "OpenWISP" group. >To unsubscribe from this topic, visit >https://groups.google.com/d/topic/openwisp/FrSOurfN1Yg/unsubscribe. >To unsubscribe from this group and all its topics, send an email to >[email protected]. >To view this discussion, visit >https://groups.google.com/d/msgid/openwisp/CAAGgX6%2BbK5%2B%3DFPYd%3DGD4bJTuVN0t58xCSN9T_gDGDLxK%3DwZAUA%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion, visit https://groups.google.com/d/msgid/openwisp/54c0e12d-fd95-49f4-82c9-bdb15bf1f59a%40yahoo.de.
