Using RouterOS to QoS your network - 2020 Edition

Especially for options when you have several WAN or LAN interfaces, or when you use a VLAN, I slightly modified the original script.

For example, when using VLAN, it is necessary to mark packets on VLAN interfaces, and limit the speed on their “parent” - the Ethernet interface, bridge, etc.

Therefore, I set the parameters for incoming and outgoing interfaces as arrays.

Examples of using:

  1. You have one incoming interface (bridge1) and one outgoing interface (ether1)
:local outboundInterfaceArray {{"ether1";"";"460M"}}
:local inboundInterfaceArray {{"bridge1";"";"460M"}}
  1. You have one incoming interface (bridge1) and two outgoing ones (ether1,ether2)
:local outboundInterfaceArray {{"ether1";"";"460M"};{"ether2";"";"460M"}}
:local inboundInterfaceArray {{"bridge1";"";"460M"}}
  1. You have one incoming interface (bridge1), on which there are two VLANs (vlan1,vlan2) and two outgoing (ether1,ether2)
:local outboundInterfaceArray {{"ether1";"";"460M"};{"ether2";"";"460M"}}
:local inboundInterfaceArray {{"bridge1";"vlan1";"460M"};{"bridge1";"vlan2";"460M"}}

When using VLANs in this option, the speed will be limited on their “parent” - the bridge.