Page 1 of 1

Content based Queues

Posted: Wed May 03, 2017 1:28 pm
by mrravirajput
Hello,
We are an ISP and are getting customer requests to provide on the single link, different bandwidth policies based on content. The attached diagram gives an idea of the requirement.
viz
There is a 100 Mb link from our core router and the customer wants 50 Mb Internet and 50 Mb Google. The respective traffics will drop after crossing the limits.
Please advise if this is possible
mikrotik query.jpg

Re: Content based Queues

Posted: Wed May 03, 2017 5:32 pm
by p3rad0x
Hi,

You should be able to do it with a few mangle rules.

First rule to mark all the traffic and then the following ones to mark all the google subnets.

Then you should be able to setup n 50/50 queue tree for google and other traffic.

Looking at the amount of Google traffic going through my network I would say 75% google and 25% other

Re: Content based Queues

Posted: Mon May 08, 2017 1:25 pm
by mrravirajput
Here is the Mangle rule that I have created. Are these correct ?
0    chain=prerouting action=add-dst-to-address-list address-list=Google IP 
      address-list-timeout=0s content=googlevideo log=no log-prefix="" 

 1    chain=prerouting action=add-dst-to-address-list address-list=Google IP 
      address-list-timeout=0s content=gmail log=no log-prefix="" 

 2    chain=prerouting action=add-dst-to-address-list address-list=Google IP 
      address-list-timeout=0s content=youtube log=no log-prefix="" 

 3    chain=prerouting action=add-dst-to-address-list address-list=Google IP 
      address-list-timeout=0s content=google log=no log-prefix="" 

 4    chain=prerouting action=mark-packet new-packet-mark=All Traffic 
      passthrough=yes log=no log-prefix="" 

 5    chain=prerouting action=mark-packet new-packet-mark=Google passthrough=yes 
      dst-address-list=Google IP log=no log-prefix=""
Also any configuration suggestion on queue tree will be of great help