I use RB450G as a router and webproxy for a small company. I use eth1 as a connection to Internet via ADSL modem (so I use masquerading) and eth2, eth3 as interfaces to two separated LANs. I´d like prioritize traffic to and from internet (download and upload) in simply way: heavy traffic (file downloads and uploads and similar - identified by bytes per connection) with lower priority that the rest of traffic.
I tried to use queue tree and mangle packets but I didn´t succsess although I have read a lot of documetation and forum posts. I am confused where to mangle packets (prerouting, postrouting etc) and what parent queue to use. I think the situation is little bit complicated by webproxy, masquerading and using two local interfaces.
It is really being complicated by webproxy. When using a webproxy your traffic will actually come to and from the router, therefore it will be using input and output chains. You can try this http://wiki.mikrotik.com/wiki/Queue_with_Masquerading_and_Internal_Web-Proxy but I’m not sure this is what you need. Usually when we do a web proxy with QoS we use a router just for web proxy and then a router for QoS and everything else.
…..heavy traffic (file downloads and uploads and similar - identified by bytes per connection) …
This is difficult if say you are connected to a large capacity server and downloading a update, how will your router know what the file size is, all it’s doing is transferring packets from A to B, only the client computer will know the file size of the file being downloaded (correct me if I am wrong) , there has been several topics posted on this forum on the identity of torrent files but with limited success as file encryption is being used.
Analysing each IP packet is CPU intensive and will probably impact on the overall performance of the router, effecting all users instead of just effecting the offending users who are downloading heavily, I would much rather effect them than all users.
My plan is which I am still working on is to speed throttle users on my network initially is to provide on a wireless connection to customers in speeds of 7/4/1Mbit, customer at the start has 7Mbit for 15mins and then 4Mbit after 30mins thereafter at 1Mbit, still thinking rather than using peak usage hours as the basis to set 1Mbit speed but to check AP available bandwidth and give customers higher speeds if available, this approach will hopefully help to allow customers enough time to download updates before speed throttle kicks in if they are downloading a movie during peak usage hours they can do so at 1Mbit (exceeding monthly bandwidth allowance is another story)
I don’t get what to be prioritized..
ain’t the traffic prioritization only work on traffic which is shaped in the same point where usually there are parent and child(s)… so, the traffic coming from internet is not really necessary to be shaped, unless you need to separate specific ports or protocol…
or..
do you mean prioritization based on hardware resources (to prioritize specific Ethernet than the others)??