--- wondershaper-1.1a.orig/TODO +++ wondershaper-1.1a/TODO @@ -1 +1,30 @@ -- move configuration away from the script itself +TODO list + +1) Three wishlist bugs to modify the config system +My original plan was a vaguely worded goal to "move configuration away from the +script itself". Here are some more details. +The three wishlist bugs are: +235385 which contains some sample code for command line options which are more +"unix-like" +253554 requests I use the /etc/default system to contain "defaults" for various +internal functions. +253790 requests I use the HTB instead of the CBQ. That should be a configurable +option. +What I plan to do is combine all three bugs into one coherent plan that balances +the trend of adding complications and features with the goal of making the +wondershaper a very basic entry level simple to config system. +What I want is something that can be run completely off the command line +but can also support config files in /etc/default, while supporting the +additional configurable options that have been requested. +Finally, when I determine a new config method I need to have some way to support +current users with a backwards compatible config method. + +2) Research the HTB vs CBQ in the following areas: +Compare benchmark tests and subjective tests of HTB and CBQ +Compare kernel compatibility of HTB and CBQ and produce some kind of statement +or table explaining which kernel versions support each queue and which Debian +kernel packages support each queue. +Given research, decide if and how to integrate HTB support into the wondershaper. +I need to do more research before determining if this whole HTB CBQ issue +might be "too complicated" for a simple entry level script like the +wondershaper. --- wondershaper-1.1a.orig/wshaper +++ wondershaper-1.1a/wshaper @@ -1,17 +1,45 @@ -#!/bin/bash +#!/bin/sh # Wonder Shaper + +# Modifications by Vince Mulhollon for debian package + +if [ $# -eq 0 ]; then + echo Please read the man page for the wondershaper and + echo the file /usr/share/doc/wondershaper/README.Debian.gz + exit +fi + +if [ $# -eq 1 ]; then + /sbin/tc -s qdisc ls dev $1 + /sbin/tc -s class ls dev $1 + exit +fi + +if [ $# -eq 2 ]; then + /sbin/tc qdisc del dev $2 root 2> /dev/null > /dev/null + /sbin/tc qdisc del dev $2 ingress 2> /dev/null > /dev/null + echo Wondershaper queues have been cleared. + exit +fi + +if [ $# -ne 3 ]; then + echo Please read the man page for the wondershaper and + echo the file /usr/share/doc/wondershaper/README.Debian.gz + exit +fi + # please read the README before filling out these values # # Set the following values to somewhat less than your actual download # and uplink speed. In kilobits. Also set the device that is to be shaped. -DOWNLINK=800 -UPLINK=220 -DEV=eth0 +DOWNLINK=$2 +UPLINK=$3 +DEV=$1 # low priority OUTGOING traffic - you can leave this blank if you want # low priority source netmasks -NOPRIOHOSTSRC=80 +NOPRIOHOSTSRC= # low priority destination netmasks NOPRIOHOSTDST= @@ -24,75 +52,83 @@ # Now remove the following two lines :-) -echo Please read the documentation in 'README' first :-\) -exit +#echo Please read the documentation in 'README' first :-\) +#exit ######################################################### -if [ "$1" = "status" ] -then - tc -s qdisc ls dev $DEV - tc -s class ls dev $DEV - exit -fi +#if [ "$1" = "status" ] +#then +# /sbin/tc -s qdisc ls dev $DEV +# /sbin/tc -s class ls dev $DEV +# exit +#fi # clean existing down- and uplink qdiscs, hide errors -tc qdisc del dev $DEV root 2> /dev/null > /dev/null -tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null +/sbin/tc qdisc del dev $DEV root 2> /dev/null > /dev/null +/sbin/tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null -if [ "$1" = "stop" ] -then - exit -fi +#if [ "$1" = "stop" ] +#then +# exit +#fi ###### uplink # install root CBQ -tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit +/sbin/tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit # shape everything at $UPLINK speed - this prevents huge queues in your # DSL modem which destroy latency: # main class -tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \ +/sbin/tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \ allot 1500 prio 5 bounded isolated # high prio class 1:10: -tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \ +/sbin/tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \ allot 1600 prio 1 avpkt 1000 # bulk and default class 1:20 - gets slightly less traffic, # and a lower priority: -tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \ +/sbin/tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $((9*$UPLINK/10))kbit \ allot 1600 prio 2 avpkt 1000 # 'traffic we hate' -tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $[8*$UPLINK/10]kbit \ +/sbin/tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $((8*$UPLINK/10))kbit \ allot 1600 prio 2 avpkt 1000 # all get Stochastic Fairness: -tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 -tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 -tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 +/sbin/tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 +/sbin/tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 +/sbin/tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 # start filters # TOS Minimum Delay (ssh, NOT scp) in 1:10: -tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ +/sbin/tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ match ip tos 0x10 0xff flowid 1:10 # ICMP (ip protocol 1) in the interactive class 1:10 so we # can do measurements & impress our friends: -tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \ +/sbin/tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \ match ip protocol 1 0xff flowid 1:10 +# pablo.iranzo@uv.es provided a patch for the MLDonkey system +# The MLDonkey uses small UDP packets for source propogation +# which floods the wondershaper out. +/sbin/tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ + match ip protocol 17 0xff \ + match ip sport 4666 0xffff \ + flowid 1:30 + # prioritize small packets (<64 bytes) -tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \ +/sbin/tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \ match ip protocol 6 0xff \ match u8 0x05 0x0f at 0 \ match u16 0x0000 0xffc0 at 2 \ @@ -102,31 +138,31 @@ # some traffic however suffers a worse fate for a in $NOPRIOPORTDST do - tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ + /sbin/tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ match ip dport $a 0xffff flowid 1:30 done for a in $NOPRIOPORTSRC do - tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ + /sbin/tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ match ip sport $a 0xffff flowid 1:30 done for a in $NOPRIOHOSTSRC do - tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ + /sbin/tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ match ip src $a flowid 1:30 done for a in $NOPRIOHOSTDST do - tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ + /sbin/tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ match ip dst $a flowid 1:30 done # rest is 'non-interactive' ie 'bulk' and ends up in 1:20 -tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ +/sbin/tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ match ip dst 0.0.0.0/0 flowid 1:20 @@ -137,11 +173,11 @@ # # attach ingress policer: -tc qdisc add dev $DEV handle ffff: ingress +/sbin/tc qdisc add dev $DEV handle ffff: ingress # filter *everything* to it (0.0.0.0/0), drop everything that's # coming in too fast: -tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ +/sbin/tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 --- wondershaper-1.1a.orig/debian/changelog +++ wondershaper-1.1a/debian/changelog @@ -0,0 +1,94 @@ +wondershaper (1.1a-6) unstable; urgency=low + + * Added ${misc:Depends} to control + This fixes lintian debhelper-but-no-misc-depends. + * Upgraded dh compat from 4 to 8. Updated control and compat to match. + This fixes lintian package-uses-deprecated-debhelper-compat-version + * Upgrade standards version from 3.8.0 to 3.9.1.0 + This fixes lintian out-of-date-standards-version + * Fix copyright file. + This fixes lintian copyright-without-copyright-notice + * Changed from dh_clean -k to dh_prep + This fixes lintian dh-clean-k-is-deprecated + * The wondershaper command has been relocated from /usr/sbin to /sbin, + in order to comply with Debian Policy. Please update any scripts you + might have pointing to the old location. + Policy considerations: + As a boot time network interface command, it belongs in the same + place as /sbin/tc, iptables, etc. + From a dependency standpoint, its intended to be run from + /etc/network/interfaces at boot time, so cannot be in a directory + that is theoretically NFS mountable. + * Mentined RTNETLINK errors resulting from CONFIG_NET_ACT_POLICE + misoptioning in the Debian README file. + (Closes: #395971) + * Use full path when calling tc + (Closes: #504583) + * Added some commentary to the Debian README explaining how to + optionally optimize the results. + (Closes: #592579) + + -- Vince Mulhollon Fri, 04 Mar 2011 20:37:37 -0600 + +wondershaper (1.1a-5) unstable; urgency=low + + * Update to Standards 3.8.0 and make the package lintian clean. + * adjust path to script in README. (Closes: #463486) + Patch courtesy of Eric Mountain + * remove bashims. (Closes: #504640) + Patch courtesy of John Eikenberry + + -- Rolf Leggewie Sat, 14 Feb 2009 19:31:29 +0100 + +wondershaper (1.1a-4.1) unstable; urgency=low + + * Non-maintainer upload to make the package Policy compliant. + * Changed wshaper binary from /sbin to /usr/sbin. Thanks to Bernd + Zeimetz for the patch. Added NEWS.Debian about the change. + (Closes: #439142) + * Removed /usr/bin from the debian/dirs file, as it was unneeded. + * Fixed bashisms in wshaper binary. Thanks to Maximilian Attems for + the patch. (Closes: #292123, #271512) + * Fixed the pointers to the docs to say README.Debian.gz instead of + README.Debian. (Closes: #286052) + + -- Margarita Manterola Thu, 30 Aug 2007 13:36:09 -0300 + +wondershaper (1.1a-4) unstable; urgency=low + + * Patched to remove the bash-isms, works with bash and dash + (Closes: #260641) + (Closes: #254897) + * Fixed the NOPRIOHOSTSRC bug + (Closes: #260641) + (Closes: #255347) + * Nothing bad heard about the mldonkey patches. + (Closes: #253627) + * Modified the README.Debian file to explain the kernel + patch situation. + (Closes: #261133) + + -- Vince Mulhollon Tue, 3 Aug 2004 19:09:17 -0500 + +wondershaper (1.1a-3) unstable; urgency=low + + * Pablo.Iranzo@uv.es provided a patch in bug 253627 which helps + support the mldonkey system. + * The TODO file contains a "design document" explaining my current + "progress" in my config redesign for the wondershaper. + + -- Vince Mulhollon Fri, 11 Jun 2004 20:17:20 -0500 + +wondershaper (1.1a-2) unstable; urgency=low + + * Edited the description text in the control file. + * Edited the readme file + + -- Vince Mulhollon Sun, 30 May 2004 15:09:50 -0500 + +wondershaper (1.1a-1) unstable; urgency=low + + * Initial Release. + + -- Vince Mulhollon Sat, 1 May 2004 22:02:38 -0500 + --- wondershaper-1.1a.orig/debian/watch +++ wondershaper-1.1a/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://lartc.org/wondershaper/wondershaper-(.*)\.tar\.gz --- wondershaper-1.1a.orig/debian/dirs +++ wondershaper-1.1a/debian/dirs @@ -0,0 +1 @@ +/sbin --- wondershaper-1.1a.orig/debian/docs +++ wondershaper-1.1a/debian/docs @@ -0,0 +1,2 @@ +README +TODO --- wondershaper-1.1a.orig/debian/compat +++ wondershaper-1.1a/debian/compat @@ -0,0 +1 @@ +8 --- wondershaper-1.1a.orig/debian/copyright +++ wondershaper-1.1a/debian/copyright @@ -0,0 +1,21 @@ +This package was debianized by Vince Mulhollon on +Sat, 1 May 2004 22:02:38 -0500. + +It was downloaded from http://lartc.org/wondershaper/wondershaper-1.1a.tar.gz + +Upstream Author: Bert Hubert + +Copyright: + +GNU GPL v2 as described in /usr/share/common-licenses/GPL-2 + +A direct cut and paste from the website http://lartc.org/wondershaper/ + +bert hubert +© Copyright 2002 +Licensed under the GPL + +To make lintian happy I can reorder: + +Copyright 2002 Bert Hubert + --- wondershaper-1.1a.orig/debian/wondershaper.8 +++ wondershaper-1.1a/debian/wondershaper.8 @@ -0,0 +1,68 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH WONDERSHAPER 8 "May 30, 2004" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +wondershaper \- simple traffic shaping script +.SH SYNOPSIS +.B wondershaper +.RI [ interface ] +.br +.B wondershaper +clear +.RI [ interface ] +.br +.B wondershaper +.RI [ interface ] +.RI [ downlink ] +.RI [ uplink ] +.SH DESCRIPTION +This manual page documents briefly the +.B wondershaper +script. +This manual page was written for the Debian distribution +because the original script does not have a manual page. +.PP +\fBwondershaper\fP is a traffic shaping script that provides +low latency, prioritizes bulk transfers below normal web traffic, +prioritizes interactive shells above normal web traffic, +and attempts to prevent upload and download traffic from affecting +each other's ack packets. Put simply, the wondershaper +makes your internet connection more "responsive" +.SH SYNTAX +A summary of wondershaper syntax is included below. +For a complete description, see the files in /usr/share/doc/wondershaper. +.TP +.B wondershaper [ interface ] +Shows the status of traffic shaping on that interface. +.TP +.B wondershaper clear [ interface ] +Removes all traffic shaping from that interface. +.TP +.B wondershaper [ interface ] [ downlink ] [ uplink ] +Configures the wondershaper on the specified interface, given the +specified downlink speed in kilobits per second, and the specified +uplink speed in kilobits per second. +.SH SEE ALSO +.br +The programs are documented fully by: +.PP +/usr/share/doc/wondershaper/README.Debian.gz +.PP +/usr/share/doc/wondershaper/README.gz +.SH AUTHOR +This manual page was written by Vince Mulhollon , +for the Debian project (but may be used by others). --- wondershaper-1.1a.orig/debian/control +++ wondershaper-1.1a/debian/control @@ -0,0 +1,33 @@ +Source: wondershaper +Section: net +Priority: extra +Homepage: http://lartc.org/wondershaper/ +Maintainer: Vince Mulhollon +Uploaders: Rolf Leggewie +Build-Depends: debhelper (>= 8) +Standards-Version: 3.9.1.0 + +Package: wondershaper +Architecture: all +Depends: iproute,${misc:Depends} +Description: Easy to use traffic shaping script + An easy to use traffic shaping script that provides these improvements: + * Low latency for interactive traffic (and pings) at all times + * Allow websurfing at reasonable speeds while uploading / downloading + * Make sure uploads don't hurt downloads + * Make sure downloads don't hurt uploads + . + It does this by: + * Limiting upload speed slightly, to eliminate queues + * Limiting download speed, while allowing bursts, to eliminate queues + * Interactive traffic skips the queue + * ACKs and tiny packets skip the queue + . + Configuring the wondershaper requires you to accurately and precisely + determine your consistent upload and download speeds. + . + The wondershaper is the simplest, easiest to use, entry level, traffic + shaping script provided by Debian. + . + After installing this package, read highly the detailed instructions: + /usr/share/doc/wondershaper/README.Debian --- wondershaper-1.1a.orig/debian/rules +++ wondershaper-1.1a/debian/rules @@ -0,0 +1,96 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + #/usr/bin/docbook-to-man debian/wondershaper.sgml > wondershaper.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + #-$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/wondershaper. + #$(MAKE) install DESTDIR=$(CURDIR)/debian/wondershaper + cp wshaper $(CURDIR)/debian/wondershaper/sbin/wondershaper + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +# We have nothing to do by default. +binary-arch: build install + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- wondershaper-1.1a.orig/debian/README.Debian +++ wondershaper-1.1a/debian/README.Debian @@ -0,0 +1,184 @@ +How to set up the wondershaper on a Debian system + +Outline: + +STEP 0 Read this entire document before continuing, also, prerequisites +STEP 1 Gather data +STEP 2 Pre-test +STEP 3 Enable the wondershaper +STEP 4 Post-test +STEP 5 Controling the wondershaper +STEP 6 Permanent setup +STEP 7 Monitoring the wondershaper +STEP 8 Send email to vlm@debian.org + +STEP 0 Read this entire document before continuing + +Installing the wondershaper requires a short list of entry level admin +skills as listed below: +Root access. +Basic file manipulation commands (mv, cp, etc) +Able to edit text config files (vi, joe, emacs, etc) +Able to test upload and download speeds (perhaps ftp, wget, etc) + +The standard Debian 2.6 kernels work with no modifications or +recompilations required. If you compiled your own kernel, you may +need to include various optional modules and drivers. +If your kernel does not include the required modules, you will get +errors such as: +"RTNETLINK answers: Invalid argument" +At least one cause of RTNETLINK errors is a kernel compiled without +the CONFIG_NET_ACT_POLICE option. With the notable exception of +Debian bug 395882, Debian provided kernels do work... + +STEP 1 Gather data + +Determine your upstream address, perhaps by running route -n as root + +root@firewall:~# route -n +Kernel IP routing table +Destination Gateway Genmask Flags Metric Ref Use Iface +0.0.0.0 1.2.3.4 0.0.0.0 UG 0 0 0 eth1 + +in this example, your upstream address is 1.2.3.4 + +Figure out your REAL download and upload speeds. +If you have an honest ISP, you can use the specified values that +you ordered with the circuit. +Otherwise, do some uploads and downloads to measure your speeds. +Note you need to measure this in KILOBITS per SECOND not megabytes +or whatever. + +STEP 2 Pre-test + +Start a large full line rate download, perhaps an "apt-get update" + +At the same time, ping your upstream serial port, in this +example 1.2.3.4. My results on my DSL line are listed below: + +20 packets transmitted, 20 received, 0% packet loss, time 19022ms +rtt min/avg/max/mdev = 73.251/249.207/372.279/80.579 ms + +The point of the wondershaper is to reduce the average and peak rtt + +Try to ssh or telnet to something out on the net. Notice the high +latency as seen by "jerkiness" when typing and scrolling, etc. + +Write down your test results or cut and paste them somewhere so that +you can compare your Post-test with your Pre-test results. + +STEP 3 Enable the wondershaper + +In this example, your ISP connects to eth1, and you've got +a downlink speed of 500 K and an uplink speed of 100K. + +As root, execute the following command: + +wondershaper eth1 500 100 + +STEP 4 Post-test + +Do the same test you did in the pre-test. +Here are the results I got on my DSL line: + +20 packets transmitted, 20 received, 0% packet loss, time 19019ms +rtt min/avg/max/mdev = 24.773/84.195/201.361/36.426 ms + +Now ssh or telnet to something out on the net and see if there is less +latency. + +Now, compare your testing results. In my test example: +My best case ping time dropped from 73 ms to 24 ms, a 67% improvement +My average ping time dropped from 249 ms to 84 ms, a 66% improvement +My worst case ping time dropped from 372 ms to 201 ms a 45% improvement + +So, on my firewall, my measured latencies while under load generally +dropped by "about" 50%. + +That's a pretty big improvement for a 175 line script and 30 minutes +of installation time! + +Its worth trying other values to optimize the results. Roughly one in +thirty people will benefit from somewhat different values, see Debian +bug number 592579 for an example. Several tests and some graph +paper will indicate the ideal setpoints. + +STEP 5 Controlling the wondershaper + +Assuming your ISP is connected to eth0, you can examine your traffic +shaping stats by running "wondershaper eth0" as root. + +Assuming your ISP is connected to eth0, you can remove all traffic +shaping from eth0 by running "wondershaper clear eth0" as root. +Note that the wondershaper doesn't care what the first word is, +you could just as well enter "wondershaper delete eth0" or whatever +word works for you. + +You should probably do several cycles of enabling, testing, and +deleting, using various combinations of uplink and downlink speeds +to determine the configuration with the best overall performance. + +I have found the best strategy to use is to configure the wondershaper +to relatively low values and work your way upwards until the latency +suffers too much, then drop back to the best "reasonable" value. + +STEP 6 Permanent setup + +It is relatively easy to permanently install the wondershaper on your +system. + +In this example, we will assume your ISP is connected to eth1, and you +get your best performance with a downlink speed of 500K and an upload +speed of 100K. + +The first step is to save a copy of your current /etc/network/interfaces +file into the root directory just in case you totally screw up the file +while installing the wondershaper. As root run: +cp /etc/network/interfaces /root/backup.interfaces + +Now if you totally screw up, or want a very simple way to get rid of +the wondershaper, as root, run the following command: +cp /root/backup.interfaces /etc/network/interfaces + +Before installing the wondershaper, your file /etc/network/interfaces +probably looks something like this: + +auto eth1 +iface eth1 inet dhcp + +After logging in as root and editing that file to install the +wondershaper, that same paragraph will look like this: + +auto eth1 +iface eth1 inet dhcp + up /sbin/wondershaper eth1 500 100 + down /sbin/wondershaper remove eth1 + +After your final edit, you may wish to ifdown eth1 and then ifup eth1 +while logged in as root. This is recommended as a first test step, +because if you totally screw up the file you will easily be able to +copy the saved file on top of it, or perhaps + +Most people think its a good idea once you think you are done, to +reboot and make sure everything boots up "OK". It's better to find out +something won't boot up under controlled conditions when you expect it, +rather than at 2am months after you made the change. However, there is +no "need" to reboot the computer merely to make the wondershaper work. + +If you ever decide to remove the wondershaper package from your debian +system, remember that you will need to delete the lines you added to +the interfaces file, either manually or by using the backup file you made. + +STEP 7 Monitoring the wondershaper + +Assuming your ISP is connected to eth0, you can examine your traffic +shaping stats by running "wondershaper eth0" as root. + +STEP 8 Send email to vlm@debian.org + +The last step is optional. +Please send an email to vlm@debian.org, including your before and +after test results, and let him know of any problems with the +installation and operation of the wondershaper, and any improvements +you would suggest for this document. + --- wondershaper-1.1a.orig/debian/wondershaper.manpages +++ wondershaper-1.1a/debian/wondershaper.manpages @@ -0,0 +1 @@ +debian/wondershaper.8 --- wondershaper-1.1a.orig/debian/NEWS +++ wondershaper-1.1a/debian/NEWS @@ -0,0 +1,13 @@ +wondershaper (1.1a-4.1) unstable; urgency=low + + The wondershaper command has been relocated from /usr/sbin to /sbin, + in order to comply with Debian Policy. Please update any scripts you + might have pointing to the old location. + Policy considerations: + As a boot time network interface command, it belongs in the same + place as /sbin/tc, iptables, etc. + From a dependency standpoint, its intended to be run from + /etc/network/interfaces at boot time, so cannot be in a directory + that is theoretically NFS mountable. + + -- Vince Mulhollon Fri, 04 Mar 2011 20:37:37 -0600