Merging won't work, but you could try using the custom syntax: https://netjsonconfig.openwisp.org/en/stable/backends/openwrt.html#all-the-other-settings
That's another possibility. We'll be working to improve this in a couple of weeks, I'll get in touch when we have news. 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 Tue, 15 Jul 2025 at 09:47, 'Marten Lucas' via OpenWISP < [email protected]> wrote: > I just tried deploying via files. This works. > > But do I loose the modularity? > If I assign multiple templates with /etc/config/network files to the > device will they merge or override? > Can I combine file and netjsonconfig - e.g. I have a untagged debug port > that was well deployed with the template. Can I keep this template and > deploy the vlans with file? Will it merge? > > thxs for the help > f.capoano schrieb am Donnerstag, 10. Juli 2025 um 16:44:29 UTC+2: > >> 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 <+372%205936%201689> >> *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 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/c0a1a744-8b93-4436-b023-6b20d5301b9fn%40googlegroups.com > <https://groups.google.com/d/msgid/openwisp/c0a1a744-8b93-4436-b023-6b20d5301b9fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAAGgX6%2B%2BjtK7uM07zEpMRRnSz3oR1X1_KLQihv1NQYA69GVvOw%40mail.gmail.com.
