SourceForge.net Logo

D.13. /etc/sysconfig/tc.conf

# GPL $Id: tc.conf,v 1.3 2005/10/09 16:39:05 cvonk Exp $
# run-time configuration for kernel traffic control

# adjust these parameters based on your internet connection !!!!
DOWNLINK=     # disable downlink policing [kbit/s]
#DOWNLINK=480 # slightly under the speed from ISP to our router [kbit/s]
UPLINK=124    # slightly under the speed from our router to ISP [kbit/s]
BURST=30      # allowed burst size [kByte]
return

[classifier]
# column 1  = firewall mark ([shaper] section shows bandwidth allocation)
# column 2  = firewall class
# column 3- = rule
0x10 POSTROUTING -p udp --dport domain              # dns queries
0x10 POSTROUTING -p icmp                            # to measure
0x10 POSTROUTING -p tcp --tcp-flags ACK ACK -m length --length 40
#                                            # improve download while uploading
0x10 POSTROUTING -p tcp --tcp-flags SYN,RST,ACK SYN # TCP conn initiation
0x10 POSTROUTING -m tos --tos Minimize-Delay        # includes ssh / telnet
#
# Browsing the web
#0x11 POSTROUTING -p tcp --dport http               # host browsing the web  
#0x11 POSTROUTING -p tcp --dport https              # host browsing the web  
#
# For those of us that work over this connection
0x12 POSTROUTING -p udp --dport shivavpn            # Intel/Shiva VPN
#
# Maximize throughput
0x13 POSTROUTING -m tos --tos Maximize-Throughput   # TOS Maximize-Throughput
#
# Minimize cost
0x14 POSTROUTING                                    # default

[shaper]
# column 1 = firewall mark
# column 2 = class
# column 3 = priority (0=highest) (priorities may be shared amoung classes)
# column 4 = guaranteed percentage of the bandwidth ('-' means remainder)
# column 5 = ceiling percentage of the bandwidth ('-' means no ceiling)   
0x10 1:10 1 20 50  # class 1:10 gets a guaranteed 20% of the bandwidth
0x11 1:11 2 20  -  # class 1:11 gets a guaranteed 20% of the bandwidth
0x12 1:12 2 30  -  # class 1:12 gets a guaranteed 30% of the bandwidth
0x13 1:13 3 15  -  # class 1:13 gets a guaranteed 15% of the bandwidth
0x14 1:14 3  -  -  # class 1:14 gets the remainder of the guaranteed bandwidth

Example D.13. /etc/sysconfig/tc.conf