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=192.168.23.0/24 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=192.168.23.0/24

/ip firewall mangle add src-address=192.168.1.0/24 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=192.168.1.0/24



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

--------------------------------------------------------------------------------------------------------------------------

2 comments:

  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:192.168.1.1
    I am using RB750 so ether1 is in and ether2-5 are out.

    Thanks

    ReplyDelete
  2. Hi,

    I think you can read more at http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ#PCQ_Rate_Examples


    - 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.

    ReplyDelete