Hi, I want to make the speed of my all users 1Mbps just when they open youtube, the speed on other sites will remain as the speed for each user. I’ve tried Layer7 (www.youtube.com), Mangle (By marking packets matched Layer7) and Queue (By making the max limit 1M for users matched by Layer7).
The problem was that 1M was shared by all youtube users, while I want to make each user used 1M when he open youtube.
I also tried using the user’s IPs by making address list, But the problem still.
Any help will be appreciated.
youtube have multiple servers so its hard to limit through IP address.
easy way try this
firs creating Queue Types for up and down
Than in Simple Queues (if u use) create 1 with target add 0.0.0.0/0 (this mean all ur users) in advanced TAP put Dst. Address:(ip address of youtube) and down select Queue Type 1mbit up and down
remember this rule has to be on top
Hi Lakis, my problem is when my users open youtube, they all shared with 1Mbps, while I want each user to have it’s own 1Mbps.
Another problem was the youtube servers had the same IP’s as Google. I solved this by using Layer7. Now, I’v just the first problem.
Thanks.
just use PCQ queue type
I used this configuration:
Layer7|Name:youtubeBW / Regexp:youtube.com
Mangle| chain:forward / Layer7protocol:youtubeBW / Action:Mark-packet / New packet mark:youtube packet/Passthrough
Queue Types| Name:PCQ / kind:pcq / Rate:1M / Classifier: Dst. Address
Simple Queue| Max limit Target Download:1M / Packet Marks:youtube packet / Target Download - queue type:PCQ
But unfortunately, the problem still. When two users open youtube, each user takes 512K.
Target Download:1M
in connection with PCQ it will take equal division of that 1M between all active users:
1 active user = 1M
2 active users = 500k (your case)
3 active users = 333k
etc.
also, you’re marking single packet with your mangle rule - seems like you should mark the whole connection, and then mark packets of that connection
Thank u Chupaka. But what u suggest me to do so each user can take 1M ?? (In some detail please)
remove ‘target download’ or set it to some high number
Still the same problem
Finally, the problem has been resolved.
But I’m facing another problem.
This method of PCQ is running per session not per user.
suggest I’ve three users, speed rate on Mikrotik is 1M, then each user can take 1M. The problem take place when one user open more than one session(more than one youtube page), here, he will take 1M for each opened page.
How can prevent a user from openning more than one youtube page??
and what was the solution?
seems like something is wrong with PCQ classifiers - recheck your config
I used Mark connection, then Mark packet to mark the whole connection, and then mark packets of that connection(As u said). Also I used the configuration as in the images(Queue Tree & Queue Types).
In PCQ classifiers, I used Src.Port and Dst.Port, I will try to use Src. Address and Distination Address.
What u suggest me to do?


in Download queue, you need to use Dst. Address classifier, in Upload - Src. Address
It works fine now, thanks alot Chupaka.
Dear alzeno / chupaka,
Can you please make a simple terminal script for the same rule as i have the exact requirement.
Thanks
Please provide configuration for this to make it work, thank you!
Hello , can you please share with us the terminal code
to see what is happing