htb
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 15
KHTB 0.2
KHTB provides a GUI for the htb.init script with XML data storage. more>>
KHTB provides a GUI for the htb.init script with XML data storage.
KHtb is a GUI for the htb.init script with XML data storage. It can import/export the htb.init tree, and can be used to edit a remote htb.init tree.
Enhancements:
- Added Working tree
- Added local project creation
- Added almost working htb.init import
- Some file changes
- Added xml loading and saving
<<lessKHtb is a GUI for the htb.init script with XML data storage. It can import/export the htb.init tree, and can be used to edit a remote htb.init tree.
Enhancements:
- Added Working tree
- Added local project creation
- Added almost working htb.init import
- Some file changes
- Added xml loading and saving
Download (1.0MB)
Added: 2007-03-28 License: GPL (GNU General Public License) Price:
940 downloads
HTBGUI 1.0
HTBGUI is a Frontend application for HTB traffic manipulation routines on linux system . more>>
HTBGUI is a Frontend application for HTB traffic manipulation routines on linux system (maybe not only?). It is simply a frontend to IPROUTE/TC application. And gives you the power for setting up queue/classes/filters by clicking them up.
HTBGUI allows you to click-out not very sophisticated configurations by simply adding buttons on the program panel and selecting values for classes / filters and interfaces like in normal configuration procedure when working with iproute / tc. The main difference is that you can do it without reading documentation and gaining knowledge about HTB stuff.
This application was written in java - download the full directory below i dont know will it work correctly on your configuration , however if you will find some problems (surely you will) feel free to contact me jarod.nnoospamm@mpn.pl
Java is very a portable language. It should work anywhere where you can find java compiler
It was hardly tested on :
*Unix Solaris
*Linux
*Windows
operating systems
By testing i mean running front end - not trying to run iproute routines.
<<lessHTBGUI allows you to click-out not very sophisticated configurations by simply adding buttons on the program panel and selecting values for classes / filters and interfaces like in normal configuration procedure when working with iproute / tc. The main difference is that you can do it without reading documentation and gaining knowledge about HTB stuff.
This application was written in java - download the full directory below i dont know will it work correctly on your configuration , however if you will find some problems (surely you will) feel free to contact me jarod.nnoospamm@mpn.pl
Java is very a portable language. It should work anywhere where you can find java compiler
It was hardly tested on :
*Unix Solaris
*Linux
*Windows
operating systems
By testing i mean running front end - not trying to run iproute routines.
Download (1.9MB)
Added: 2006-07-01 License: GPL (GNU General Public License) Price:
1212 downloads
htb-stats 1.25
htb-stats.sh is a useful script for htb class summarization. more>>
htb-stats.sh is a useful script for htb class summarization. htb-stats is designed to allow simple, non-root usage, e.g. "./htb-stats.sh eth0".
If an htb.init, tcng.init, or htb-gen configuration is found, it will label traffic output with information taken from respective configuration files.
Enhancements:
- support label-less , adapt to newer tcs backlog output
<<lessIf an htb.init, tcng.init, or htb-gen configuration is found, it will label traffic output with information taken from respective configuration files.
Enhancements:
- support label-less , adapt to newer tcs backlog output
Download (0.008MB)
Added: 2006-04-13 License: GPL (GNU General Public License) Price:
1294 downloads
htb-gen 0.9b-1
htb-gen is an easy, scalable bandwidth management tool. more>>
htb-gen is meant to be an easy, scalable, yet powerfull, bandwidth management tool. You can set up/down portions of bandwith for each host or network, that goes trough your firewall/router.
Prioritary traffic(web, mail, gaming, ftp, voip, streaming) is preferred over Junk traffic(kazaa, emule, etc). Also dynamic bandwith borrow and re-assignation is done betwen host thanks to htb boundaries.
A web-frontend for config is avaible as well, so remote management is possible. All bash based so it can be used in embedded routers/firewalls (wired/wireless).
Two backend are aviable:
- generates raw tc commands
- generates htb-init conf files (util for integration)
The packet clasification is done by iptables
<<lessPrioritary traffic(web, mail, gaming, ftp, voip, streaming) is preferred over Junk traffic(kazaa, emule, etc). Also dynamic bandwith borrow and re-assignation is done betwen host thanks to htb boundaries.
A web-frontend for config is avaible as well, so remote management is possible. All bash based so it can be used in embedded routers/firewalls (wired/wireless).
Two backend are aviable:
- generates raw tc commands
- generates htb-init conf files (util for integration)
The packet clasification is done by iptables
Download (0.017MB)
Added: 2007-06-11 License: GPL (GNU General Public License) Price:
873 downloads
HTB-tools 0.3.0
HTB-tools Bandwidth Management Software is a suite of tools that help simplify the difficult process of bandwidth allocation. more>>
HTB-tools is a project with several tools that help simplify the difficult process of bandwidth allocation, for both upload and download traffic: generate and check configuration files, real time traffic overview for each separate client.
Main features:
- bandwidth limitation using routable IP addresses, using the two configuration files for upload and download
- bandwidth limitation using non-routable IP addresses (SNAT), using a single configuration file
- match mark
- match mark in u32
- metropolitan/external limitation
- menu based management software for configuration and administration of HTB-tools (starting with version 0.3.0)
Enhancements:
- This release fixes compilation on newer kernels for q_show.c.
- The documentation has been updated.
<<lessMain features:
- bandwidth limitation using routable IP addresses, using the two configuration files for upload and download
- bandwidth limitation using non-routable IP addresses (SNAT), using a single configuration file
- match mark
- match mark in u32
- metropolitan/external limitation
- menu based management software for configuration and administration of HTB-tools (starting with version 0.3.0)
Enhancements:
- This release fixes compilation on newer kernels for q_show.c.
- The documentation has been updated.
Download (0.081MB)
Added: 2007-02-17 License: GPL (GNU General Public License) Price:
597 downloads
Ethloop
Ethloop is very simple and versatile packet generator and measurer which I use to test HTB qdisc. more>>
Ethloop is very simple and versatile packet generator and measurer which I use to test HTB qdisc. It is developement tool and you take it as such. It accepts controling program at stdin, executing it and producing flow rate table at stdout.
The generated rate is output on interface(s) selected in program and data are recieved on all interfaces in a system. You sometimes need to set promisc flag on recieving interfaces.
Generated packets are ethernet frames with protocol set to ETH_P_CUST so that you can safely inject them into existing LANs. MAC addresses are set to MACs of sending/recieving interface (may be the same).
The controling program is line based text file. Each line has fixed format and comment lines behins with #. The format of a line is:
5000 R 2 4500000
Number of spaces is optional and tabs can be used. Input is parsed by sscanf "%u %c %u %n". The first number is time in miliseconds from program start. The second character determines operation to do. Third number is flow id (see below) and remainder of line is operation dependent. However the remainder can be text or number and numbers are allowed in decimal or hex (if starting with 0x). Number can end with k to multiply it by 1024.
The line above means: at time 5sec set rate of flow 2 to 4.5 MBps. Lines are first read into struct progdata in memory (performance reasons) and should be in increasing time order. Ethloop performs no sorting by time so be carefull about it. Each line is executed at its time and can change ongoing traffic generators.
<<lessThe generated rate is output on interface(s) selected in program and data are recieved on all interfaces in a system. You sometimes need to set promisc flag on recieving interfaces.
Generated packets are ethernet frames with protocol set to ETH_P_CUST so that you can safely inject them into existing LANs. MAC addresses are set to MACs of sending/recieving interface (may be the same).
The controling program is line based text file. Each line has fixed format and comment lines behins with #. The format of a line is:
5000 R 2 4500000
Number of spaces is optional and tabs can be used. Input is parsed by sscanf "%u %c %u %n". The first number is time in miliseconds from program start. The second character determines operation to do. Third number is flow id (see below) and remainder of line is operation dependent. However the remainder can be text or number and numbers are allowed in decimal or hex (if starting with 0x). Number can end with k to multiply it by 1024.
The line above means: at time 5sec set rate of flow 2 to 4.5 MBps. Lines are first read into struct progdata in memory (performance reasons) and should be in increasing time order. Ethloop performs no sorting by time so be carefull about it. Each line is executed at its time and can change ongoing traffic generators.
Download (0.004MB)
Added: 2006-08-02 License: GPL (GNU General Public License) Price:
1179 downloads
tc-viewer 1.5
tc-viewer provides the ability to watch current transfers that take place in HTB and HFSC traffic shaping classes. more>>
tc-viewer provides the ability to watch current transfers that take place in HTB and HFSC traffic shaping classes on specified interface.
tc-viewer reads output from: tc -s class show dev iface, and analyzes (for each class) values in lines like this one :
Sent 6173259431 bytes 6300224 pkt...
Measured speeds may little vary from the real ones.
<<lesstc-viewer reads output from: tc -s class show dev iface, and analyzes (for each class) values in lines like this one :
Sent 6173259431 bytes 6300224 pkt...
Measured speeds may little vary from the real ones.
Download (0.008MB)
Added: 2006-11-18 License: GPL (GNU General Public License) Price:
1080 downloads
vpn-shaper 0.1
vpn-shaper provides a dynamic traffic shaper for vpn, poptop, and similar programs, using iproute2. more>>
vpn-shaper provides a dynamic traffic shaper for vpn, poptop, and similar programs, using iproute2.
vpn-shaper is a dynamic traffic shaper for openvpn, poptop, and similar programs, using iproute2. It allows shaping of traffic between many users conected to one server, and it supports different prioritiy schemes for different users and different types of traffic.
Trafic shaping uses the HTB qdisc. Prioritization uses l7-filter and ipp2p and some of the patch-o-matic extensions.
Classification of trafic in HTB classes is done by using the IPMARC patch-o-matic extension.
<<lessvpn-shaper is a dynamic traffic shaper for openvpn, poptop, and similar programs, using iproute2. It allows shaping of traffic between many users conected to one server, and it supports different prioritiy schemes for different users and different types of traffic.
Trafic shaping uses the HTB qdisc. Prioritization uses l7-filter and ipp2p and some of the patch-o-matic extensions.
Classification of trafic in HTB classes is done by using the IPMARC patch-o-matic extension.
Download (0.005MB)
Added: 2007-04-26 License: GPL (GNU General Public License) Price:
920 downloads
Fair NAT 0.80
Fair NAT is a script for configuring NAT on dedicated Linux routers. more>>
Fair NAT is a script for configuring NAT on dedicated Linux routers. This is the home of my linux router shaper script which allows something like fair bandwidth sharing among clients in the local network. The script is not great or anything - please dont expect the holy grail here - I just thought Id publish it because many people helped me write it and maybe someone has some use for it. I bet there are still lots of things that can be improved. Sorry about the crappy design of this page, I dont have time to put more effort in better looks.
You have a certain number of Clients (User A - User N) in your LAN which are connected by a Switch (or a Hub or BNC) to the Linux Router which is supposed to act as a gateway to the internet. The trouble now is, User B has a lot of downloads running and User C uploads stuff day and night, which leaves User A who only wants to use an interactive SSH shell in the rain, since B and C already use up all bandwidth the internet connection offers.
What we need to do is to share available bandwidth fairly among clients. In order to achieve this, I first tried several searches at Google and Freshmeat. This turned up quite a lot of results, like the Linux Advanced Routing & Traffic Control HOWTO which is a must-read and also contains great scripts, like the Wondershaper for single users. Another great general purpose script I found was HTB.init, which doesnt do anything by default, but gives you an easy way to setup HTB queues. In case you prefer CBQ, theres a CBQ.init too. If you dont know what Im talking about, read the HOWTO above or continue reading here.
Since I never found a script that did exactly what I wanted, I decided to write my own. Its designed to be an all-I-need script, therefore it does not just setup Traffic Shaping, but Masquerading and Port Forwarding too. In short, it does everything that has to do with IPTables and Traffic Control. I use HTB (Hierarchical Token Bucket) to share bandwidth among clients (one class per client). On top of that I added a PRIO queue to prioritize interactive traffic on a per-user basis. On top of PRIO I set SFQ to treat connections fairly. In version 0.72, experimental support for IPP2P to recognize peer-to-peer traffic was added.
This is the simplified scheme for routing:
HTB class (for bandwidth sharing)
|
-- PRIO (for prioritizing interactive traffic)
|
--- Interactive: SFQ (to treat concurrent connections fairly)
--- Normal: SFQ
--- High-Traffic: SFQ
[ --- P2P: SFQ (if IPP2P support is enabled only) ]
I bet this can still be improved and Im always interested in ways to do so. In case you want another class structure, this can be done by replacing the parent_class and user_class functions in the script. See CLASS_MODE in Configuration section and the function documentation in the script for details. Feel free to send me your own functions with a short explanation, if you want me to make them available for everybody.
Heres a "real" graphic, which shows the complete qdisc/class structure on $DEV_LAN if you use the unmodified example configuration file. This graphic was created using a hacked version of Stef Coenes show.pl script and GraphViz. Click here to see it, but I warn you: its quite big. Heres a similar picture, which includes IPP2P support. Note that there are more filter rules (the blue arrows) now which put the filesharing traffic into the users prio band 4.
Main features:
- This is a variable with a space-separated list of features that should be enabled. Default is all enabled if you dont set this variable.
- PROC:
- Allow Fair NAT to change some system variables in /proc, like setting /proc/sys/net/ipv4/ip_forward to 1.
- MODULES:
- Try to load kernel modules for QoS first.
- RESET:
- Fair NAT will replace all existing iptables rules with a very basic (empty) configuration. Not healthy for firewalls. You can disable this feature to keep the original rules in place. See Firewall Support below.
- NAT:
- Allow Fair NAT to configure NAT. You could disable this if you prefer to set this up yourself / let your firewall do it.
- FORWARD:
- Allow Fair NAT to configure Port Forwarding. Same as NAT, you can disable this if you dont need it.
- QOS_DOWN:
- Shape download traffic. If you know a little bit about traffic shaping and believe that download shaping is completely useless, feel free to disable this.
- QOS_UP:
- Shaping upload traffic can be disabled also. If you disable this and QOS_DOWN also, you could use Fair NAT for setting up NAT and Port Forwarding only, although thats not really the purpose of the script ;-)
- TOS:
- Allow Fair NAT to modify the TOS (type-of-service) field of packets. Right now, Fair NAT relies on this TOS field for shaping, so using this feature is highly recommended.
<<lessYou have a certain number of Clients (User A - User N) in your LAN which are connected by a Switch (or a Hub or BNC) to the Linux Router which is supposed to act as a gateway to the internet. The trouble now is, User B has a lot of downloads running and User C uploads stuff day and night, which leaves User A who only wants to use an interactive SSH shell in the rain, since B and C already use up all bandwidth the internet connection offers.
What we need to do is to share available bandwidth fairly among clients. In order to achieve this, I first tried several searches at Google and Freshmeat. This turned up quite a lot of results, like the Linux Advanced Routing & Traffic Control HOWTO which is a must-read and also contains great scripts, like the Wondershaper for single users. Another great general purpose script I found was HTB.init, which doesnt do anything by default, but gives you an easy way to setup HTB queues. In case you prefer CBQ, theres a CBQ.init too. If you dont know what Im talking about, read the HOWTO above or continue reading here.
Since I never found a script that did exactly what I wanted, I decided to write my own. Its designed to be an all-I-need script, therefore it does not just setup Traffic Shaping, but Masquerading and Port Forwarding too. In short, it does everything that has to do with IPTables and Traffic Control. I use HTB (Hierarchical Token Bucket) to share bandwidth among clients (one class per client). On top of that I added a PRIO queue to prioritize interactive traffic on a per-user basis. On top of PRIO I set SFQ to treat connections fairly. In version 0.72, experimental support for IPP2P to recognize peer-to-peer traffic was added.
This is the simplified scheme for routing:
HTB class (for bandwidth sharing)
|
-- PRIO (for prioritizing interactive traffic)
|
--- Interactive: SFQ (to treat concurrent connections fairly)
--- Normal: SFQ
--- High-Traffic: SFQ
[ --- P2P: SFQ (if IPP2P support is enabled only) ]
I bet this can still be improved and Im always interested in ways to do so. In case you want another class structure, this can be done by replacing the parent_class and user_class functions in the script. See CLASS_MODE in Configuration section and the function documentation in the script for details. Feel free to send me your own functions with a short explanation, if you want me to make them available for everybody.
Heres a "real" graphic, which shows the complete qdisc/class structure on $DEV_LAN if you use the unmodified example configuration file. This graphic was created using a hacked version of Stef Coenes show.pl script and GraphViz. Click here to see it, but I warn you: its quite big. Heres a similar picture, which includes IPP2P support. Note that there are more filter rules (the blue arrows) now which put the filesharing traffic into the users prio band 4.
Main features:
- This is a variable with a space-separated list of features that should be enabled. Default is all enabled if you dont set this variable.
- PROC:
- Allow Fair NAT to change some system variables in /proc, like setting /proc/sys/net/ipv4/ip_forward to 1.
- MODULES:
- Try to load kernel modules for QoS first.
- RESET:
- Fair NAT will replace all existing iptables rules with a very basic (empty) configuration. Not healthy for firewalls. You can disable this feature to keep the original rules in place. See Firewall Support below.
- NAT:
- Allow Fair NAT to configure NAT. You could disable this if you prefer to set this up yourself / let your firewall do it.
- FORWARD:
- Allow Fair NAT to configure Port Forwarding. Same as NAT, you can disable this if you dont need it.
- QOS_DOWN:
- Shape download traffic. If you know a little bit about traffic shaping and believe that download shaping is completely useless, feel free to disable this.
- QOS_UP:
- Shaping upload traffic can be disabled also. If you disable this and QOS_DOWN also, you could use Fair NAT for setting up NAT and Port Forwarding only, although thats not really the purpose of the script ;-)
- TOS:
- Allow Fair NAT to modify the TOS (type-of-service) field of packets. Right now, Fair NAT relies on this TOS field for shaping, so using this feature is highly recommended.
Download (0.031MB)
Added: 2006-06-29 License: GPL (GNU General Public License) Price:
1214 downloads
Prometheus QoS 0.7
Prometheus QoS is an ISP-oriented tool for easy manipulation of the IP traffic shaping and sharing features of the Linux kernel. more>>
QoS (or Quality-of-service) is traffic shaper replacement for Internet Service Providers (ISP). Dump your vintage hard-wired routers/shapers (C|sco, etc.) in favour of powerful open source and free solution !
Prometheus QoS generates multiple nested HTB tc classes with various rate and ceil values, and implements optional daily traffic quotas and data transfer statistics (as HTML). It is compatible with NAT, both asymetrical and symetrical, yet still provides good two-way shaping and prioritizing, both upload and download.
Prometheus QoS was written in C<<less
Prometheus QoS generates multiple nested HTB tc classes with various rate and ceil values, and implements optional daily traffic quotas and data transfer statistics (as HTML). It is compatible with NAT, both asymetrical and symetrical, yet still provides good two-way shaping and prioritizing, both upload and download.
Prometheus QoS was written in C<<less
Download (0.042MB)
Added: 2007-02-20 License: GPL (GNU General Public License) Price:
997 downloads
The Wonder Shaper 1.1a
The Wonder Shaper is a very special network shaper script with a lot of features. more>>
The Wonder Shaper is a very special network shaper script with a lot of features. Works on Linux 2.4 & higher.
Goals
I attempted to create the holy grail:
* Maintain low latency for interfactive traffic at all times.
This means that downloading or uploading files should not disturb SSH or even telnet. These are the most important things, even 200ms latency is sluggish to work over.
* Allow surfing at reasonable speeds while up or downloading
Even though http is bulk traffic, other traffic should not drown it out too much.
* Make sure uploads dont harm downloads, and the other way around
This is a much observed phenomenon where upstream traffic simply destroys download speed. It turns out that all this is possible, at the cost of a tiny bit of bandwidth. The reason that uploads, downloads and ssh hurt eachother is the presence of large queues in many domestic access devices like cable or DSL modems.
Why it doesnt work well by default
ISPs know that they are benchmarked solely on how fast people can download. Besides available bandwidth, download speed is influenced heavily by packet loss, which seriously hampers TCP/IP performance. Large queues can help prevent packetloss, and speed up downloads. So ISPs configure large queues.
These large queues however damage interactivity. A keystroke must first travel the upstream queue, which may be seconds (!) long and go to your remote host. It is then displayed, which leads to a packet coming back, which must then traverse the downstream queue, located at your ISP, before it appears on your screen.
This HOWTO teaches you how to mangle and process the queue in many ways, but sadly, not all queues are accessible to us. The queue over at the ISP is completely off-limits, whereas the upstream queue probably lives inside your cable modem or DSL device. You may or may not be able to configure it. Most probably not.
So, what next? As we cant control either of those queues, they must be eliminated, and moved to your Linux router. Luckily this is possible.
Limit upload speed somewhat
By limiting our upload speed to slightly less than the truly available rate, no queues are built up in our modem. The queue is now moved to Linux.
Limit download speed
This is slightly trickier as we cant really influence how fast the internet ships us data. We can however drop packets that are coming in too fast, which causes TCP/IP to slow down to just the rate we want. Because we dont want to drop traffic unnecessarily, we configure a burst size we allow at higher speed.
Now, once we have done this, we have eliminated the downstream queue totally (except for short bursts), and gain the ability to manage the upstream queue with all the power Linux offers.
Let interactive traffic skip the queue
What remains to be done is to make sure interactive traffic jumps to the front of the upstream queue. To make sure that uploads dont hurt downloads, we also move ACK packets to the front of the queue. This is what normally causes the huge slowdown observed when generating bulk traffic both ways. The ACKnowledgements for downstream traffic must compete with upstream traffic, and get delayed in the process.
We also move other small packets to the front of the queue - this helps operating systems which do not set TOS bits, like everything from Microsoft.
Allow the user to specify low priority traffic (new in 1.1!)
Sometimes you may notice low priority OUTGOING traffic slowing down important traffic. In that case, the following options may help you:
NOPRIOHOSTSRC
Set this to hosts or netmasks in your network that should have low priority
NOPRIOHOSTDST
Set this to hosts or netmasks on the internet that should have low priority
NOPRIOPORTSRC
Set this to source ports that should have low priority. If you have an unimportant webserver on your traffic, set this to 80
NOPRIOPORTDST
Set this to destination ports that should have low priority.
See the start of wshaper and wshaper.htb
Results
If we do all this we get the following measurements using an excellent ADSL connection from xs4all in the Netherlands:
Baseline latency:
round-trip min/avg/max = 14.4/17.1/21.7 ms
Without traffic conditioner, while downloading:
round-trip min/avg/max = 560.9/573.6/586.4 ms
Without traffic conditioner, while uploading:
round-trip min/avg/max = 2041.4/2332.1/2427.6 ms
With conditioner, during 220kbit/s upload:
round-trip min/avg/max = 15.7/51.8/79.9 ms
With conditioner, during 850kbit/s download:
round-trip min/avg/max = 20.4/46.9/74.0 ms
When uploading, downloads proceed at ~80% of the available speed. Uploads at around 90%. Latency then jumps to 850 ms, still figuring out why.
What you can expect from this script depends a lot on your actual uplink speed. When uploading at full speed, there will always be a single packet ahead of your keystroke. That is the lower limit to the latency you can achieve - divide your MTU by your upstream speed to calculate. Typical values will be somewhat higher than that. Lower your MTU for better effects!
A small table:
Uplink speed | Expected latency due to upload
--------------------------------------------------
32 | 234ms
64 | 117ms
128 | 58ms
256 | 29ms
So to calculate your effective latency, take a baseline measurement (ping on an unloaded link), and look up the number in the table, and add it. That is about the best you can expect. This number comes from a calculation that assumes that your upstream keystroke will have at most half a full sized packet ahead of it.
This boils down to:
mtu * 0.5 * 10
-------------- + baseline_latency
kbit
The factor 10 is not quite correct but works well in practice.
Your kernel
If you run a recent distribution, everything should be ok. You need 2.4 with QoS options turned on.
If you compile your own kernel, it must have some options enabled. Most notably, in the Networking Options menu, QoS and/or Fair Queueing, turn at least CBQ, PRIO, SFQ, Ingress, Traffic Policing, QoS support, Rate Estimator, QoS classifier, U32 classifier, fwmark classifier.
In practice, I (and most distributions) just turn on everything.
The scripts
The script comes in two versions, one which works on standard kernels and is implemented using CBQ. The other one uses the excellent HTB qdisc which is not in the default kernel. The CBQ version is more tested than the HTB one!
See wshaper and wshaper.htb.
Tuning
These scripts need to know the real rate of your ISP connection. This is hard to determine upfront as different ISPs use different kinds of bits it appears. People report success using the following technique:
Estimate both your upstream and downstream at half the rate your ISP specifies. Now verify if the script is functioning - check interactivity while uploading and while downloading. This should deliver the latency as calculated above. If not, check if the script executed without errors.
Now slowly increase the upstream & downstream numbers in the script until the latency comes back. This way you can find optimum values for your connection. If you are happy, please report to me so I can make a list of numbers that work well. Please let me know which ISP you use and the name of your subscription, and its reputed specifications, so I can list you here and save others the trouble.
Installation
If you dial in, you can copy the script to /etc/ppp/ip-up.d and it will be run at each connect.
If you want to remove the shaper from an interface, run wshaper stop. To see status information, run wshaper status.
KNOWN PROBLEMS
If you get errors, add an -x to the first line, as follows:
#!/bin/bash -x
And retry. This will show you which line gives an error. Before contacting me, make sure that you are running a recent version of iproute!
Recent versions can be found at your Linux distributor, or if you prefer compiling, here:
ftp://ftp.inr.ac.ru/ip-routing/iproute2-current.tar.gz
<<lessGoals
I attempted to create the holy grail:
* Maintain low latency for interfactive traffic at all times.
This means that downloading or uploading files should not disturb SSH or even telnet. These are the most important things, even 200ms latency is sluggish to work over.
* Allow surfing at reasonable speeds while up or downloading
Even though http is bulk traffic, other traffic should not drown it out too much.
* Make sure uploads dont harm downloads, and the other way around
This is a much observed phenomenon where upstream traffic simply destroys download speed. It turns out that all this is possible, at the cost of a tiny bit of bandwidth. The reason that uploads, downloads and ssh hurt eachother is the presence of large queues in many domestic access devices like cable or DSL modems.
Why it doesnt work well by default
ISPs know that they are benchmarked solely on how fast people can download. Besides available bandwidth, download speed is influenced heavily by packet loss, which seriously hampers TCP/IP performance. Large queues can help prevent packetloss, and speed up downloads. So ISPs configure large queues.
These large queues however damage interactivity. A keystroke must first travel the upstream queue, which may be seconds (!) long and go to your remote host. It is then displayed, which leads to a packet coming back, which must then traverse the downstream queue, located at your ISP, before it appears on your screen.
This HOWTO teaches you how to mangle and process the queue in many ways, but sadly, not all queues are accessible to us. The queue over at the ISP is completely off-limits, whereas the upstream queue probably lives inside your cable modem or DSL device. You may or may not be able to configure it. Most probably not.
So, what next? As we cant control either of those queues, they must be eliminated, and moved to your Linux router. Luckily this is possible.
Limit upload speed somewhat
By limiting our upload speed to slightly less than the truly available rate, no queues are built up in our modem. The queue is now moved to Linux.
Limit download speed
This is slightly trickier as we cant really influence how fast the internet ships us data. We can however drop packets that are coming in too fast, which causes TCP/IP to slow down to just the rate we want. Because we dont want to drop traffic unnecessarily, we configure a burst size we allow at higher speed.
Now, once we have done this, we have eliminated the downstream queue totally (except for short bursts), and gain the ability to manage the upstream queue with all the power Linux offers.
Let interactive traffic skip the queue
What remains to be done is to make sure interactive traffic jumps to the front of the upstream queue. To make sure that uploads dont hurt downloads, we also move ACK packets to the front of the queue. This is what normally causes the huge slowdown observed when generating bulk traffic both ways. The ACKnowledgements for downstream traffic must compete with upstream traffic, and get delayed in the process.
We also move other small packets to the front of the queue - this helps operating systems which do not set TOS bits, like everything from Microsoft.
Allow the user to specify low priority traffic (new in 1.1!)
Sometimes you may notice low priority OUTGOING traffic slowing down important traffic. In that case, the following options may help you:
NOPRIOHOSTSRC
Set this to hosts or netmasks in your network that should have low priority
NOPRIOHOSTDST
Set this to hosts or netmasks on the internet that should have low priority
NOPRIOPORTSRC
Set this to source ports that should have low priority. If you have an unimportant webserver on your traffic, set this to 80
NOPRIOPORTDST
Set this to destination ports that should have low priority.
See the start of wshaper and wshaper.htb
Results
If we do all this we get the following measurements using an excellent ADSL connection from xs4all in the Netherlands:
Baseline latency:
round-trip min/avg/max = 14.4/17.1/21.7 ms
Without traffic conditioner, while downloading:
round-trip min/avg/max = 560.9/573.6/586.4 ms
Without traffic conditioner, while uploading:
round-trip min/avg/max = 2041.4/2332.1/2427.6 ms
With conditioner, during 220kbit/s upload:
round-trip min/avg/max = 15.7/51.8/79.9 ms
With conditioner, during 850kbit/s download:
round-trip min/avg/max = 20.4/46.9/74.0 ms
When uploading, downloads proceed at ~80% of the available speed. Uploads at around 90%. Latency then jumps to 850 ms, still figuring out why.
What you can expect from this script depends a lot on your actual uplink speed. When uploading at full speed, there will always be a single packet ahead of your keystroke. That is the lower limit to the latency you can achieve - divide your MTU by your upstream speed to calculate. Typical values will be somewhat higher than that. Lower your MTU for better effects!
A small table:
Uplink speed | Expected latency due to upload
--------------------------------------------------
32 | 234ms
64 | 117ms
128 | 58ms
256 | 29ms
So to calculate your effective latency, take a baseline measurement (ping on an unloaded link), and look up the number in the table, and add it. That is about the best you can expect. This number comes from a calculation that assumes that your upstream keystroke will have at most half a full sized packet ahead of it.
This boils down to:
mtu * 0.5 * 10
-------------- + baseline_latency
kbit
The factor 10 is not quite correct but works well in practice.
Your kernel
If you run a recent distribution, everything should be ok. You need 2.4 with QoS options turned on.
If you compile your own kernel, it must have some options enabled. Most notably, in the Networking Options menu, QoS and/or Fair Queueing, turn at least CBQ, PRIO, SFQ, Ingress, Traffic Policing, QoS support, Rate Estimator, QoS classifier, U32 classifier, fwmark classifier.
In practice, I (and most distributions) just turn on everything.
The scripts
The script comes in two versions, one which works on standard kernels and is implemented using CBQ. The other one uses the excellent HTB qdisc which is not in the default kernel. The CBQ version is more tested than the HTB one!
See wshaper and wshaper.htb.
Tuning
These scripts need to know the real rate of your ISP connection. This is hard to determine upfront as different ISPs use different kinds of bits it appears. People report success using the following technique:
Estimate both your upstream and downstream at half the rate your ISP specifies. Now verify if the script is functioning - check interactivity while uploading and while downloading. This should deliver the latency as calculated above. If not, check if the script executed without errors.
Now slowly increase the upstream & downstream numbers in the script until the latency comes back. This way you can find optimum values for your connection. If you are happy, please report to me so I can make a list of numbers that work well. Please let me know which ISP you use and the name of your subscription, and its reputed specifications, so I can list you here and save others the trouble.
Installation
If you dial in, you can copy the script to /etc/ppp/ip-up.d and it will be run at each connect.
If you want to remove the shaper from an interface, run wshaper stop. To see status information, run wshaper status.
KNOWN PROBLEMS
If you get errors, add an -x to the first line, as follows:
#!/bin/bash -x
And retry. This will show you which line gives an error. Before contacting me, make sure that you are running a recent version of iproute!
Recent versions can be found at your Linux distributor, or if you prefer compiling, here:
ftp://ftp.inr.ac.ru/ip-routing/iproute2-current.tar.gz
Download (MB)
Added: 2007-02-13 License: GPL (GNU General Public License) Price:
994 downloads
Linux QoS Library 0.8.0
Linux QoS Library is a C API for the network QoS features of the Linux kernel. more>>
The Linux QoS Library (LQL) provides a GPL licensed, GObject based C API to manipulate the network queueing disciplines, classes and classifiers in the Linux kernel.
LQL does not use the TC command as a back-end. Instead, LQL communicates with the Linux kernel via Netlink sockets the same way TC does.
At the present time, LQL implements a subset of the Linux network QoS features exposed by the TC command.
Hopefully, this will change as the library matures.
In an ideal world TC would be implemented with a high(er) level API like LQL so that new kernel network QoS features would be immediately available to third party applications using the high level library.
Who knows what interesting innovations would have been created around the Linux network QoS features over the last few years if there was an easier API to manipulate them. LQL is an attempt to fill this need.
Queueing disciplines currently supported by LQL:
HTB
PFIFO
SFQ
PFIFOFast
Priomap
DSMark
Netem
Classifiers currently supported by LQL:
U32
Fwmark
TCIndex
<<lessLQL does not use the TC command as a back-end. Instead, LQL communicates with the Linux kernel via Netlink sockets the same way TC does.
At the present time, LQL implements a subset of the Linux network QoS features exposed by the TC command.
Hopefully, this will change as the library matures.
In an ideal world TC would be implemented with a high(er) level API like LQL so that new kernel network QoS features would be immediately available to third party applications using the high level library.
Who knows what interesting innovations would have been created around the Linux network QoS features over the last few years if there was an easier API to manipulate them. LQL is an attempt to fill this need.
Queueing disciplines currently supported by LQL:
HTB
PFIFO
SFQ
PFIFOFast
Priomap
DSMark
Netem
Classifiers currently supported by LQL:
U32
Fwmark
TCIndex
Download (0.45MB)
Added: 2005-10-28 License: GPL (GNU General Public License) Price:
1460 downloads
Pacemaker 0.4
Pacemaker is a dynamic rate-limiting script that watches network traffic . more>>
Pacemaker is a dynamic rate-limiting script that watches network traffic and determines which machines are probably abusing your network. Pacemaker catches things like Windows worm scans, port scans, P2P network traffic, and anything else that tries to go beyond the normal number of connections a standard machine should use. The machine needs to abuse the network for two minutes before pacemaker will mark the IP address to be ratelimited. Also, a machine will stay marked for as many minutes as it has abused the network.
Pacemaker uses iptables to mark packets for specific IP addresses it determines are abusing the network resources. Once the packets are marked iproute2 and tc can filter and ratelimit the traffic to whatever speed you want.
In order to use pacemaker you will need to have the latest iptables, a kernel that can handle iptables packet mangling, a network sniffer (currently only tcpdump or tethereal are
supported) and the lastest iproute2+tc tools.
First add a class to your ratelimiting system. There is an example provided (what I use currently) in htb-qdisc-example-eth0 or htb-qdisc-example-eth1.
open pacemaker and change the defaults to your local settings.
run make install
Enhancements:
- Fixed documentation listing required software.
<<lessPacemaker uses iptables to mark packets for specific IP addresses it determines are abusing the network resources. Once the packets are marked iproute2 and tc can filter and ratelimit the traffic to whatever speed you want.
In order to use pacemaker you will need to have the latest iptables, a kernel that can handle iptables packet mangling, a network sniffer (currently only tcpdump or tethereal are
supported) and the lastest iproute2+tc tools.
First add a class to your ratelimiting system. There is an example provided (what I use currently) in htb-qdisc-example-eth0 or htb-qdisc-example-eth1.
open pacemaker and change the defaults to your local settings.
run make install
Enhancements:
- Fixed documentation listing required software.
Download (0.013MB)
Added: 2006-06-29 License: GPL (GNU General Public License) Price:
1214 downloads
layer7-firewall 1.0.2
layer7-firewall provides an easily configured layer seven firewall. more>>
layer7-firewall provides an easily configured layer seven firewall.
layer7-firewall is an easily configured layer seven firewall. It boots from a CD, using a floppy disk for data storage.
Layer7-firewall is a firewall which filters data in layer7 OSI model and has implemented QoS.
Netfilter identifies packets as eDonkey2000, Bittorent, Quake, etc. Many thanks to Justin Levandoski, Ethan Sommer and Matthew Strait for their work in L7-filter. After unpacking bz2 file You get iso image to burn on cd.
Dont forget to connect Your CD as hdb (Primary Slave).
Enhancements:
- added "iptables -I FORWARD -p udp... -j MASQUERADE",
- added "iptables -I FORWARD -p icmp... -j MASQUERADE",
- added "iptables -I INPUT -p udp... -j MASQUERADE",
- added "iptables -I INPUT -p icmp... -j MASQUERADE",
- queues on interfaces have algorithm cbq now (before htb).
<<lesslayer7-firewall is an easily configured layer seven firewall. It boots from a CD, using a floppy disk for data storage.
Layer7-firewall is a firewall which filters data in layer7 OSI model and has implemented QoS.
Netfilter identifies packets as eDonkey2000, Bittorent, Quake, etc. Many thanks to Justin Levandoski, Ethan Sommer and Matthew Strait for their work in L7-filter. After unpacking bz2 file You get iso image to burn on cd.
Dont forget to connect Your CD as hdb (Primary Slave).
Enhancements:
- added "iptables -I FORWARD -p udp... -j MASQUERADE",
- added "iptables -I FORWARD -p icmp... -j MASQUERADE",
- added "iptables -I INPUT -p udp... -j MASQUERADE",
- added "iptables -I INPUT -p icmp... -j MASQUERADE",
- queues on interfaces have algorithm cbq now (before htb).
Download (60MB)
Added: 2007-02-26 License: GPL (GNU General Public License) Price:
979 downloads
Kuliax 6.0
Kuliax project is an effort to bring Free and Open Source Software (FOSS) to University education, especially in Indonesia. more>>
Kuliax project is an effort to bring Free and Open Source Software (FOSS) to University education, especially in Indonesia. Many students and lecturers have been "addicted" to the closed-source and expensive software that they couldnt afford or not suitable with their needs. Universities encouraged to do something important to the _real_ meaning of education by using and developing FOSS.
FOSS gives civitas academica freedom to use, study, modify, and distribute all software released under its licenses. We should spend more money to the empowerment of human resources, instead of products. This is great, if each universities generate as many as possible people who can develop themself and their surrounding with true and open knowledge, the one that forgeted by some/most education institutions.
Kuliax Project provides bridge between students, lecturers, and civitas academica to cooperate with each other. In Bahasa Indonesia, its called Gotong Royong. Like the logo which symbolizes peoples hands that holds one to another, making a square.
The near possible milestone to reach that goal is developing Linux distro to fit University or Campus needs and invite people to join in.
Kuliax, is one of the implementation for the first milestone, Linux distro for Information Technology, Electrical Engineering, Computer Science, or related department, but its likely can be used by some others departments as well. It tries to provide "base system" and applications suited to the curriculum/syllabus.
Applications installed:
- Desktop Environment: KDE 3.5.5
- Internet: Akregator, Gaim 2.0, KFTPGrabber 0.8.0, KMail, Iceweasel 2.0 (Firefox)
- Graphics: XMRM, Gwenview, ImageMagick, Inkscape 0.44.1, The Gimp 2.2.13, autotrace, gif2png, qiv, xaos, xfig
- Multimedia: XMMS 1.2.10+plugins, (K)MPlayer, VCD tools, Audacity, Kino 0.92+plugins, dvgrab, k3b, sox
- Office: OpenOffice.org 2.0.4
- File Reader: KPDF, KchmViewer
- Brainstorming: Freemind 0.8.0
- Dictionary: StarDict 2.4.8, English-Indonesian dictionary-database
- Printing: CUPS+driver
- Wireless: ndiswrapper, wireless-tools, wlassistant, wpasupplicant
- Statistics and Data Mining: R-base, RKWard
- Mathematics and Modelling: GNUPLOT, Octave
- Electrical/Electronics and Digital/Microprocessor: gnusim8085, gpsim, ktechlab, sdcc, tkgate, uisp
- Programming:
- LISP: CLISP 2.4.1
- PHP: PHP4 dan PHP5
- Assembler: nasm 0.98.38
- C/C++: GCC 4.1.1
- Haskell: Hugs 98.200503.08
- Java(tm): Sun Java 5.0
- Pascal: Freepascal 2.0.0
- Perl: Perl 5.8.8
- Prolog: SWI-Prolog 5.6.14
- Python: Python 2.4.4
- Scheme: Guile 1.6.8
- Smalltalk: GNU Smalltalk 2.1.8
- Tcl/Tk: Tcl/Tk 8.4
- Development: CVS, KDevelop 3.3.5 (IDE), Motor 3.4.0 (IDE), autoconf, automake, distcc, gdb, make, ncurses, whiptail 0.52.2
- Computer Organization and Architecture: GNU MIX Development Kit
- Operating System: UserModeLinux, VisualOS, qemu
- Computer Network: BIND9, DHCP3 server/client, arpwatch, bridge-utils, etherwake, fping, htb-gen, iftop, iproute, iptables, iptraf, krdc, krfb, mtr, netcat, netpipe-tcp, openssh, scli, shaper (CBQ), sipcalc, stunnel, tcpdump, tcpwrapper, telnet-ssl, vpnc, vsftpd
- Network Simulator: cnet
- Web Server: Apache 2.2.3
- Database: MySQL 5.0.27, SQLite 3.3.8, sqlitebrowser 1.3
- Security: GNUPG 1.4.5, dsniff, nmap, outguess
- Software Engineering: ArgoUML, GanttProject, sloccount
- Utilities: abakus, bc, ethtool, fdisk/cfdisk, knetworkconf, ksysguard, mc, qtparted, rsync, screen, synaptic, vrms
- E-Book: Operating System Book, created and maintained by Masyarakat Digital Gotong Royong (MDGR), in Bahasa Indonesia
<<lessFOSS gives civitas academica freedom to use, study, modify, and distribute all software released under its licenses. We should spend more money to the empowerment of human resources, instead of products. This is great, if each universities generate as many as possible people who can develop themself and their surrounding with true and open knowledge, the one that forgeted by some/most education institutions.
Kuliax Project provides bridge between students, lecturers, and civitas academica to cooperate with each other. In Bahasa Indonesia, its called Gotong Royong. Like the logo which symbolizes peoples hands that holds one to another, making a square.
The near possible milestone to reach that goal is developing Linux distro to fit University or Campus needs and invite people to join in.
Kuliax, is one of the implementation for the first milestone, Linux distro for Information Technology, Electrical Engineering, Computer Science, or related department, but its likely can be used by some others departments as well. It tries to provide "base system" and applications suited to the curriculum/syllabus.
Applications installed:
- Desktop Environment: KDE 3.5.5
- Internet: Akregator, Gaim 2.0, KFTPGrabber 0.8.0, KMail, Iceweasel 2.0 (Firefox)
- Graphics: XMRM, Gwenview, ImageMagick, Inkscape 0.44.1, The Gimp 2.2.13, autotrace, gif2png, qiv, xaos, xfig
- Multimedia: XMMS 1.2.10+plugins, (K)MPlayer, VCD tools, Audacity, Kino 0.92+plugins, dvgrab, k3b, sox
- Office: OpenOffice.org 2.0.4
- File Reader: KPDF, KchmViewer
- Brainstorming: Freemind 0.8.0
- Dictionary: StarDict 2.4.8, English-Indonesian dictionary-database
- Printing: CUPS+driver
- Wireless: ndiswrapper, wireless-tools, wlassistant, wpasupplicant
- Statistics and Data Mining: R-base, RKWard
- Mathematics and Modelling: GNUPLOT, Octave
- Electrical/Electronics and Digital/Microprocessor: gnusim8085, gpsim, ktechlab, sdcc, tkgate, uisp
- Programming:
- LISP: CLISP 2.4.1
- PHP: PHP4 dan PHP5
- Assembler: nasm 0.98.38
- C/C++: GCC 4.1.1
- Haskell: Hugs 98.200503.08
- Java(tm): Sun Java 5.0
- Pascal: Freepascal 2.0.0
- Perl: Perl 5.8.8
- Prolog: SWI-Prolog 5.6.14
- Python: Python 2.4.4
- Scheme: Guile 1.6.8
- Smalltalk: GNU Smalltalk 2.1.8
- Tcl/Tk: Tcl/Tk 8.4
- Development: CVS, KDevelop 3.3.5 (IDE), Motor 3.4.0 (IDE), autoconf, automake, distcc, gdb, make, ncurses, whiptail 0.52.2
- Computer Organization and Architecture: GNU MIX Development Kit
- Operating System: UserModeLinux, VisualOS, qemu
- Computer Network: BIND9, DHCP3 server/client, arpwatch, bridge-utils, etherwake, fping, htb-gen, iftop, iproute, iptables, iptraf, krdc, krfb, mtr, netcat, netpipe-tcp, openssh, scli, shaper (CBQ), sipcalc, stunnel, tcpdump, tcpwrapper, telnet-ssl, vpnc, vsftpd
- Network Simulator: cnet
- Web Server: Apache 2.2.3
- Database: MySQL 5.0.27, SQLite 3.3.8, sqlitebrowser 1.3
- Security: GNUPG 1.4.5, dsniff, nmap, outguess
- Software Engineering: ArgoUML, GanttProject, sloccount
- Utilities: abakus, bc, ethtool, fdisk/cfdisk, knetworkconf, ksysguard, mc, qtparted, rsync, screen, synaptic, vrms
- E-Book: Operating System Book, created and maintained by Masyarakat Digital Gotong Royong (MDGR), in Bahasa Indonesia
Download (693.9MB)
Added: 2006-12-19 License: GPL (GNU General Public License) Price:
1042 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above htb search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed