VLAN offload issue on Atheros 8227

Hi,

Weird issue met - on Atheros 8327(951G-2HnD) below works fine:

/interface ethernet switch vlan
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=1
add independent-learning=no ports=ether1,ether2 switch=switch1 vlan-id=6
add independent-learning=no ports=ether1,switch1-cpu,ether4 switch=switch1  vlan-id=100
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=101
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=102
/interface ethernet switch port
set 0 vlan-header=add-if-missing vlan-mode=secure
set 1 default-vlan-id=6 vlan-header=always-strip vlan-mode=secure
set 4 default-vlan-id=100 vlan-header=always-strip vlan-mode=secure
set 5 vlan-mode=secure

on Atheros 8227(RB941-2nD) similar config crashes router:

/interface ethernet switch vlan
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=1
add independent-learning=no ports=ether1,ether2 switch=switch1 vlan-id=6
add independent-learning=no ports=ether1,switch1-cpu,ether4 switch=switch1  vlan-id=100
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=101
add independent-learning=no ports=ether1,switch1-cpu switch=switch1 vlan-id=102
/interface ethernet switch port
set 0 vlan-header=add-if-missing vlan-mode=secure
set 1 default-vlan-id=6 vlan-header=always-strip vlan-mode=secure
set 4 default-vlan-id=100 vlan-header=always-strip vlan-mode=secure
set 6 vlan-mode=secure

Tiny difference - RB941-2nD does not allow use “Default VLAN Id=Auto”

Any ideas? Offloading via bridge vlan filter hammers cpu heavily - so no option here.

This works OK on my 941:

/interface ethernet switch vlan
add ports=switch1-cpu,ether1,ether2,ether4 switch=switch1
add ports=switch1-cpu,ether3 switch=switch1 vlan-id=12
/interface ethernet switch port
set 0 vlan-header=always-strip vlan-mode=secure
set 1 vlan-header=always-strip vlan-mode=secure
set 2 default-vlan-id=12 vlan-header=always-strip vlan-mode=secure
set 3 vlan-header=always-strip vlan-mode=secure
set 4 vlan-mode=secure
set 5 vlan-mode=secure

There is no “set 6” item on a 941.

Don’t use VLAN ID 1. It means different things to different switches/routers. Just avoid it.
Ether 4 is “set 3”, not “set 4”.
What do you mean by “crashes router” anyway?

In what way does it crash, or rather does it not work as you expect?

There are functional differences between some switch chips which Mikrotik use, in particular only a couple (QCA8337, Atheros8327) support hybrid ports.