Community discussions

MikroTik App
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Youtube Bandwidth

Sat Aug 25, 2012 10:45 am

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.
 
Lakis
Forum Veteran
Forum Veteran
Posts: 703
Joined: Wed Sep 23, 2009 7:52 pm

Re: Youtube Bandwidth

Sat Aug 25, 2012 8:30 pm

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
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Sun Aug 26, 2012 10:51 am

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Youtube Bandwidth

Tue Aug 28, 2012 3:12 am

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.
just use PCQ queue type
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Thu Aug 30, 2012 1:00 pm

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.
Last edited by alzeno on Sat Sep 01, 2012 10:20 am, edited 1 time in total.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Youtube Bandwidth

Thu Aug 30, 2012 2:47 pm

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
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Sat Sep 01, 2012 10:27 am

Thank u Chupaka. But what u suggest me to do so each user can take 1M ?? (In some detail please)
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Youtube Bandwidth

Sat Sep 01, 2012 7:59 pm

remove 'target download' or set it to some high number
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Sun Sep 02, 2012 1:42 pm

Still the same problem
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Mon Sep 03, 2012 12:08 pm

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??
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Youtube Bandwidth

Mon Sep 03, 2012 12:17 pm

Finally, the problem has been resolved.
and what was the solution?
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??
seems like something is wrong with PCQ classifiers - recheck your config
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Mon Sep 03, 2012 4:03 pm

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?
You do not have the required permissions to view the files attached to this post.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Youtube Bandwidth

Mon Sep 03, 2012 4:10 pm

in Download queue, you need to use Dst. Address classifier, in Upload - Src. Address
 
User avatar
alzeno
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Jul 14, 2011 11:01 am

Re: Youtube Bandwidth

Tue Sep 04, 2012 3:36 pm

It works fine now, thanks alot Chupaka.
 
mikrotiknow
just joined
Posts: 22
Joined: Sun Oct 26, 2008 9:37 pm

Re: Youtube Bandwidth

Sun May 05, 2013 8:54 pm

Dear alzeno / chupaka,

Can you please make a simple terminal script for the same rule as i have the exact requirement.

Thanks
 
diablonet
Frequent Visitor
Frequent Visitor
Posts: 67
Joined: Wed Jan 05, 2011 3:33 am

Re: Youtube Bandwidth

Mon May 13, 2013 9:55 pm

Please provide configuration for this to make it work, thank you!
 
nervano
just joined
Posts: 1
Joined: Tue Dec 06, 2016 10:15 am

Re: Youtube Bandwidth

Tue Dec 06, 2016 10:19 am

Hello , can you please share with us the terminal code
to see what is happing

Who is online

Users browsing this forum: djvabe and 100 guests