My
last article about the switch chip on Mikrotik caused an ambiguous reaction, and the comment of one of the readers prompted the idea. And so: how on RB952Ui-5ac2nD to make more than one switching group?
We bypass the restriction of the Atheros8227 chip
(I think with others it is possible similarly)The idea here is simple, thanks
Ivan_83 for the idea (it was his
comment that gave the direction of thought).
We formulate the problem: there is a home Internet with television, but the prefix must be given a cable not after our NAT, but before it. Usually the provider offers a small switch to your router (what a nightmare, so many unnecessary devices!), Or if the router knows how, you create a bridge on it from two ports that you give to the external network (incoming cable + TV set-top box). But, the aforesaid Mikrotik does not know how to use two switching groups, and therefore, we have to make a soft bridge (and I want to give it to the hardware).
')
Now implementation: let's unite all the ports in the switching group (set up the master port):
/interface ethernet set ether1 master-port=ether2-master

Similarly for all others.
Now take and create two VLANs, one for the external network (for example, VID: 1) and for the inside (VID: 2):
/interface vlan add interface=ether2-master \ name=ext vlan-id=1 add interface=ether2-master \ name=V_LAN vlan-id=2

Now create the VLAN table:
/interface ethernet switch vlan add ports=ether1,ether2-master,ether3,ether4,ether5,switch1-cpu switch=switch1 vlan-id=1 add ports=ether1,ether2-master,ether3,ether4,ether5,switch1-cpu switch=switch1 vlan-id=2

And on the switching chip, we “combine” the ports using VLAN. All ports will be rastegirovanny (except for the CPU), and the default VLAN will be the one that corresponds to the destination port (for the external network 1, for the internal 2):
/interface ethernet switch port set ether1 default-vlan-id=1 vlan-header=always-strip vlan-mode=secure set ether2-master default-vlan-id=1 vlan-header=always-strip vlan-mode=secure set ether3 default-vlan-id=2 vlan-header=always-strip vlan-mode=secure set ether4 default-vlan-id=2 vlan-header=always-strip vlan-mode=secure set ether5 default-vlan-id=2 vlan-header=always-strip vlan-mode=secure set switch1-cpu default-vlan-id=2 vlan-header=add-if-missing vlan-mode=secure

Everything, now the switching chip will do the work we need.