MikroTik Queue Up To Via PcQ

Posted: July 5, 2010 in MikroTik

Dear Bro n Sista,

Mau sharing2 nich,, tanya Mbah Google u/ literatur BW Up TO ga ada yang pas di HATI.he.he. akhirnya development sendiri (Home Made Mode ON). Intinya, bagaimana setting BW Up To untuk beberapa user.
Mungkin, Bro n Sista punya konfigurasi lain atau berbeda dengan konfigurasi gue. Ga masalah, berbeda2 tapi tetap satu tujuan..hE..HE..ChekiDOT…
Deskripsinya sbb :
1. BW Up To, artinya user bisa mendapatkan BW maksimal (Up To), ketika BW sharing tidak full. Atau user tsb sedang sendiri pakai koneksi INTERNET.
2. BW Sharing, akan balance terbagi rata ke tiap2 user, sebanyak user yang sedang online. Jadi misalkan BW 3 Mbps, dan ada 6 user dan download bersamaan. Maka masing2 user, kemungkinan akan dapat sama rata 3Mbps/6 = 500-an kbps.
3. Protokol yang dipakai queue Simple + Mangle + PCQ
4. PCQ, atau Per Connection Queue. Menggunakan rule sebagai berikut BW akan bagi rata jika BW sudah maksimal
5. Mangle Connection Via Source Address List.

OK langsung saja,

Misalkan ada 2 Customer yaitu customer A dan Customer B
Cust A : 172.16.10.1/29
Cust B : 172.16.20.1/29
Total BW UP To 3 MBps,

1. Mangle IP ADDress,
Cust A :

/ip firewall mangle add action=add-src-to-address-list address-list=Cust_Up_3M address-list-timeout=0s chain=forward comment=Up_3M_Testing disabled=no src-address=172.16.10.0/29

Cust B :

/ip firewall mangle add action=add-src-to-address-list address-list=Cust_Up_3M address-list-timeout=0s chain=forward comment=Up_3M_Testing disabled=no src-address=172.16.20.0/29

2. Jika sudah Buat Mangle Connection dan Packetsnya.
Mangle Connection

/ip firewall mangle add action=mark-connection chain=forward comment=”” disabled=no new-connection-mark=Con_Up_3M passthrough=yes src-address-list=Cust_Up_3M

Packets Mangle

/ip firewall mangle add action=mark-packet chain=postrouting comment=”” connection-mark=Con_Up_3M disabled=no new-packet-mark=Packets_Up_3M passthrough=yes

3. Sekarang bagian intinya, buat limitnya pakai Queue Simple aja..
Buat PCQ_DOWN_3M dan PCQ_3M_UP

/queue type add kind=pcq name=PCQ_DOWN_3M pcq-classifier=dst-address pcq-limit=50 pcq-rate=0 pcq-total-limit=3000

/queue type add kind=pcq name=PCQ_UP_3M pcq-classifier=src-address pcq-limit=50 pcq-rate=0 pcq-total-limit=3000

. Buat Parent nya

/queue simple add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=”” direction=both disabled=no dst-address=0.0.0.0/0 interface=all limit-at=0/0 max-limit=\ 3M/3M name=Customer_Up_3M packet-marks=Packets_Up_3M parent=none priority=8 queue=default/default total-queue=default-small
. Buat Child (Cust A & B)

/queue simple add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=”” direction=both disabled=no dst-address=0.0.0.0/0 interface=bridge-tunneling-soho \ limit-at=0/0 max-limit=3M/3M name=”Cust_A” parent=Customer_Up_3M priority=8 queue=PCQ_UP_3M/PCQ_DOWN_3M target-addresses=172.16.10.0/29 \ total-queue=default-small

/queue simple add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=”” direction=both disabled=no dst-address=0.0.0.0/0 interface=”vlan203(testing)” \ limit-at=0/0 max-limit=3M/3M name=Cust_B parent=Customer_Up_3M priority=8 queue=PCQ_UP_3M/PCQ_DOWN_3M target-addresses=172.16.20.0/29 \ total-queue=default-small

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s