Traffic Prioritizer

Traffic Prioritizer is designed to run on a Linux router and prioritize users' traffic by their bandwidth consumption.
Download

Traffic Prioritizer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL v3
  • Price:
  • FREE
  • Publisher Name:
  • facha
  • Publisher web site:

Traffic Prioritizer Tags


Traffic Prioritizer Description

Traffic Prioritizer is designed to run on a Linux router and prioritize users' traffic by their bandwidth consumption. Traffic Prioritizer is designed to run on a Linux router and prioritize users' traffic by their bandwidth consumption.It is aimed to shape the "bandwidth greedy" clients (P2P, YouTube, IPTV, etc.) so that the ones who are just browsing do not lack bandwidth.Requirements:· Trafitizer will work on Linux only. It uses iptables and tc to manage traffic priorities. So, make sure you have those. You distro's kernel must be compiled with HTB support. Most major linux distros have those out of the box. Also you'll need to have pcap library on your system. If you do not have it or you are not sure do: apt-get install libpcap0.8-dev or yum install libpcap-dev or whatever your distro uses to install packages.QUICK START:1. Make sure you have pcap library installed.2. Untar the archive trafitizer-x.x.tbz and cd into trafitizer directory3. Run make. 4, In trafitizer.conf edit network and dev options.5. Run trafitizerCONFIGURE:Edit trafitizer.conf. For initial testing just set the network your subscribers are on (e.g. 10.0.0.0/24) and device name (e.g. eth0). Check out if the inbound/outbound prioritizing rules are ok for you and change them if they are not. First number in the rule is an order in which the rules will be looked at. Next two numbers define the bandwidth interval (e.g from 0 - to 1024) in bits/sec the rule will be applied to. And the next two numbers are the highest and the lowest priorities an IP could get if it's bandwidth is inside the bandwidth interval.The last number is a priority increment, the IP will get once it is inside the bandwidth limit. To get the idea of how it works see an example below.Example:We are monitoring a 10.0.0.0/24 network. In trafitizer.conf we've defined 2 rules for incomming trafficin_rule 0,0,64000,1,2,-1in_rule 1,64000,128000,2,3,0in_rule 2,128000,100000000,3,4,110.0.0.1 is not consuming any bandwidth. Its initial state for incomming banwidth counter is 0. The rule 0 matches (0-64000 bits/sec). This IP has the higest priority possible - 1. All of a sudden someone fires up a bittorrent client which starts consumming a lot of bandwidth. Lets say 1 M/sec. As a result 10.0.0.1 now matches a rule number 2, which says that the priority should be incremented by 1 and as well should be within 3-4 interval. So the priority will change to 3. The next time the bandwidth counters are updated (bw_update_interval in trafitizer.conf), this rule will match again (the bandwidth consumption is still at 1 M/sec). So the priority will be incremented from 3 to 4 and will stay there as long as bandwidth consumed by that IP matches a bandwidth interval in rule 2.Let's suppose now the bittorrent client is stopped and an ssh session has been started from 10.0.0.1. Now 10.0.0.1 is consuming just about 40 k/sec. We've got the rule 0 matching. The priority will be set to 2 (to fit within the interval), then updated to 1 (priority increment will act).RUN:Do make. You'll get an executable trafitizer. It needs to be run as root to capture packets and manage iptables rules. Apart from reading the config file it doesn't receive any input from outside while running, so it should be reasonably safe. When run, it will create a 'trafitizer' chain (or whatever you've set in the config file) in a mangle table and will start monitoring the network.Apart from changing iptables rules in the 'trafitizer' chain the program doesn't do much. You'll need to execute trafitizer.sh in 'scripts' directory to set up the tc classes (that will do the actual shaping) and add an iptables rule to redirect traffic to 'trafitizer' chain.What's New in This Release:· An iptables zombie bug has been fixed.· An inbound traffic priority change bug has been fixed.· Logging has been added (compile with DEBUG to log all priority changes).· Command line options have been added (use "trafitizer -h" to see the full list of options).· The program has been split into two threads ('traffic capture' and 'priority updates').· When 'make install' runs, trafitizer.conf will be installed as trafitizer.conf.orig.· Copy it to trafitizer.conf for first-time installs.


Traffic Prioritizer Related Software