diff --git a/package/gluon-mesh-batman-adv-core/check_site.lua b/package/gluon-mesh-batman-adv-core/check_site.lua
index 98aa68fdd39689fb557a921b8e0bf5abc1525e44..8226d5dd6ff7d80489b52b933b306983e1d1b5ec 100644
--- a/package/gluon-mesh-batman-adv-core/check_site.lua
+++ b/package/gluon-mesh-batman-adv-core/check_site.lua
@@ -7,6 +7,7 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do
    need_string(config .. '.mesh_ssid')
    need_string_match(config .. '.mesh_bssid', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
    need_number(config .. '.mesh_mcast_rate')
+   need_number(config .. '.mesh_vlan', false)
 end
 
 need_boolean('mesh_on_wan', false)
diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless
index bb3125a86ac7a2b58c70daffef3af5fda889b565..98ac4c64d9cfb1a3b5f0a7d854c9c22e8dbb71fc 100755
--- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless
+++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/mesh-batman-adv-core/invariant/020-wireless
@@ -27,13 +27,32 @@ local function configure_radio(radio, index, config)
 
   local mesh = 'mesh_' .. radio
   uci:delete('network', mesh)
-  uci:section('network', 'interface', mesh,
+  uci:delete('network', mesh .. '_vlan')
+
+  if config.mesh_vlan then
+	uci:section('network', 'interface', mesh,
+	      {
+		proto = 'none',
+		mtu = '1532',
+	      }
+	)
+	uci:section('network', 'interface', mesh .. '_vlan',
 	      {
+		ifname = '@' .. mesh .. '.' .. config.mesh_vlan,
 		proto = 'batadv',
 		mtu = '1528',
 		mesh = 'bat0',
 	      }
-  )
+	)
+  else
+	uci:section('network', 'interface', mesh,
+	      {
+		proto = 'batadv',
+		mtu = '1528',
+		mesh = 'bat0',
+	      }
+	)
+  end
 
   uci:delete('wireless', mesh)
   uci:section('wireless', 'wifi-iface', mesh,