Monday, October 3, 2011

Mikrotik PCQ queue tree on two interfaces

this is the command to create queue tree for two interfaces on mikrotik

/ip firewall mangle add src-address= chain=prerouting action=mark-packet new-packet-mark=all passthrough=no
/queue type add name="PCQ_download" kind=pcq pcq-rate=64000 pcq-classifier=dst-address
/queue type add name="PCQ_upload" kind=pcq pcq-rate=32000 pcq-classifier=src-address
/queue tree add parent=global-in queue=PCQ_download packet-mark=all
/queue tree add parent=global-out queue=PCQ_upload packet-mark=all
/queue simple add queue=PCQ_upload/PCQ_download target-addresses=

/ip firewall mangle add src-address= chain=prerouting action=mark-packet new-packet-mark=all1 passthrough=no
/queue type add name="PCQ_download1" kind=pcq pcq-rate=128000 pcq-classifier=dst-address
/queue type add name="PCQ_upload1" kind=pcq pcq-rate=64000 pcq-classifier=src-address
/queue tree add parent=global-in queue=PCQ_download1 packet-mark=all1
/queue tree add parent=global-out queue=PCQ_upload1 packet-mark=all1
/queue simple add queue=PCQ_upload1/PCQ_download1 target-addresses=

the results
-subnet, get 64/32 kbit for each pc.
-subnet, get 128/64 kbit for each pc.



  1. Hi,
    I want to do simple PCQ for unknown bandwidth. For example the internet speed is not stable. So the PCQ automatically divides the speed for each pc.

    My router ip:
    I am using RB750 so ether1 is in and ether2-5 are out.


  2. Hi,

    I think you can

    - PCQ_rate should be 0
    - Max_rate can be 512k or if your unstable speed is around 1M, so you can choose 1M

    then it will share the bandwidth equally among the users.

    I have test download with two PCs, echo computer get around 32k, But it take time when it become equal rate.
    firstly first PC get around 49k, and another pc get around 20k, then after a while each pc get around 32k.