Brume (MV1000): how to set up VLANs on LAN port

Is it possible to configure lan0 or lan1 to have VLAN tagging on brume? If so how? (I haven’t used VLANs on openwrt.) Thanks!

1 Like

You can read about that here:

2 Likes

One “gotcha” is that many switches under GL.iNet or OpenWrt firmware use a “VLAN table” so you have to explicitly specify the VLAN tag (“vid”) over the limit. Depending on device, that commonly can be 16 or 128.

I haven’t checked on the Brume (and Ubuntu is configured completely differently from GL.iNet / OpenWrt), but, here from a different device is how you can tell (this device has a table of 128 entries):

jeff@garage:~$ swconfig list
Found: switch0 - mdio-bus.0

jeff@garage:~$ swconfig dev switch0 help
switch0: mdio-bus.0(Atheros AR8327), ports: 7 (cpu @ 0), vlans: 128
     --switch
	Attribute 1 (int): enable_vlan (Enable VLAN mode)
	Attribute 2 (none): reset_mibs (Reset all MIB counters)
[...]

So, for this device, VLAN 128 or higher would need the vid explicitly specified.

Some good rules of thumb are:

  • VLAN 1 or VLAN 2 are typically used by GL.iNet / OpenWrt “stock” config – be careful with them
  • Many consider mixing tagged and untagged packets on the same wire poor practice
1 Like

You can add this part of config to /etc/config/network

config interface 'wan_internet'
        option ifname 'wan.10'
        option proto 'dhcp'

config interface 'wan_iptv'
        option ifname 'wan.20'
        option proto 'dhcp'
		
config interface 'wan_voip'
        option ifname 'wan.30'
        option proto 'dhcp'

The run

/etc/init.d/network restart

And run:

ip link set wan.20 type vlan egress 0:4

to set priority.

Hehe - lots of rules of thumbs there - so unlike most people that have two thumbs.

Setting up VLAN’s - consider using ID’s above 1000 (note that Apple Airports use VLAN1003 for extending secondary SSID, BTW) to avoid conflicts with repurposed consumer router/AP’s

Thanks for the replies, turns out the vlan stuff was easy, I was just looking at the wrong guide…
In /etc/config/network I changed the ifnames for the interface 'lan' to option ifname 'lan0.1 usb0' to have the “lan” on vlan1 of lan0. Also added a guest network interface using:

config interface 'guest'
        option ifname 'lan0.3'
        option proto 'static'
        option netmask '255.255.255.0'
        option hostname 'gw2guest'
        option ipaddr '192.168.10.0'

Then go into the luci firewall UI and set-up the guest interface with its own zone, etc.

care to share you whole /etc/config/network file with full vlan configs

Sure:

/etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd62:1980:0000::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'lan0.1 usb0'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option hostname 'gw2'
        option ipaddr '192.168.0.1'

config interface 'wan'
        option ifname 'wan'
        option proto 'dhcp'
        option hostname 'GL-MV1000-f68'
        option metric '10'

config interface 'wan6'
        option ifname 'wan'
        option proto 'dhcpv6'
        option auto '0'
        option reqaddress 'try'
        option reqprefix 'auto'

config interface 'lan0'
        option ifname 'lan0'
        option macaddr '94:00:00:00:00:00'

config interface 'mgmt'
        option ifname 'lan1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option hostname 'gw2mgmt'
        option ipaddr '192.168.0.61'
        option macaddr '94:00:00:00:00:00'

config interface 'guest'
        option ifname 'lan0.3'
        option proto 'static'
        option netmask '255.255.255.0'
        option hostname 'gw2guest'
        option ipaddr '192.168.10.0'
        option macaddr '94:00:00:00:00:00'

config interface 'lan1'
        option ifname 'lan1'
        option macaddr '94:00:00:00:00:00'

I currently only have two vlans, ‘lan’ and ‘guest’, both on the ‘lan0’ interface.

1 Like