Changes

Jump to navigation Jump to search
3,621 bytes added ,  03:07, 4 April 2022
no edit summary
Line 1: Line 1:  
==HTBWondershaper Traffic Shaping script==
 
==HTBWondershaper Traffic Shaping script==
 
+
{{Note box| you can see the contrib [[qos|smeserver-qos]] if you need the ability to set quality of service on your network}}
 
===Description===
 
===Description===
   −
The HTBWondershaper script implements traffic shaping by filtering outgoing traffic into classes and setting limits/priorities for these classes. Each class gets a lower and upper bandwidth limit. Each class also has a priority, and if the priority is lower, the traffic goes first.
+
The HTBWondershaper script implements traffic shaping/QoS by filtering outgoing traffic into classes and setting limits/priorities for these classes. Each class gets a lower and upper bandwidth limit. Each class also has a priority, and if the priority is lower, the traffic goes first. The script as designed only shapes upward (outgoing) traffic.
   −
Design Benefits
+
'''Design Benefits'''
   −
It uses HTB filter: this guarantees minimum bandwidth per class and divides surplus bandwidth evenly
+
It uses HTB filter - this guarantees minimum bandwidth per class and divides surplus bandwidth evenly
   −
It uses "iptables marks" to filter traffic into classes. This means you can use the rather simple iptables language to put specific traffic into TC classes rather than the complex non-documented TC stuff.
+
It uses "iptables marks" to filter traffic into classes - this means you can use the rather simple iptables language to put specific traffic into TC classes rather than the complex non-documented TC stuff.
   −
Nomenclature
+
'''Nomenclature'''
   −
Shaping: The process of delaying packets before they go out to make traffic confirm to a configured maximum rate. Shaping is performed on egress (outgoing traffic). Colloquially, dropping packets to slow traffic down is also often called Shaping.
+
''Shaping'' - The process of delaying packets before they go out to make traffic confirm to a configured maximum rate. Shaping is performed on egress (outgoing traffic). Colloquially, dropping packets to slow traffic down is also often called Shaping.
   −
Policing: Delaying or dropping packets in order to make traffic stay below a configured bandwidth. In Linux, policing can only drop a packet and not delay it - there is no 'ingress queue'.
+
''Policing'' - Delaying or dropping packets in order to make traffic stay below a configured bandwidth. In Linux, policing can only drop a packet and not delay it - there is no 'ingress queue'.
      Line 28: Line 28:  
  pico -w /opt/scripts/htbw/HTBWondershaper
 
  pico -w /opt/scripts/htbw/HTBWondershaper
   −
As a minimum adjust the variables DOWNLINK, CEIL, EXTDEV & LANDEV to suit yuour situation
+
As a minimum adjust the variables DOWNLINK, CEIL, EXTDEV & LANDEV to suit your situation
 +
 
 
DOWNLINK should be your actual (not rated) download speed in Kb
 
DOWNLINK should be your actual (not rated) download speed in Kb
 +
 
CEIL should be 75% of your actual (not rated) upstream bandwidth in Kb
 
CEIL should be 75% of your actual (not rated) upstream bandwidth in Kb
 +
 
EXTDEV is your external internet device usually eth1
 
EXTDEV is your external internet device usually eth1
 +
 
LANDEV is your local device usually eth0
 
LANDEV is your local device usually eth0
 +
 
Typical settings for a "real world" ADSL connection that is 2 or 3 km from a telephone exchange
 
Typical settings for a "real world" ADSL connection that is 2 or 3 km from a telephone exchange
eg on line 99
+
 
 +
on line 99
 
  DOWNLINK=4000
 
  DOWNLINK=4000
 
on line 103
 
on line 103
Line 80: Line 86:  
  rm /opt/scripts/htbw/HTBWondershaper
 
  rm /opt/scripts/htbw/HTBWondershaper
   −
Remove the starup entry from /etc/rc.d/rc.local
+
Remove the startup entry from /etc/rc.d/rc.local
 
  pico -w /etc/rc.d/rc.local
 
  pico -w /etc/rc.d/rc.local
   Line 97: Line 103:  
Please read the information at the authors website  http://www.hanscees.com/sme7/wondershaperbeefedup.html
 
Please read the information at the authors website  http://www.hanscees.com/sme7/wondershaperbeefedup.html
   −
Also read information provided in the forum posts shown in the References section for additional configuration tips.
+
Also read information provided in the forum posts (linked in the References section) for additional & very informative configuration & customisation tips.
 +
 
 +
===Contribs for Wondershaper & QOS===
 +
 
 +
Adding all this information here to help sort out & track what's going on with these packages, will tidy it up later & remove unwanted information.
 +
 
 +
There are two contribs rpm packages that have been developed but the status of them both is unsure. It appears that smeserver-htbwondershaper may have problems & is no longer being developed. It appears that smeserver-qos is awaiting import into the contribs cvs system.
 +
 +
There are also suggestions here http://forums.contribs.org/index.php/topic,45037.msg217958.html#msg217958 by knuddi that software based qos may not work very well in certain types of situations, so the effectiveness of these types of contribs is unsure.
 +
 
 +
The first contrib is here:
 +
 
 +
http://distro.ibiblio.org/smeserver/releases/7/smetest/i386/RPMS/smeserver-htbwshaper-1.0-14.el4.sme.noarch.rpm
 +
 
 +
See the original release announcement here http://forums.contribs.org/index.php/topic,43321.0.html
 +
 
 +
Comments by S Noble from http://forums.contribs.org/index.php/topic,45037.msg217934.html#msg217934
 +
see http://bugs.contribs.org/show_bug.cgi?id=5005 for a later version of  smeserver-htbwshaper
 +
 
 +
"I made a few minor changes, but it still had a fundamental flaw it issues an iptables command to enable shaping after booting
 +
but if you run a sme event that restart masq the command isn't rerun I couldn't work out how to insert the command into a template"
 +
 
 +
According to http://bugs.contribs.org/show_bug.cgi?id=5005 S Noble says the contrib is abandoned, refer http://forums.contribs.org/index.php/topic,45037.msg217923.html
 +
 
 +
 
 +
The other contrib package is here:
 +
 
 +
http://repo.firewall-services.com/sme/noarch/smeserver-qos-1.0-4.noarch.rpm
 +
or later versions here for el4 and el5 are here:
 +
http://repo.firewall-services.com/centos/4/noarch/smeserver-qos-1.1-10.el4.fws.noarch.rpm
 +
and
 +
http://repo.firewall-services.com/centos/5/noarch/smeserver-qos-1.2.0-1.el5.fws.noarch.rpm
 +
 
 +
Some comments from Nov 2009 re above packages from VIP-ire at http://forums.contribs.org/index.php/topic,45037.msg217927.html#msg217927
 +
 
 +
"This contrib (smeserver-qos) is not documented yet, because I'd first like to import it in the smecontrib repo. I've already asked for it, but it seems it wasn't accepted. The reason is that there's already a contrib called smeserver-htbwshaper imported, which does the same job. This contrib was not sufficient for my need, so I've "forked" it and created smeserver-qos. But now, the changes I've made are too important to merge it with the smeserver-htbwshaper with small patches. If I find some time to talk to the author of the original contrib, I'll try to merge the changes."
 +
 
 +
and by mary
 +
"The HTBWondershaper script method has been replaced by the smeserver-htbwshaper rpm, which has been superseded by the smeserver-qos rpm.
 +
It's just that processes and documentation have not been updated to match the newer releases."
    +
In December 2012 at http://bugs.contribs.org/show_bug.cgi?id=7100 Daniel wrote "I'll try to write a little wiki page as soon as the package is imported in CVS and built"
 +
 +
Also refer to http://bugs.contribs.org/show_bug.cgi?id=7100 for progress re development of smeserver-qos
 +
 +
Also read http://forums.contribs.org/index.php/topic,45037.0.html for general details of usage & development progress
    
===References===
 
===References===
    
http://forums.contribs.org/index.php?topic=29546.0
 
http://forums.contribs.org/index.php?topic=29546.0
 +
 
http://forums.contribs.org/index.php?topic=29495.0
 
http://forums.contribs.org/index.php?topic=29495.0
 +
 
http://www.hanscees.com/sme7/wondershaperbeefedup.html
 
http://www.hanscees.com/sme7/wondershaperbeefedup.html
 +
 
http://www.hanscees.com/sme7/HTBWondershaper
 
http://www.hanscees.com/sme7/HTBWondershaper
 +
 
http://lartc.org/
 
http://lartc.org/
 +
 +
 +
----
 +
[[Category: Deprecated Contrib]]
 +
[[Category: Administration]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu