Jim diGriz's QoS

#!/bin/bash
#
# Jim diGriz's QoS Scheduler for an Ethernet Bridge
# <alex@digriz.junk-this.org.uk> [remove 'junk-this' to mail me]
# GPL V2 blar blar blar
# Version: 030706 (aka 6th July 2003)
#
# Dependencies
# 1) HTB3 patch (if <2.4.18) and 'tc' patch
# 2) RED (in kernel 2.4.x)
# 3) iptables (in kernel 2.4.x)
# 4) ESFQ patch (http://www.ssi.bg/~alex/esfq/index.html) and 'tc' patch
#
# N.B.
# shaping only works for OUTGOING packets simply so think which interface to us
#
# Changelog
# [03/04/28] - Started with wondershaper-1.1a script (http://lartc.org/)
# [03/04/28] - migrated using SFQ to ESFQ (for src ip hashing)
# [03/04/29] - added some RED usage (downloading tcp traffic)
#            - fix '$[9*$UPLINK/10]kbit' for 1:20 to '$[8*$UPLINK/10]kbit'
#            - migration to use iptables MANGLE rather than using 'tc filter'
# by using the ADSL-Bandwidth-Management-HOWTO for reference
#      - migration to not use ingress
# [03/07/06] - tweaked values, convinced myself that 15% bandwidth was lost
# due to header overhead and trimmed a further 5% to clear
# buffers.  Tweaked the download link, as ESFQ was set to 'src'
# instead of 'dst' and made RED use the $(DW/IP)IFLIMIT values.
# result in non-fluctuating ping and RED is now working.
# Also added support to exclude 'local' traffic.  Fixed various
# bugs where traffic was not going to their correct queues.
# Note that if you have no 'private' addresses (I have linux
# running as a ethernet brdige and so its on a private IP) you
# can leave the LOCAL_TRAFFIC section alone

# TODO:
# 1) more iptable mangle rules
# 2) tweak iptables rules
# 3) add support for IPMasq
# 4) support to ignore LOCAL_TRAFFIC if need be
Register to read more...