Thursday, August 27, 2015

Automatic Bandwidth Divide in Users (Bandwidth Management in Mikrotik)


/ip firewall mangle
add action=mark-connection chain=forward comment="PCQ Eq" \
    new-connection-mark=equal-mark-con src-address=192.168.2.0/24
add action=mark-packet chain=forward comment="PCQ Eq" connection-mark=\
    equal-mark-con new-packet-mark=equal-mark-pack

/queue type
add kind=pcq name=pcq_down pcq-classifier=dst-address
add kind=pcq name=pcq_up pcq-classifier=src-address


/queue tree

add name=DOWLOAD packet-mark=equal-mark-pack parent=LAN queue=pcq_down
add name=UPLOAD packet-mark=equal-mark-pack parent=WAN queue=pcq_up

#(tested on V6.25)

22 comments:

  1. For this we need any kind of server installation first like PPPoE and Hotspot etc...
    Or Just use above script and divide equal speed between users...
    Good Work Keep it up...

    ReplyDelete
  2. its work on pppoe, hotspot and dhcp server

    ReplyDelete
    Replies
    1. TESTED ON DHCP
      BUT ITS ALSO WORK ON PPPOE AND HOTSPOT

      Delete
  3. Replies
    1. 1st INSTALL DHCP SERVER ....
      2nd COPY AND PASTE SCRIPTS

      Delete
  4. hi, where did you specify the bandwith?
    i want to know if it's possible to fix different bandwith and divide it by user in different network.
    For exemple i have 10 user on a subnet 192.168.10.0/24 and i want those 10 user to divide 10Mb
    and i have another 5 user on another subnet 192.168.11.0/24 and i want those one to divide 8Mb.
    Is there any specific scripts to add??

    ReplyDelete
  5. Why do my router has double up the speed that I gived it to the user

    ReplyDelete
  6. Why do my router has double up the speed that I gived it to the user

    ReplyDelete
  7. I replace the WAN to ether1 and the LAN to ether2 and still not working

    ReplyDelete
    Replies
    1. mikrotik firmware... ?
      send me mikrotik configuration ...

      Delete
  8. how can i use with radius hotspot

    ReplyDelete
  9. how can i use with radius hotspot

    ReplyDelete
    Replies
    1. same method. radius is just user auth system, Users get ip from Mikrotik

      Delete
  10. hamza bhai ma 5.20 mikrotic key use kr rha hu is ma krna kya ha kindly simple sa smja skt aha ma zida jnta ni abi kam start hi kia ha

    ReplyDelete
    Replies
    1. Ap her post pe comments de rehe hn.
      first ap decide tu kern ap Mikrotik pe kerna kya chaate hn..
      or kya information chaie .... ?

      Delete
    2. hamza bhai ma ya jnna chta hu just is post k bra ma vsa to sb jnna chta hu lakin is ma ya batai k agr mera ps 8mb ptcl ha or us pa 5 clint online ha 1 na downloading lagaa li ha to kya is baki 4 ko kitni speed meli gi or is ko kitni 8mb ya half ya btaa da plz

      Delete
  11. bhai maine ap se 1 sawaal pouchna hai k yr maine dream intenet se fiber pr link liya howa hai or meray pass 24mbps speed hai or mikrotik routerboard pr mera server bana howa hai pppoe or bhai masla yeh arha hai k download jab mai local server dream net jo hai emasti.pk mikrotik se jab mai connect hokr yeh server se downloading kr rha hu tou kbps mai downloading arhe hai jab k yeh tou 1 local sharing server hai nah dream network ka is tou mbps mai downloading ani chaahiye or bhai maine direct tplink pr downloading emasti.pk se checck ki hai tou 1mbps se ly kr 10mbps tak downloading arhe hai so please help me brother...

    ReplyDelete
  12. where swhere i put my total speed i have 8M

    ReplyDelete