Sunday, 3 January 2016

Mikrotik Router Bandwidth Managment using PCQ Equal for all users

Mikrotik Router Bandwidth Managment using PCQ Equal for all users


Mikrotik Router Bandwidth Managment using PCQ Equal for all users

PCQ Configuration:

[admin@abi] /queue type>

add   name="512kbps_Download" kind=pcq pcq-rate=512k pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
     pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32
     pcq-src-address6-mask=64 pcq-dst-address6-mask=64

 add   name="512kbps_upload" kind=pcq pcq-rate=512k pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
     pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32
     pcq-src-address6-mask=64 pcq-dst-address6-mask=64

 add   name="1MBps_download" kind=pcq pcq-rate=1M pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
     pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32
     pcq-src-address6-mask=64 pcq-dst-address6-mask=64

 add   name="1MBps_upload" kind=pcq pcq-rate=1M pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000 pcq-burst-rate=0
     pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32 pcq-src-address6-mask=64
     pcq-dst-address6-mask=64

Simple Queue Configuration:
[admin@abi /queue simple>

add    name="Total" target-addresses=192.168.1.0/24,192.168.2.0/24 interface=all parent=none packet-marks="" direction=both
      priority=8 queue=default-small/default-small limit-at=0/0 max-limit=0/0 burst-limit=0/0 burst-threshold=0/0
      burst-time=0s/0s total-queue=default-small

 add    name="512kbps" target-addresses=192.168.1.0/24 interface=all parent=Total packet-marks="" direction=both priority=2
      queue=512kbps_upload/512kbps_Download limit-at=0/0 max-limit=0/0 burst-limit=0/0 burst-threshold=0/0
      burst-time=0s/0s total-queue=default-small

 add    name="1MBps" target-addresses=192.168.2.0/24 interface=all parent=Total packet-marks="" direction=both priority=1
      queue=1MBps_upload/1MBps_download limit-at=0/0 max-limit=0/0 burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
      total-queue=default-small