Solved

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

Posted on 2012-03-12
6
2,620 Views
Last Modified: 2012-03-15
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.
0
Comment
Question by:kbrackin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:Khandakar Ashfaqur Rahman
ID: 37712674
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
 

Author Comment

by:kbrackin
ID: 37712680
Hi Rigan! Thanks for your reply. My biggest concern here is that I believe Netflix, Hulu and YouTube actually stream over port 80.
0
 
LVL 11

Expert Comment

by:Khandakar Ashfaqur Rahman
ID: 37712755
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:kbrackin
ID: 37712787
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
 
LVL 11

Accepted Solution

by:
Khandakar Ashfaqur Rahman earned 500 total points
ID: 37713677
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
 

Author Comment

by:kbrackin
ID: 37716408
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

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question