Limiting bandwidth per user for Netflix/Hulu during times of heavy usage with MikroTik

Greetings! I am just now getting a feel for MikroTik routers and would love to test out some rules for the thing. My first inclination is to have the router throttle streaming down during peak hours, so that people who are simply browsing the web or checking email aren't being interrupted or limited because of a handful of others who are streaming constantly, but allow that streaming to use what it needs during times of inactivity.

Is this possible with Mikrotik, and if so, what would be the best way of doing this? Feel free to share your own rules for queues or mangle if you like!

I am using RouterOS 5.2 and this is the edge router that all connections inside the network move through.
kbrackinAsked:
Who is Participating?
 
Khandakar Ashfaqur RahmanConnect With a Mentor Expert/ConsultantCommented:
I agree with you that it's not a good idea to create specific rules for few Destination IPsNetmask.Moreover, there are a lot of streaming sites remaining which still would be out of rule.

There is IP>Firewall>Layer7 protocols.Please check the following link:
http://www.mikrotikscripts.com/2011/09/limit-queue-video-streaming.html

But I'm not experienced with it.At least you could test if works.
0
 
Khandakar Ashfaqur RahmanExpert/ConsultantCommented:
At first add Mangle for HTTP like:

/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
    new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
    new-packet-mark=http passthrough=no

Then go to Queue and add folowing into your child queue:
Select Packet-marks=http
priority=1

Please note that Priority 1 means highest and 8 means lowest priority.

Now in the same way you can do it for other traffics too.

For more details:
http://wiki.mikrotik.com/wiki/Manual:Queue
http://wiki.mikrotik.com/wiki/TransparentTrafficShaper
0
 
kbrackinAuthor Commented:
Hi Rigan! Thanks for your reply. My biggest concern here is that I believe Netflix, Hulu and YouTube actually stream over port 80.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Khandakar Ashfaqur RahmanExpert/ConsultantCommented:
Open winbox and add the followings into Simple Queue rules:

General>>
Target Address=Your users IP
Advanced>>
Packet-marks=http
Dst Address=youtube network address    //Example: 173.194.0.0/16
Priority=8

For other cases set priority=1

However, you also can set burst,burst limit,maximum limit,limit at etc.
0
 
kbrackinAuthor Commented:
I hate to keep shooting down solutions, but this also presents an issue. Services like Netflix and YouTube tend to have multiple sources for content and the idea of keeping a constant list of these is also frustrating. Especially when some services actually host their content with third parties for delivery.

I'm looking for a nice blanket solution, I guess. Something that will give light traffic priority over heavy traffic when bandwidth is starting to bottleneck, so that the heavy use which will usually be streaming is held back with light traffic given priority over it. Is it possible to do this based on sustained usage vs lighter traffic which wouldn't be as intensive?
0
 
kbrackinAuthor Commented:
Looks like that picks apart the packet header for HTTP traffic. The big question now is whether or not Netflix and Hulu have similar headers that would be sent even to set top boxes and various other devices. Oh well, it's a start. I'll wait to see if anyone else has a solution and give you the points if not.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.