QoS and Traffic Shaping on Mikrotik

On this tutorial we will configure QoS or traffic shaping on the mikrotik router. Ether1 was already configured for WAN and ether2 was configured for LAN. We will configure the traffic shaping on ether2. Ether2 was configured with IP Address 192.168.1.1. Let say we have 10Mbps internet bandwidth and we want to limit into 1Mbps. Your network address is 192.168.1.0/24.

Step 1 Mangle  Rule for Download

Navigate to IP > Firewall > Mangle tab > press the (+) plus sign >Mangle Rule dialog box will pop up > on Chain: select forward > on Dst. Address: type 192.168.1.0/24.


Then press the Action tab > on Action: select mark packet > on New Packet Mark: type  DL          ( type any words you prefer like download or d_load) > press Apply then OK.



Step 2 Mangle Rule for Upload

Navigate to IP > Firewall > Mangle tab > press the (+) plus sign > Mangle Rule dialog box will pop up > on Chain: select forward > on Src. Address: type 192.168.1.0/24.


Then press the Action tab > on Action: select mark packet > on New Packet Mark: type  UP         ( type any words you prefer like upload or u_load) > press Apply then OK.



Step 3 Queue Types for Download and Upload

Navigate to Queues > press Queue Types tab> press the (+) plus sign > Queue Type dialog box will pop up. On Type Name: type lan_download (enter any words you want like download or down_load) > on Kind: select pcg > on Rate: type 1M (1Mbps bandwidth) > on Classifier: tick  Dst. Address. Then press Apply and OK.


 
Navigate to Queues > press Queue Types tab> press the (+) plus sign > Queue Type dialog box will pop up. On Type Name: type lan_upload (you can enter any words you want like upload or up_load) > on Kind: select pcg > on Rate: type 1M (1Mbps bandwidth) > on Classifier: tick Src. AddressThen press Apply and OK.


Step 4 Queue for Download and Upload

 Navigate to Queues > press Queue Tree tab> press the (+)plus sign > on Name: dowload (you can type any name) > on Packet Marks: select DL (DL was created on Step 1 Mange Rule) > on Queue Type: select lan_download (lan_download was created on Step 3 Queue Types). Then press Apply and OK.



 Navigate to Queues > press Queue Tree tab> press the (+)plus sign > on Name: type upload(you can type any name) > on Packet Marks: select UP (UP was created on Step 1 Mange Rule) > on Queue Type: select lan_download (lan_download was created on Step 3 Queue Types). Then press Apply and OK.


We can test this settings if we achieve the 1Mbps bandwidth limit through www.speedtest.net.

0 Comments:

Post a Comment