If we have a large number of clients, of course, the complete queue tree on each client IP would be very long. it is certainly going to take a lot of resources of the mikrotik router which makes the bandwidth management system becomes very complex and making hard for the router system. It will be depends on mikrotik router ability itself to regulate all traffic flow that would be very complex. And for those of you who want to apply the the previous method on your internet network that using hotspot with dynamic Ip address, certainly can not be done by the client ip address.
This is the combining of PCQ (Per Connection Queue) on queue type with the priority, limit-at and max-limit of the queue tree, which allows us to make the complete queue tree with the kind of connection packets that will be distributed to all IP address that used clients to access the internet from as our network. The implementing of this method is not just for dynamic ip address such a hotspot, but still can be used for static IP address clients without having to know the IP address of each client that connected. So it doesn't require to make a new queue tree rule if sometimes you make change the ip address of your client. One unite of the hierarchy of queue tree rules of each kind of connection packets is for all of your client that you have on your network.
As the previous method we will make the connection packets based on public and local interface name. It is free to use chain=prerouting or chain=forward as you like. The most important thing, you have to understand the the concept of QOS packets flow to separate and make the certain connection packets that would be set on the queue tree rules. We will limit the bandwidth for each kind connection packets using PCQ on queue type.
1. Separating the Various kind of Connection Packets
Here we simply to make the various kind of connection packets that you want to prioritize, We don't separate by IP address. For more details you must give the focus of the scripts console command below. How you can create the marking on mangle rule with layer 7 protocol! you can define by yourself a certain connection packets else by defining layer 7 protocol rules./ip firewall mangle add action=mark-connection chain=prerouting disabled=no in-interface=ether1 new-connection-mark=all-inconn passthrough=yes comment="UPSTEAM CONNECTION" add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPSTEAM" add action=mark-connection chain=forward disabled=no in-interface=wlan1 new-connection-mark=all-outconn passthrough=yes comment="DOWNSTEAM CONNECTION" add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNSTEAM" /ip firewall layer7-protocol add comment="download" name=high regexp="^.*get.+\\.(exe|rar|iso|zip|7zip|0[0-9][1-9]|flv|mkv|avi|mp4|3gp|rmvb|mp3|img|dat|mov).*\$" add comment="download" name=document regexp="^.*get.+\\.(pdf|doc|docx|xlsx|xls|rtf|ppt|ppt).*\$" add comment="video" name=youtube regexp="^.*get.+\\.(c.youtube.com|cdn.dailymotion.com|metacafe.com|mccont.com).*\$" add comment="video" name=streaming regexp="videoplayback|video" /ip firewall mangle add action=mark-packet chain=forward layer7-protocol=high new-packet-mark=dpkt packet-mark=all-outpkt passthrough=no comment="CLIENT DOWNLOAD" add action=mark-packet chain=forward layer7-protocol=document new-packet-mark=dpkt packet-mark=all-outpkt passthrough=no comment="" add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=dpkt packet-mark=all-outpkt protocol=tcp comment="" /ip firewall mangle add action=mark-packet chain=forward layer7-protocol=youtube new-packet-mark=spkt packet-mark=all-outpkt passthrough=no comment="CLIENT VIDEO" add action=mark-packet chain=forward layer7-protocol=streaming new-packet-mark=spkt packet-mark=all-outpkt passthrough=no comment="" /ip firewall mangle add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=5340-5352,6000-6152,10001-10011,14009-14030,18901-18909 comment="CLIENT ONLINE GAMES" add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=39190,27780,29000,22100,10009,4300,15001,15002,7341,7451 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=40000,9300,9400,9700,7342,8005-8010,37466,36567,8822 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=47611,16666,20000,5105,29000,18901-18909,9015 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005,27015 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005-27020,13055,7800-7900,12060-12070 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=8005-8010,9068,1293,1479,9401,9600,30000 add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=14009-14030,42051-42052,40000-40050,13000-13080 /ip firewall mangle add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no new-packet-mark=bpkt packet-mark=all-outpkt protocol=tcp comment="CLIENT BROWSING" /ip firewall layer7-protocol add comment="BIT TORENT" name=bittorrent regexp="^(\13bittorrent protocol|azver1\$|get /scrape\\\\?info_hash=)|d1:ad2:id20:|8’7P\\)[RP]" add comment="TORRENT WEBSITES" name=torrentsites regexp="^.*(get|GET).+(torrent|thepiratebay|isohunt|entertane|demonoid|btjunkie|mininova|flixflux|torrentz|vertor|h33t|btscene|bitunity|bittoxic|thunderbytes|entertane|zoozle|vcdq|bitnova|bitsoup|meganova|fulldls|btbot|flixflux|seedpeer|fenopy|gpirate|commonbits).*\$" /ip firewall mangle add action=mark-packet chain=forward layer7-protocol=bittorrent new-packet-mark=tpkt packet-mark=all-outpkt passthrough=no comment="BILLING BIT TORRENT" add action=mark-packet chain=forward layer7-protocol=torrentsites new-packet-mark=tpkt packet-mark=all-outpkt passthrough=no comment="BILLING TORRENT WEBSITES" add action=mark-packet chain=forward p2p=all-p2p new-packet-mark=tpkt packet-mark=all-outpkt passthrough=no comment="BILLING ALLP2P" add action=mark-packet chain=forward dst-port=58561,58045,14948,58008,58816,59097 new-packet-mark=tpkt packet-mark=all-outpkt passthrough=no protocol=tcp comment="BILLING TORRENT PORT"
This rules command is much simpler than previous method to capture the various kind of connection packets to your clients. As I told you can expand to define the connection packets to make the kind of connection packets as you desired.
2. Set the bandwidth limitations using PCQ with the Queue Type
PCQ will divided bandwidth equally for all clients with maximum limit rate that will be given to a certain connection packets to all clients that use the kind connections. So we just need to set the limit rate for each kind connection packets. The queue type script rules like this!/queue type add name=pcq_upstream kind=pcq pcq-rate=256k pcq-classifier=src-address add name=pcq_downstream kind=pcq pcq-rate=512k pcq-classifier=dst-address add name=pcq_game kind=pcq pcq-rate=256k pcq-classifier=dst-address add name=pcq_browsing kind=pcq pcq-rate=256k pcq-classifier=dst-address add name=pcq_download kind=pcq pcq-rate=256k pcq-classifier=dst-address add name=pcq_undefined kind=pcq pcq-rate=180k pcq-classifier=dst-address add name=pcq_extensions kind=pcq pcq-rate=180k pcq-classifier=dst-address add name=pcq_video kind=pcq pcq-rate=200k pcq-classifier=dst-address add name=pcq_p2ptorrent kind=pcq pcq-rate=150k pcq-classifier=dst-address
Change the pcq-rate value of the queue types rules to each kind connection packets. After this the pcq name that we have defined, will be used to the queue tree rules. It is fully according to you to give the name of the queue type. The result you can see as the picture below!
The value of pcq-rate will determine the maximum bandwidth limit that will shared to the clients that used the certain connection packets a long as bandwidth is still remain to all clients equally.
3. Create Queue Tree Rules of The Kind Connection Packets
This is going the final step that allow you to manage the bandwidth limit and priority on queue tree rules, specify limit-at and max-limit to all clients that will use a certain connection packets. The kind of connection packets you set the priority according to you. In this case I just give the high priority for the online games and browsing connection packets that are relatively consuming just a bit bandwidth. You can edit and paste this scripts of queue tree rules below on the console terminal winbox!/queue tree add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=2M add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=2M add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=125k max-limit=512k add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=125k max-limit=512k add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=125k max-limit=512k add name=3.1.Undefined parent=3.Download queue=pcq_undefined packet-mark=all-outpkt priority=4 limit-at=75k max-limit=320k add name=3.2.Extensions parent=3.Download queue=pcq_extensions packet-mark=dpkt priority=5 limit-at=75k max-limit=320k add name=3.3.Video parent=3.Download queue=pcq_video packet-mark=spkt priority=6 limit-at=75k max-limit=320k add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=75k max-limit=320k
Still using the previous hierarchy of queue tree rules. Once you insert the above scripts, you will see the rules as shown like the picture below!
Understanding of HTB (Hierarchical Token Bucket) on Mikrotik RouterOS QoS is needed to make the priority of the connection packets works as you expected. This is most determined by the value of "limit-at" and "max-limit" that used on the hierarchy of the queue tree rules. Note that this is a as the unit hierarchy of the queue tree rules for all clients that using a certain connection packets. Max-limit will maintain the total limit of a certain connection packets usage as a whole. Furthermore, granting priority value, limit-at will determine the priority of the seizure bandwidth of the kind connection packets on queue tree.
Note:
- Max-limit is the bandwidth maximum of certain connection packets that used by clients
- Max-limit of each queue tree child should not be more than max-limit parent
- The total limit-at of all queue tree childs should not be more than max-limit parent
- Priority of the connection packets will only work if on the rule of two setup above.
Next please practice it yourself, as far as I observe now the satisfaction of the clients more determined by the stability of the Internet connection that provided by your ISP to give the bandwidth. As a description of this method, I have included this video of this article !
Related Articles
1- Is it possible Ttabaik ball on rb 2011
ReplyDelete2-How can speed up the browsing
3-How can work pc or user - mestar - excluded from the selection
mas,, klo misalkan bandwith kita 4mb ups dan 4mb donw. gimana kira2 pengaturan pcq rate pada queue type, dan juga besaran parent dan child pada masing2 queue treenya?
ReplyDeletethanks
Bandwidthnya lumayan mas! kl saya punya bandwidth segitu, saya akan setting seperti ini!
Delete/queue type
add name=pcq_downstream kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_upstream kind=pcq pcq-rate=720k pcq-classifier=src-address
add name=pcq_game kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_browsing kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_download kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_undefined kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_extensions kind=pcq pcq-rate=200k pcq-classifier=dst-address
add name=pcq_video kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_p2ptorrent kind=pcq pcq-rate=180k pcq-classifier=dst-address
/queue tree
add name=a.Upstream parent=global-in queue=pcq_downstream packet-mark=all-inpkt priority=8 max-limit=4M
add name=b.Downstream parent=global-out queue=pcq_upstream packet-mark=all-outpkt priority=8 max-limit=4M
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=150k max-limit=720k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=150k max-limit=720k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=150k max-limit=720k
add name=3.1.Undefined parent=3.Download queue=pcq_undefined packet-mark=all-outpkt priority=4 limit-at=150k max-limit=512k
add name=3.2.Extensions parent=3.Download queue=pcq_extensions packet-mark=dpkt priority=5 limit-at=100k max-limit=512k
add name=3.3.Video parent=3.Download queue=pcq_video packet-mark=spkt priority=6 limit-at=100k max-limit=512k
add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=100k max-limit=320k
jadi bingung ne mas,
Delete/queue tree
add name=a.Upstream parent=global-in queue=pcq_downstream packet-mark=all-inpkt priority=8 max-limit=4M
add name=b.Downstream parent=global-out queue=pcq_upstream packet-mark=all-outpkt priority=8 max-limit=4M
pengguanaan queue type pada queue treenya terbalik atau memang begitu mas?
Itu untuk maximum bandwidth total dari semua client yang berarti kita tidak membatasinya, akan tetapi rata2 bandwidth pada tiap2 client itu berada pada kisaran rate pcq jika bandwidth mememadai (konsep pembagian pcq). nilai2 dari pada queue tree harus memenuhi konsep HTB agar priority yang kita berikan bisa bekerja. Jika kita memberikan nilai rendah atau tidak memberikan nilai, ini akan mematahkan priority yang kita berikan pada jenis3 connection packets yang ingin kita atur.
Deletedapat ilmu baru,, sebenarnya yang bikin saya bingungnya disini mas,
Deletenama queue nya kan=a.Upstream, tapi kenapa queue type yang dipake pcq_downstream? bukankah seharusnya pcq_upstream, karena menggunakan clasifier src address?
Oh iya salah ngambil nama mas maaf! berarti mas sudah mengerti alurnya! terima kasih atas koreksinya!
Deletebli tut tiang juga pk mikrotik os tapi di pasangin ma temen ,,, mikrotik + luscha proxy,,, yg tiang pingin tanyakan,, di pengaturan proxy ma mikrotik saat main game terkadang ngeleg n lambat,,, tiang pk speedy 2mb... jika berkenan tolong cek apa ada kesalahan setingan atau gimana ..(minta fb atau emailnya mas) biar tiang bisa add suksuma
Deleteiam use this rool and didi not work right ques don't couent
ReplyDelete-How can work pc or user - mestar - excluded from the selection
ReplyDeleteI am not so clear what you mean..!
Deletehow to exception of some user Limiting
Deletethe exceptions should be made the separation per ip to a certain client for those connection packets
DeleteTerima kasih banyak Pak Ketut untuk scriptnya, sekarang saya memakai script ini untuk warnet saya.
ReplyDeleteCuma ada beberapa hal yang mau saya tanyakan, untuk script ini tidak perlu di define lagi ya setiap clientnya?
dan kalau Max Bandwidth 1Mbps berapa pembagian bandwidth yang ideal?
mohon tanggapannya...
Terima kasih pak wahyu kunjungannya ke blog saya...! Disini kita hanya membagi berdasarkan jenis2 paketnya pak wahyu, jd ga usah membagi per ip lagi, karena kl bandwidth kita pas2an dibagi2 rata secara matematis kan kecil2 sekali, kl client kita lebih dari 6 misalnya, ditambah lagi kl koneksi internet isp tdk stabil, bisa dibayang bandwidth management bs menjadi bumerang. Kelebihan dari pcq bisa memanfaatkan bandwidth yang nganggur.
DeleteBaik, ini adalah setingan saya untuk bandwidth 1 M yang masih bergantung dengan apa yang ingin ditekankan. Selebihnya percayakan pada kenyataan dilapangan! :)
/queue type
add name=pcq_upstream kind=pcq pcq-rate=256k pcq-classifier=src-address
add name=pcq_downstream kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_game kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_browsing kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_download kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_undefined kind=pcq pcq-rate=200k pcq-classifier=dst-address
add name=pcq_extensions kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_video kind=pcq pcq-rate=200k pcq-classifier=dst-address
add name=pcq_p2ptorrent kind=pcq pcq-rate=150k pcq-classifier=dst-address
/queue tree
add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=1M
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=1M
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=100k max-limit=512k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=100k max-limit=512k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=100k max-limit=512k
add name=3.1.Undefined parent=3.Download queue=pcq_undefined packet-mark=all-outpkt priority=4 limit-at=65k max-limit=320k
add name=3.2.Extensions parent=3.Download queue=pcq_extensions packet-mark=dpkt priority=5 limit-at=65k max-limit=320k
add name=3.3.Video parent=3.Download queue=pcq_video packet-mark=spkt priority=6 limit-at=65k max-limit=320k
add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=65k max-limit=320k
Terima kasih atas tanggapannya Pak Ketut, sekarang sudah memakai konfigurasi yang bapak berikan, cuma kenapa ya kok sekarang situs2 porno malah tidak terblokir, biasanya kalau tanpa menggunakan mikrotik akan di blokir sama internet-positif, tapi sekarang malah lolos begitu saja...
DeleteAda tidak Pak setingan yang mempertahanan pemblokiran dari internet positif tersebut, terima kasih sebelumnya.
Apakah ini terjadi setelah menggunakan mikrotik, atau setelah memasang script ini? Sederhananya dulu seperti ini! ISP telah memberikan settingan untuk memfilter hal tersebut, ini bekerja apabila client dengan static IP misalnya, mengambil alamat IP dns yang sama dengan IP gateway dr ISP yang diberikan. Nah apabila client tidak mengambil IP dns dari ISP berarti lose control.
DeleteGunakan IP DNS nawala dibawah ini
Delete/ip dns set servers=180.131.144.144,180.131.145.145 allow-remote-requests=yes
Mengatasi seandainya client merubah ip dns pada komputer
/ip firewall nat
add chain=dstnat protocol=tcp dst-port=53 action=redirect to-ports=53 comment=NawalaPornBlocking
add chain=dstnat protocol=udp dst-port=53 action=redirect to-ports=53 comment=NawalaPornBlocking
nice job sir!!! good work!!!
DeleteHi,
ReplyDeleteI would like to find out if it is possible to apportion to certain clients different bandwidth classes as they are all not on the same bandwidth plan!
Would it be possible to assign by IP? for example my largest client is 1 Mbps. if so i would appreciate it if you could please lets talk via email as its
more convenient there than here for me. i have about 4 or 5 clients that are very greedy and don't take what they should! with this i believe they will be
streamlined into a particular bandwidth pattern right?
Also i have also installed a few scripts on my Mikrotik and they are as follows:
1. Bandwidth stabilizer script
2. script to block spam on port25
3. script to block youtube
4. script to block skype
5. script to block conflick virus in mikrotik
6. script for full bandwidth management parent queue tree
7. script to block p2p
8. script to prioritize browsing in mikrotik
9. scripts for web-proxy
I would like to know if i have to reset the Mikrotik and then start fresh with only a few scripts? if yes then please tell me the scripts that i should not use again and
the ones i can use.
First I would like to tell you, do not use too much method without actually know how it all works. It will make your router confused and can be make a problem. Remember Not all the methods can work by synergy, it probably make bandwidth management to be useless
DeleteThank you i have tried it out without many of the above named scripts and it was quite slow and to be sincere i was not even at peak hour at the time of test with the peak load!
DeleteI dont know what todo as i have gone back to the last configuration i have which is the above listed as it does work for me and the network is not too sluggish, but i would love to improve on this! is there anything you can do for me?
Please????
I only used the following scripts with your own.
Delete1. script to block spam on port25
2. script to block skype
3. scripts for web-proxy
wait fot that i am still research the combination methods using proxy for make it better!
DeleteWould you want me to post the scripts i use for the above mentioned 3? so that it would make things easier knowing if i made a mistake or something?
DeleteIt just a reference for you, surely you can expand according to your network, let you check on this link http://agratitudesign.blogspot.com/2014/01/squid-proxy-server-side-clients-with.html
DeleteDi tunggu jg bos settingan script web-proxy, sukses slalu bos. :D
ReplyDeleteSebelumnya terima kasih atas kunjungannya! bisa di cek pada artikel terbaru yang sudah saya buat, mudah2 bisa bisa menjadi pembanding dan referensi bagi anda. Selamat mencoba!
DeleteMas mau nanya bearti kalo untuk mikrotik V6 global in dan out diganti jadi apa ?
ReplyDeletesoalnya kalo di MT 6 tidak ada opsi Tsb
dari teori sih menjadi seperti ini!
Delete/ip firewall mangle
add action=mark-connection chain=input disabled=no in-interface=ether1 new-connection-mark=all-inconn passthrough=yes comment="CONNECTION-IN"
add action=mark-packet chain=input connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPLOAD"
add action=mark-connection chain=postrouting disabled=no out-interface=wlan1 new-connection-mark=all-outconn passthrough=yes comment="CONNECTION-OUT"
add action=mark-packet chain=postrouting connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNLOAD"
/queue tree
add name=Upstream parent=global queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=2M
add name=Downstream parent=global queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=2M
yang lainnya mengikuti cara ini, silahkan disesuaikan!
om, saya setting bandwith dengan queue tree, dan bandwith Download dan Upload 2Mbps/512Kbps, nah di sini saya setting seperti ini
ReplyDelete/ip mangle add chain=forward Src.Address=192.168.2.0/24 Action=mark connection new-connection-mark=Clients Passthrough=yes
/ip mangle add chain=forward Connection-mark=Clients Action=mark packet new-connection-mark=Clients Passthrough=yes
/queue types add name="pcq-download" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
/queue types add name="pcq-upload" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
/queue tree add name=Download Parent=ether2-lan Packet-marks=Clients queue-type=pcq-download priority=8
/queue tree add name=Upload Parent=ether2-speedy Packet-marks=Clients queue-type=pcq-upload priority=8
seperti itu setting punya saya, nah di sini saya bingung dengan min.limit dan max.limit, untuk pembagiannya
apakah setting di atas sudah benar atau kurang tepat.
komputer ada 15buah
bli tut tiang juga pk mikrotik os tapi di pasangin ma temen ,,, mikrotik + luscha proxy,,, yg tiang pingin tanyakan,, di pengaturan proxy ma mikrotik saat main game terkadang ngeleg n lambat,,, tiang pk speedy 2mb... jika berkenan tolong cek apa ada kesalahan setingan atau gimana ..(minta fb atau emailnya mas) biar tiang bisa add suksuma
ReplyDeleteabout bandwidth management am using pppoe connections with profile 1 and profile 2 ... profile 4. each profiles have different speed.
ReplyDeleteso the question is how can i make your client 1 works with profile 1...etc
please replay to me any thing
in-interface itu apa yah mas ???
ReplyDeletein-interface: terminal masuk paket2 koneksi internet
DeletePak Ketut,
ReplyDeleteUntuk settingan Complete Queue Tree for Dynamic and Static IP ini apakah sudah otomatis bandwidth terbagi perclient? Dan untuk game facebook (poker, Perjuangan Semut) juga sudah otomatis terlimit juga?
Terima kasih diucapkan atas jawabannya.
Salam,
Harris
pak ketut,
ReplyDeleteijin bertanya, soalnya baru belajar mikrotik, kondisinya
eth1: modem dengan pppoe client
eth2: lan
setinggan mangle gmn yg
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=ether1 new-connection-mark=all-inconn passthrough=yes comment="CONNECTION-IN"
add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPLOAD"
add action=mark-connection chain=forward disabled=no out-interface=wlan1 new-connection-mark=all-outconn passthrough=yes comment="CONNECTION-OUT"
add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNLOAD"
pak kalo untuk memisahkan browsing lokal dan internasional gmn scriptnya?ada rencana bikin tut nya kedepan?
ReplyDeleteselama setahun ini setingan queue tree dengan model dinamik ip address nyaman dan lancar...dengan pemisaahn trafic browsing speed unlimit, download dan streaming speednya dilimit.... cuma akhir2 ini ada kendala sejak ada user yang senang download abis2an. klo downloadnya saya limit yang lain juga ikut kelimit,,,...pinginnya membuat queue tree kusus untuk user tersebut cuma tetap dengan ip dinamik... bisa gak ya bli...? suksma
ReplyDeleteI have a asterisk PBX, the example works for all other office clients but doesn't prioritize bandwidth for calls using G729 codec... when I apply this example all the call goes down.. so I disable the PCQ rules
ReplyDeletegan ane sudah pasang script seperti tutorial diatas. tapi yg jalan hanya UPSTREAM saja di queue tree. untuk downstream, browsing tidak jalan. solusinya gmn pak Ketut Agus Suardika ? mohon bantuanya pak
ReplyDeletecek manglenya dulu, ada salah ketik, pada chain=forward, harusnya memakai in-interface=wlan/public untuk downsteamnya, atau coba di lihat kembali saya sudah update. Sebagai pembanding lihat pada comment thread pak haris dibawah!
DeleteThis comment has been removed by the author.
ReplyDeletemisalkan bandwith kita 1mb ups dan 10mb donw. gimana pengaturan pcq rate pada queue type, dan juga besaran parent dan child pada masing2 queue treenya?
ReplyDeletethanks
wih....! gede sekali speed downloadnya, berapaan beli mas? mau dibagi berapa client nih, untuk hotspot juga?
DeleteHi, I'm from Brazil I want to know how to use this rule with 1mb upload and 10mb down to the hotspot. I want to use free navigation and limited video and downs. thank you
DeletePak Ketut,
ReplyDeleteSekedar sharing saja, script ini sudah saya coba tapi tetep saja tidak berjalan sebagaimana mestinya, mengingat prioritynya sering tidak berjalan. Mohon solusinya.
Salam,
Harris
Ga bekerjanya dimana? nama2 interfacenya apa? qos ros versi berapa ? ini saya terapkan pada versi V.5+, Untuk V.6+ saya ragu code ini bisa berjalan dengan tepat/normal. Kl masih dalam V5+ kebawah, coba cek yang pertama dulu
Delete/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=ether1 new-connection-mark=all-inconn passthrough=yes comment="CONNECTION-IN"
add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPLOAD"
add action=mark-connection chain=forward disabled=no out-interface=wlan1 new-connection-mark=all-outconn passthrough=yes comment="CONNECTION-OUT"
add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNLOAD"
sesuaikan interfacenya, terlebih dahulu
Terima kasih sebelumnya Pak Ketut atas responsnya, walo agak lama, hehehe... Mungkin karena kesibukannya...
DeleteSaya pake routerboard 450G Lisence Level 5, Bandwidth 2 MB, user 10 orang, Profile Warnetnya Game Online include Browsing. Untuk interfacenya sebagai berikut : Ether 1 = 01.Public & Ether 2 = 02.Local, Scripnya :
1. /ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=01.Public new-connection-mark=all-inconn passthrough=yes comment="CONNECTION-IN"
add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPLOAD"
add action=mark-connection chain=forward disabled=no out-interface=02.Local new-connection-mark=all-outconn passthrough=yes comment="CONNECTION-OUT"
add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNLOAD"
=============================================================================================================================
2./queue type
add name=pcq_upstream kind=pcq pcq-rate=256k pcq-classifier=src-address
add name=pcq_downstream kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_game kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_browsing kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_download kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_undefined kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_extensions kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_video kind=pcq pcq-rate=200k pcq-classifier=dst-address
add name=pcq_p2ptorrent kind=pcq pcq-rate=150k pcq-classifier=dst-address
==============================================================================================================================
3./queue tree
add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=2M
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=2M
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=125k max-limit=512k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=125k max-limit=512k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=125k max-limit=512k
add name=3.1.Undefined parent=3.Download queue=pcq_undefined packet-mark=all-outpkt priority=4 limit-at=75k max-limit=320k
add name=3.2.Extensions parent=3.Download queue=pcq_extensions packet-mark=dpkt priority=5 limit-at=75k max-limit=320k
add name=3.3.Video parent=3.Download queue=pcq_video packet-mark=spkt priority=6 limit-at=75k max-limit=320k
add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=75k max-limit=320k
===============================================================================================================================
Mohon dikoreksi apabila memang dari saya ada kesalahan didalam penentuan interfacenya, karena pada penerapannya PB atau games online lainnya lag semua, dan browsingnya lambat sekali. Atas jawabannya saya mengucapkan banyak terima kasih
Salam,
Harris
Terima kasih juga pak Harris sudah mengikuti perjalanan blog saya.
DeletePertanyaan pak harris menyegarkan kembali ingatan saya terhadap permasalahan lag. Lag pada game terjadi karena ping yang membesar yang sering terjadi karena jatah bandwidth yang terkuras habis. Sederhananya kl game tidak ingin lag, bandwidth jangan sampai habis sekali, ini menyebabkan ping dengan request timed out(RTO) gimana gak lag jika ini berlangsung lama. Jika memang tidak ada pilihan video streaming bisa ditekan dengan keras...!
Ok coba dicek apakah rule ini bekerja, cek di mangle ya!
##################################
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=02.Local new-connection-mark=all-inconn passthrough=yes comment="UPSTEAM CONNECTION"
add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=all-inpkt passthrough=yes comment="UPSTEAM"
add action=mark-connection chain=forward disabled=no in-interface=01.Public new-connection-mark=all-outconn passthrough=yes comment="DOWNSTEAM CONNECTION"
add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=all-outpkt passthrough=yes comment="DOWNSTEAM"
Jika sudah bekerja, habis itu lanjutkan dengan variasi jenis koneksinya, dalam beberapa kasus, extension dan streaming sama2 rakus, jadiin satu saja bila dirasa perlu
Delete#################################
script layer7 download extension dan streaming
misalnya mau digabung, menjadi sperti ini
/ip firewall mangle
add action=mark-packet chain=forward layer7-protocol=high packet-mark=all-outpkt new-packet-mark=hpkt passthrough=no comment="CLIENT DOWNLOAD"
add action=mark-packet chain=forward layer7-protocol=document packet-mark=all-outpkt new-packet-mark=hpkt passthrough=no comment=""
/ip firewall mangle
add action=mark-packet chain=forward layer7-protocol=youtube packet-mark=all-outpkt new-packet-mark=hpkt passthrough=no comment="CLIENT VIDEO"
add action=mark-packet chain=forward layer7-protocol=streaming packet-mark=all-outpkt new-packet-mark=hpkt passthrough=no comment=""
script port gameonline, harus tau portnya kl ada game yang belum masuk
/ip firewall mangle
add action=mark-packet chain=forward connection-bytes=0-1000000 passthrough=no packet-mark=all-outpkt new-packet-mark=bpkt protocol=tcp comment="CLIENT BROWSING"
script layer 7 torrent
/ip firewall mangle
add action=mark-packet chain=forward layer7-protocol=bittorrent packet-mark=all-outpkt new-packet-mark=tpkt passthrough=no comment="BILLING BIT TORRENT"
add action=mark-packet chain=forward layer7-protocol=torrentsites packet-mark=all-outpkt new-packet-mark=tpkt passthrough=no comment="BILLING TORRENT WEBSITES"
add action=mark-packet chain=forward p2p=all-p2p packet-mark=all-outpkt new-packet-mark=tpkt passthrough=no comment="BILLING ALLP2P"
add action=mark-packet chain=forward dst-port=58561,58045,14948,58008,58816,59097 packet-mark=all-outpkt new-packet-mark=tpkt passthrough=no protocol=tcp comment="BILLING TORRENT PORT"
Jika torrent tidak diperlukan hapus saja untuk optimasi bandwidth, ini akan bergabung ke residual
##################################
Delete/queue type
add name=pcq_upstream kind=pcq pcq-rate=512k pcq-classifier=src-address
add name=pcq_downstream kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_game kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_browsing kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_download kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_residual kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_hardsteam kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_p2ptorrent kind=pcq pcq-rate=150k pcq-classifier=dst-address
Ini diatur2 nanti besarannya, sebab ini sangat pada stabil tidak koneksi isp, kl dedicated sih gampang ngaturnya
##################################
/queue tree
add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=1500k
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=1500k
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=125k max-limit=512k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=125k max-limit=512k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=125k max-limit=512k
add name=3.1.Hardsteam parent=3.Download queue=pcq_hardsteam packet-mark=hpkt priority=5 limit-at=75k max-limit=256k
add name=3.2.Residual parent=3.Download queue=pcq_video packet-mark=all-outpkt priority=6 limit-at=75k max-limit=256k
add name=3.3.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=75k max-limit=256k
siang pak ketut,
Deleteterima kasih sekali sebelumnya, krn dengan ada nya blog ini, saya pribadi merasa sangat terbantu, karena bisa sambil belajar melalui blog bapak, terutama untuk yang baru sperti saya, otodidak.. he he he
ada beberapa hal yang mau saya tanyakan pak,,
1. /queue tree add name=a.Upstream parent=global-in
add name=b.Downstream parent=global-out
bila kita menggunakan Router Versi 6.xx keatas,, parent tersebut kita gunakan yang mana pak?
makasih sbelum nya..
agus pramono
Blognya sangat bagus pak Ketut, terutama untuk pemula bagi saya. Setelah membaca replynya langsung saya action, dan hasilnya sukses pak Ketut (tidak ada lag). Namun ada yang hilang sedikit untuk script seperti dibawah ini
ReplyDelete/ip firewall mangle
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=5340-5352,6000-6152,10001-10011,14009-14030,18901-18909 comment="CLIENT ONLINE GAMES"
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=39190,27780,29000,22100,10009,4300,15001,15002,7341,7451
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=40000,9300,9400,9700,7342,8005-8010,37466,36567,8822
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=47611,16666,20000,5105,29000,18901-18909,9015
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005,27015
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005-27020,13055,7800-7900,12060-12070
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=8005-8010,9068,1293,1479,9401,9600,30000
add action=mark-packet chain=forward packet-mark=all-outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=14009-14030,42051-42052,40000-40010,13000-13080
Apakah memang ditiadakan? Terima kasih sebelumnya pak Ketut.
Salam,
Harris
Kl queue treenya memakai mark-packet=gpkt, itu artinya kita harus membuatkan marking di manglenya, kl ga gitu kan percuma membuat queue treenya. Maksud saya diatas menggunakan script 7 dan mangle untuk marking connection packetnya, jd dilengkapi juga sesuai yang dibuat pada queue tree. Logikanya begini pak harris,
DeleteJika bandwidth adalah sebuah kebun binatang, game adalah kelinci, browsing adalah ayam, maka ular dan macannya kita isolasi disebuah kandang, bisa saja kelinci dan ayamnya diluar tanpa kandang lagi, asalkan yakin binatang buas semuanya sudah terisolasi dengan baik. Untuk amannya buatkan saja lagi kandang untuk kelinci. Lainnya halnya jika anda membenci macan dan ular jadiin satu saja mereka biar saling gigit, didalam sebuah kandang :)
Perlu diketahui marking dari variasi jenis koneksi ini adalah pendekatan secara umum, jadi tidak equivalent yang mungkin kita bayangkan.
Untuk memberikan nafas panjang pada kapasitas bandwidth yang kita miliki, kita bisa membuatkan system proxy dan dns server pada network kita. Dns server bekerja seperti angin yang segar, sedangkan proxy server seperti air hujan yang mengalir ke sungai. Terima kasih pak haris!, saya juga banyak belajar juga dari ide, pertanyaan dari para komentator di blog ini, yang sebenarnya saya pribadi sudah merasa cukup!
DeletePak Ketut overall saya sangat terbantu diblog ini, sekali lagi saya ucapkan banyak terima kasih atas quick respons jawabannya. Semoga tidak bosan ya Pak, hehehe... Sukses Pak, di tunggu Update-update untuk mikrotiknya.
DeleteSalam,
Harris
udah pernah di coba untuk berapa client Pak Ketut?Dan bagaimana dengan Ping masiing2 client?
ReplyDeleteBanyak faktor yang memperngaruhi keadaan ping, apalagi jika menggunakan proxy server. Saya baru saja melakukan optimasi system pc pada network terutama pada proxy server yang masih menggunakan system windows hasilnya lumayan walaupun memakai koneksi dial-up usb modem, bahwa membangun proxy server dikomputer yang tidak sehat bs menjadi bumerang juga. Saya kira system windows dan besar kecilnya memory pada pc pun bs mempengaruhi, ini akan terasa jika jatah bandwidth yang isp dibawah 1 M dengan throughput yang rendah. Jadi jika saya anggap kita sudah membagun system network yang ideal, Jika ping sudah diatas 500 ms kecilkan saja download dan dan video streamnya.
DeletePak Ketut, saya ingin tanya, kami punya Bandwidth Download & Upload 1:1 terdiri dari Domestik Up 10Mbs & DL 10Mbs, Internasional UP 5Mbs & DL 5Mbs (ASTINET).
DeleteBagaimana penerapan memakai Script di atas untuk koneksi kami tersebut?
Terima Kasih sebelumnya
Maksudnya disana menggunakan 2 provider?
DeleteThis comment has been removed by the author.
ReplyDeletehii ketut I own the issuance of mikrotik v.6 and i want to modify the code to suit me
ReplyDeletepa ketut saya mau nanya...saya pke setingan di atas tetapi game pb dan game lainnya lag dan juga browsing dan youtube jadi lambatdan juga trafic client online gamesnya tidak jalan traficnya 0 terus ...bw 3mb untuk 15 cpu..mohon pencerahannya pa sebelumnya terima kasih..
ReplyDelete/queue type
add name=pcq_upstream kind=pcq pcq-rate=256k pcq-classifier=src-address
add name=pcq_downstream kind=pcq pcq-rate=512k pcq-classifier=dst-address
add name=pcq_game kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_browsing kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_download kind=pcq pcq-rate=256k pcq-classifier=dst-address
add name=pcq_undefined kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_extensions kind=pcq pcq-rate=180k pcq-classifier=dst-address
add name=pcq_video kind=pcq pcq-rate=200k pcq-classifier=dst-address
add name=pcq_p2ptorrent kind=pcq pcq-rate=150k pcq-classifier=dst-address
/queue tree
add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=3M
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=3M
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=128k max-limit=720k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=128k max-limit=720k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=128k max-limit=720k
add name=3.1.Undefined parent=3.Download queue=pcq_undefined packet-mark=all-outpkt priority=4 limit-at=85k max-limit=420k
add name=3.2.Extensions parent=3.Download queue=pcq_extensions packet-mark=dpkt priority=5 limit-at=85k max-limit=420k
add name=3.3.Video parent=3.Download queue=pcq_video packet-mark=spkt priority=6 limit-at=85k max-limit=420k
add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=85k max-limit=420k
Kasus yang sama dengan saya diatas, ikuti saja bro chat saya dengan pak ketut disitu ada revisi yang diberikan langsung. Tks selamat mencoba.
DeleteSalam,
Harris
Salam...
ReplyDeleteSetelah baca dari awal ampe habissss... akhirnya dpt ilmu knuragan baru... :P
sya lagi bngun RTRWnet ne gan! nah.. saya punya BW dedicated 1:1 = 1MB.
rencananya mw disebar lewat hotspot aja ne..
kira2 mnurut agan gmn yg pas buat queue treenya?
satu lagi gan.. sya dpt 12 IP Publik nganggur... msh bingung mw didstribusikan bwt apa.. apa bisa 12 IP publik didstribusikan dlm 1 Router (saya pake RB 750) ? klo bisa, sekalian scriptnya dunk gan... hehehe
1 ISP (12 ip publik nganggur) ====> eth1 > router (RB750) =====> Client-hotspot (eth5)
trims....
Pak Ketut Saya punya bandwith 2mbps download 512kbps.. gimana setting queue tree untuk game online + browsing. (streaming jg kl bs lancar) tlg penjelasannya Pak Ketut. kl bisa cara setting + script nya di kirim ke email prince_p054y@yahoo.co.id atau di jelasin dsni jg gpp. Saya Pemula. terima kasih pak Ketut
ReplyDeleteOh iya user aktif ada 10 Pak Ketut
DeleteSalam kenal Pak Ketut,
ReplyDeleteSebelumnya terima kasih telah berbagi ilmunya, sedikit testi untuk settingan ini berjalan baik sekali dan sudah sy pakai di RB750GL v.5xx dengan bandwidth iix = 5MB dan int'l = 1MB dengan user krg lbh smp 25, tetapi kurang lbh 2 bulan yg lalu sy upgrade ke v.6.18 dan ternyata ada bbrp yg hrs diedit agar bisa kembali berjalan seperti sblmnya.
ooh..iya sedikit masukkan untuk script torrentnya msh bisa dijebol dan sy msh coba ngoprek2 lg untuk menyempurnakannya.
Salam,
ApuL
Pak Ketut, salam kenal sebelumnya. Saya coba setting diatas dengan mengikuti perubahan seperti yang bro harris lakukan, namun pada games kenapa tidak jalan ya?. Mohon dikoreksi pak ketut. Scriptnya seperti dibawah :
ReplyDelete/queue tree
add name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=1500k
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=1500k
add name=1.Games parent=b.Downstream queue=pcq_game packet-mark=gpkt priority=1 limit-at=125k max-limit=512k
add name=2.Browsing parent=b.Downstream queue=pcq_browsing packet-mark=bpkt priority=2 limit-at=125k max-limit=512k
add name=3.Download parent=b.Downstream queue=pcq_download packet-mark=all-outpkt priority=3 limit-at=125k max-limit=512k
add name=3.1.Hardsteam parent=3.Download queue=pcq_hardsteam packet-mark=hpkt priority=5 limit-at=75k max-limit=256k
add name=3.2.Residual parent=3.Download queue=pcq_video packet-mark=all-outpkt priority=6 limit-at=75k max-limit=256k
add name=3.3.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=75k max-limit=256k
Sore pak ketut salam kenal, wah mantap pak blognya..:) menjadi bahan refern bljr mikrotik yg lengkap..
ReplyDeletePak ketut sy mau tanya bgmn share/pembagian yg pas jika mempunyai bandwith upload upto 1mbps dan donlot upto 6 mbps. (kalo sy bypass bs sampai 9mbps) isp:fa*tnet.
"noted: ditmpt sy kerja mempunyai bandwith diatas.
Dr settingan pak ketut sdh sy implementasikan dan ada perubahan sedikit pd ethernet (ether1: isp/publik, ether2: local/client).., namun blm optimal. Sisi yg ingin sy optimal kan pd browsing dan donlot namun tetap tercontrol pd sisi donlotnya.
Semoga dpt pencerahan dr pak ketut..
Salam,
Anggoro W
Salam kenal dan mohon maaf sebelumnya,
ReplyDeleteapabila ingin membagi bandwitch sesuai dengan ip masing2 atau mac masing2 client bagaimana ? untuk upstream, downstream dan streaming.
maksud saya untuk ip 1-3 diberikan downatream 256k, upstream 32k dan streaming 32k, untuk ip 4-6 diberikan downstream 384k, upstream 64k dan streaming 32k untuk ip 7-10 full access tanpa batasan.
untuk ip 1-6 dibatasi tidak bisa borwshing kecuali yahoo, google, dll (website yang diperbolehkan) dan juga email. serta YM aktif.
untuk ip 7-10 bebas akses intrenet
terima kasih
ynnrny@gmail.com
Salam kenal dan mohon maaf sebelumnya,
ReplyDeleteapabila ingin membagi bandwitch sesuai dengan ip masing2 atau mac masing2 client bagaimana ? untuk upstream, downstream dan streaming.
maksud saya untuk ip 1-3 diberikan downatream 256k, upstream 32k dan streaming 32k, untuk ip 4-6 diberikan downstream 384k, upstream 64k dan streaming 32k untuk ip 7-10 full access tanpa batasan.
untuk ip 1-6 dibatasi tidak bisa borwshing kecuali yahoo, google, dll (website yang diperbolehkan) dan juga email. serta YM aktif.
untuk ip 7-10 bebas akses intrenet
terima kasih
ynnrny@gmail.com
Salam kenal pak ketut dan mohon maaf sebelumnya
ReplyDeletesaya ingin memblokir yautube menggunakan seperti ini
/ip firewall layer7-protocol
add name="BLOK YOUTUB" regexp="^.+(youtube.com).*\$"
/ip firewall filter
add action=drop chain=forward comment=BLOK-YT disabled=no layer7-protocol=\
"BLOK YOUTUB" src-address=192.168.100.0/24 time=\
7h-23h,sun,mon,tue,wed,thu,fri,sat
setlah saya test mengunakan PC,Lepto mau Henpon terblok terblokir , tapi menggapa Aplikasi Playstore Android dan aplikasi Gmail android ikut terblokir juga... Mohon Pak ketut Pencerahan nya
Pak ketut saya maut Tanya lagi ni….Saya mempunyai Mikrotik Router Type RB750 dan Wifinya menggunakan TP LINK WA5210G padahl sdah sya limit
ReplyDelete/ip firewall layer7-protocol add name="EXE" regexp="\\.(exe)"
/ip firewall layer7-protocol add name="MOV" regexp="\\.(mov)"
/ip firewall layer7-protocol add name="AVI" regexp="\\.(avi)"
/ip firewall layer7-protocol add name="FLV" regexp="\\.(flv)"
/ip firewall layer7-protocol add name="MP3" regexp="\\.(mp3)"
/ip firewall layer7-protocol add name="MP4" regexp="\\.(mp4)"
/ip firewall layer7-protocol add name="APK" regexp=\\.(apk)"
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="EXE MARK PACKET " disabled=no \
layer7-protocol=EXE new-packet-mark=EXE passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MOV MARK PACKET " disabled=no \
layer7-protocol=MOV new-packet-mark=MOV passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="AVI MARK PACKET " disabled=no \
layer7-protocol=AVI new-packet-mark=AVI passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="FLV MARK PACKET " disabled=no \
layer7-protocol=FLV new-packet-mark=FLV passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MP3 MARK PACKET " disabled=no \
layer7-protocol=MP3 new-packet-mark=MP3 passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MP4 MARK PACKET " disabled=no \
layer7-protocol=MP4 new-packet-mark=MP4 passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="APK MARK PACKET " disabled=no \
layer7-protocol=APK new-packet-mark=APK passthrough=no
/queue tree add name="LIMIT FILE EXTENTION" parent=global-out \
limit-at=0 priority=3 max-limit=210000 burst-limit=\
0 burst-threshold=0 burst-time=0s
/queue tree add name="AVI" parent="LIMIT FILE EXTENTION" \
packet-mark=AVI limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="EXE" parent="LIMIT FILE EXTENTION" \
packet-mark=EXE limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="FLV" parent="LIMIT FILE EXTENTION" \
packet-mark=FLV limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MOV" parent="LIMIT FILE EXTENTION" \
packet-mark=MOV limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MP3" parent="LIMIT FILE EXTENTION" \
packet-mark=MP3 limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MP4" parent="LIMIT FILE EXTENTION" \
packet-mark=MP4 limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="APK" parent="LIMIT FILE EXTENTION" \
packet-mark=APK limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
Kalau saya test Donwload Menggunakan Leptop dan PC file2 tersebut terlimit berwarna merah,
Yang Saya binggungkan kenapa file-file tersebut seperti APK,EXE AVI,MP3,FLV dan file2 lainya lolos tidak terlimit apabila sesorang mendonload menggunakan HP Android,Tablet dan HP Blacbery yg memakai fasilitas WIFI, mohon petunjuknya pak, terima kasih sebelumnya
Pak ketut saya mau Tanya lagi ni….Saya mempunyai Mikrotik Router Type RB750 dan Wifinya menggunakan TP LINK WA5210G padahl sdah sya limit
ReplyDelete/ip firewall layer7-protocol add name="EXE" regexp="\\.(exe)"
/ip firewall layer7-protocol add name="MOV" regexp="\\.(mov)"
/ip firewall layer7-protocol add name="AVI" regexp="\\.(avi)"
/ip firewall layer7-protocol add name="FLV" regexp="\\.(flv)"
/ip firewall layer7-protocol add name="MP3" regexp="\\.(mp3)"
/ip firewall layer7-protocol add name="MP4" regexp="\\.(mp4)"
/ip firewall layer7-protocol add name="APK" regexp=\\.(apk)"
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="EXE MARK PACKET " disabled=no \
layer7-protocol=EXE new-packet-mark=EXE passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MOV MARK PACKET " disabled=no \
layer7-protocol=MOV new-packet-mark=MOV passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="AVI MARK PACKET " disabled=no \
layer7-protocol=AVI new-packet-mark=AVI passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="FLV MARK PACKET " disabled=no \
layer7-protocol=FLV new-packet-mark=FLV passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MP3 MARK PACKET " disabled=no \
layer7-protocol=MP3 new-packet-mark=MP3 passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="MP4 MARK PACKET " disabled=no \
layer7-protocol=MP4 new-packet-mark=MP4 passthrough=no
/ip firewall mangle add action=mark-packet \
chain=prerouting comment="APK MARK PACKET " disabled=no \
layer7-protocol=APK new-packet-mark=APK passthrough=no
/queue tree add name="LIMIT FILE EXTENTION" parent=global-out \
limit-at=0 priority=3 max-limit=210000 burst-limit=\
0 burst-threshold=0 burst-time=0s
/queue tree add name="AVI" parent="LIMIT FILE EXTENTION" \
packet-mark=AVI limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="EXE" parent="LIMIT FILE EXTENTION" \
packet-mark=EXE limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="FLV" parent="LIMIT FILE EXTENTION" \
packet-mark=FLV limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MOV" parent="LIMIT FILE EXTENTION" \
packet-mark=MOV limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MP3" parent="LIMIT FILE EXTENTION" \
packet-mark=MP3 limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="MP4" parent="LIMIT FILE EXTENTION" \
packet-mark=MP4 limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="APK" parent="LIMIT FILE EXTENTION" \
packet-mark=APK limit-at=0 queue=default priority=1 max-limit=\
0 burst-limit=0 burst-threshold=0 burst-time=0s
Kalau saya test Donwload Menggunakan Leptop dan PC file2 tersebut terlimit berwarna merah,
Yang Saya binggungkan kenapa file-file tersebut seperti APK,EXE AVI,MP3,FLV tidak bisa terlimit apabila sesorang mendonload menggunakan HP Android,Tablet dan HP Blacbery yg memakai fasilitas WIFI, mohon petunjuknya pak, terima kasih sebelumnya
klu setingan di atas ditambahin web proxy internal gmana mas cara nya tolong mas butuh bgt.......
ReplyDeletehi Sir i have 8+8=16mb doul wan load balancing in pc please adjust and mange this Complete Queue Tree for Dynamic and Static IP plan with my speed limit
ReplyDeletewaiting for your replay :)
thanks
Bli saya sudah coba script ini dan manjur walau agak diubah dikit karena menyesuaikan ros v6. Dan yang ingin saya tanyakan bagaimana menerapkan script ini bli untuk subnet yang berbeda misalnya untuk lan : 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0/24 atau berdasarkan port ether2, ether3, ether4, ether5
ReplyDeleteMaaf agak lama menjawab pertanyaannya! akhir-akhir ini saya sedang sibuk dengan permasalahan kerja. Mas abdi sudah coba membuat 6 rule masquerading on Nat firewall dan lanjutkan dengan masing2 mangle rulenya
Deleteeh kok 6 :) lol maksudnya 4 masqurade network for 4 different subnet mask network clients
DeleteSir Ketut Agus Suardika, can you create a scrips like this with Upload limit for Browsing?
ReplyDeletewhere are from John ? you can try this, but I have not applied yet!
Delete/ip firewall mangle
add action=mark-packet chain=prerouting connection-bytes=0-1000000 dst-port=80,443 passthrough=no new-packet-mark=up-bpkt packet-mark=all-inpkt protocol=tcp comment="CLIENT UPLOAD BROWSING"
and get "up-bpkt" to your queue tree
gimana cara nya agar pc(misal pc billing) tidak terlimit rule queue diatas, apa yang perlu ditambahkan
ReplyDeletesebagai alternatif saudara bisa mendifinisikan secara tersendiri mangle rule dari IP PC billing atau bisa juga mengecualikan IP billling pada address list
DeleteBang Ketut, saya mau melanjuti pertanyaan bang jamaludin karena type pertanyaannya sama.
Deletepengaturan di QT (Queue Tree) bagi IP PC Billing sebagai parentnya bagaimana? apakah sebagai berikut:
Downstream
-Billing
-Client
--Games
--Browsing
Thank you sir Ketut Agus Suardika, i will try it. Im from Philippines.
ReplyDeletebli saya mw tanya setingan mikrotik yang bagus untuk game online seperti (fifa3,pb garena), brosing dan youtube, download dengan kapasitas bandwith 5MB memakai skrip yang mana yg bagus ya bli.terima kasih banyak bli
ReplyDeletehi
ReplyDeletei have wireless network withe hotspot and user-manager
i have 5 adsl pppoe every one is 4m
how i can use this withe my network ?
my ethernet
in -
out-
terimakasih banyak mas sangat membantu
ReplyDeleteHallo Bang Ketut,
ReplyDeletesebelumnya makasih atas ilmunya, kebetulan saya sedang mencari refrensi tentang Queue Tree untuk di kantor saya, dan soal setting di atas saya ada pertanyaan.
1. untuk limit bandwithnya saya kurang paham, contoh untuk bandwith game, di pcq game si set 256k dan di QT game di set Limit at 125 k + Max limit 512k. brp bandwithnya untuk sisi game?
2. bila saya ada beberapa IP yang mau saya lost koneksinya sementara bagaimana cara? misal PC 1 terlimit terkena limit download 256k dan minta di lost atau di naikan limitnya, ada cara?
3. bila saya mau menambahkan IP khusus yang di luar rule sudah di set, di QT-nya apakah selevel "Downstream" atau childnya "Downstream" baiknya saya set?
Sementara itu dulu pertanyaan saya, saya harap bisa dibantu di jawab, Terima kasih
Hallo Sir, I have a question on the Configurations of this setup. Is ether1 your WAN or LAN interface? please assist. Thank you. By the way nice work you are doing keep up the spirirt.
ReplyDeleteSebelumnya terimakasih. artikelnya sangat membantu.
ReplyDeleteBli kalo misalkan kita punya bandwidth up to 8Mbps gimana kira2 pengaturan pcq rate pada queue type,dan limit at & max limit pada queue tree.
tolong bantuannya, masih baru di dunia jaringan.
thanks.
halo mas ketut
ReplyDeletemau tnaya ni.. klau internet dengan kapasitas speed nya 256 kbps itu gimaan cara setingannya seperti diatas mohon petunjuknya.. terimasih atas bantuannya
/queue tree
ReplyDeleteadd name=a.Upstream parent=global-in queue=pcq_upstream packet-mark=all-inpkt priority=8 max-limit=2M
add name=b.Downstream parent=global-out queue=pcq_downstream packet-mark=all-outpkt priority=8 max-limit=2M
maksudnya Global IN itu apa ya??
dan Global Out nya.. Soalnya tidak ada pilihan!!
tq
Salam kenal pak Ketut,
ReplyDeletesaya mau tanya nih, jika kita memiliki bandwith v-sat 1Mb skir 1:4
saya mau atur untuk penggunaan Warkop dengan menggunakan sistem Hotspot user maneger, nah saya mau settingan bandwithx di bagirata sesuai user yang aktif, jika 1 user yang aktif maka dia kanan mendapatkan 1 Mb full, dan juka ada 2 user maka masing2 akan dapat 512kbps dan seterusnya, artinya bandwith terbagi sebara otomatis. sy sdh coba2 tutorial2 yang ada di internet tapi tdk bekerja dan membuat bingung. tolong bantuannya.
MikroTik How to Bandwidth Control
ReplyDeleteThank you Mr. Ketut Agus Suardika for your script and tutorials.
I have a MikroTik Router 450G. ether1 is Main Fiber Optic Connection; ether2 Fail-Over Radio Connection; ether3 is LAN= 192.168.103.1/24, DHCP server enabled; ether4 is LAN = 192.168.101.1/24 DHCP server enabled; ether5 is LAN = 192.168.102.1/24, DHCP server enabled. I have total 9 Mbps dedicated internet line.
I want to set maximum bandwidth for ether4 = 3 Mbps and I want to enable your script "Complete Queue Tree for Dynamic and Static IP" for this ether4.
I want to set maximum bandwidth for ether3 = 3 Mbps and I want to enable your script "Complete Queue Tree for Dynamic and Static IP" for this ether3. And I also want that a specific IP 192.168.103.15/24 for ether3 to receive dedicated 1 Mbps speed always.
I want to set Unlimited bandwidth for ether5 = 9 Mbps and I want to enable your script " Complete Queue Tree Without Queue Simple Mikrotik" for this ether5 for 5 IP address, and other IP address will get the maximum internet speed.
Is Possible to do in MikroTik 450G Router?
Thank you for your time and help that you have done to me.
Malem bli, Terimakasih atas beberapa tuts yang diposting mengenai implementasi queue tree, saya ada kendala membagi bandwidth dikantor dengan rincian IX=6Mbps SGIX=15Mbps IIX=10Mbps, Kiranya bli berkenan memberikan settingan pada settingan queue type dan queue treenya, Punya bandwidth besar masih belum optimal confignya bli, maklum masih teramat junior, Makasih ya bli ...
ReplyDeleteInternet download 30Mb upload 3 Mb queue types+queue tree
ReplyDeleteTerima kasih atas ilmunya Pak Ketut bermanfaat sekali
ReplyDeletekalau saya punya bandwidth 20Mbps, bagusnya seperti apa settingannya pak, sama kalau mau di tambahkan streaming video youtube, lk21.org dan lainnya, caranya seperti apa ya pak ? mohon infonya. Terima kasih
My friend, you were the only one that I help and very please help to do.
ReplyDeleteComplete Queue Tree for Dynamic and Static IP Address For a 15m connection
Down S: 15007 Upload S: 1149
Please help me thank you very much
You are a great teacher, may God bless you and multiply your whole life.
thiago_julio_166@hotmail.com
I'm from Brazil
My friend, you were the only one that I help and very please help to do.
ReplyDeleteComplete Queue Tree for Dynamic and Static IP Address For a 15m connection
Down S: 15007 Upload S: 1149
Please help me thank you very much
You are a great teacher, may God bless you and multiply your whole life.
thiago_julio_166@hotmail.com
I'm from Brazi
Pak Ketut,, tolong buatkan scripnya la,, down 20M dan up 4M spt diatas,, saya masih bingung cara nerapkan nya pak,, makasih pak ketut
ReplyDeletehi guys,
ReplyDeletei'm reading your posts seems very healthy conversations and i'm thinking if you can help me with this:
i'd like to request for a single ISP configuration script for 5mb connection. i'm using Mikrotik HapLite primarily for:
1.Gaming (top priority)
2.Browsing (mid)
3.torrent/download (least priority)
please send me your best tweaked scripts to: ariel.ruaya@gmail.com
your help will be greatly appreciated. thank you guys and more power!
hi i copied all your setting ing to my new mikrotik haplite.. and it has errors ang the quetree did not appear? do i have to remove all the default setting in my device? befor i paste the script?
ReplyDeletehello. im from the Philippines and i have 20mbps connections how would i set the max at mim. i wnat to prioritize gaming. thnaks
ReplyDeletesir why i have this error "input does not match any value of parent"
ReplyDeleteplease help thanks!
[?] Gives the list of available commands
command [?] Gives help on the command and list of arguments
[Tab] Completes the command/word. If the input is ambiguous,
a second [Tab] gives possible options
/ Move up to base level
.. Move up one level
/command Use command at the base level
[admin@MikroTik] > /queue tree
[admin@MikroTik] /queue tree> add name=a.Upstream parent=global-in queue=pcq_upstrea
m packet-mark=all-inpkt priority=8 max-limit=2M
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=b.Downstream parent=global-out queue=pcq_down
stream packet-mark=all-outpkt priority=8 max-limit=2M
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=1.Games parent=b.Downstream queue=pcq_game pa
cket-mark=gpkt priority=1 limit-at=125k max-limit=512k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=2.Browsing parent=b.Downstream queue=pcq_brow
sing packet-mark=bpkt priority=2 limit-at=125k max-limit=512k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=3.Download parent=b.Downstream queue=pcq_down
load packet-mark=all-outpkt priority=3 limit-at=125k max-limit=512k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=3.1.Undefined parent=3.Download queue=pcq_und
efined packet-mark=all-outpkt priority=4 limit-at=75k max-limit=320k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=3.2.Extensions parent=3.Download queue=pcq_ex
tensions packet-mark=dpkt priority=5 limit-at=75k max-limit=320k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=3.3.Video parent=3.Download queue=pcq_video p
acket-mark=spkt priority=6 limit-at=75k max-limit=320k
input does not match any value of parent
[admin@MikroTik] /queue tree> add name=3.4.P2P&Torrent parent=3.Download queue=pcq_p2ptorrent packet-mark=tpkt priority=7 limit-at=75k max-limi
t=320k
pak ketut bagaimana pembagian bandwidth 15Mb dan pcq ratenya
ReplyDeleteGood day I'm from Jamaica very new to routeros can you plz assist with the script to share bandwidth equally Down=200mbps Upload=70mbps
ReplyDelete