2005-08-31 22:48:22 +02:00
|
|
|
# tc4shorewall Version 0.5
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# /etc/shorewall/tcclasses
|
|
|
|
#
|
|
|
|
# Define the classes used for traffic shaping in this file.
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
2005-08-31 22:48:22 +02:00
|
|
|
# A note on the rate/bandwidth definitions used in this file:
|
|
|
|
#
|
|
|
|
# - don't use a space between the integer value and
|
|
|
|
# the unit: 30kbit is valid while 30 kbit is NOT.
|
|
|
|
#
|
|
|
|
# - you can use one of the following units:
|
|
|
|
#
|
|
|
|
# kbps Kilobytes per second
|
|
|
|
# mbps Megabytes per second
|
|
|
|
# kbit Kilobits per second
|
|
|
|
# mbit Megabits per second
|
2005-09-28 21:39:47 +02:00
|
|
|
# bps or a
|
2005-08-31 22:48:22 +02:00
|
|
|
# bare number Bytes per second
|
|
|
|
#
|
|
|
|
# - if you want the values to be calculated for you depending
|
|
|
|
# on the output bandwidth setting defined for an interface
|
|
|
|
# in tcdevices, you can use expressions like the following:
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
2005-08-31 22:48:22 +02:00
|
|
|
# full/3 causes the bandwidth to be calculated
|
|
|
|
# as 3 of the the full outgoing
|
|
|
|
# speed that is defined.
|
|
|
|
#
|
|
|
|
# full*9/10 will set this bandwidth to 9/10 of
|
|
|
|
# the full bandwidth
|
|
|
|
#
|
|
|
|
# DO NOT add a unit to the rate if it is calculated !
|
|
|
|
#
|
|
|
|
# Columns are:
|
|
|
|
#
|
|
|
|
# INTERFACE Name of interface. Each interface may be listed only
|
|
|
|
# once in this file. You may NOT specify the name of
|
|
|
|
# an alias (e.g., eth0:0) here; see
|
|
|
|
# http://www.shorewall.net/FAQ.htm#faq18
|
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
# You may NOT specify wildcards here, e.g. if you
|
2005-08-31 22:48:22 +02:00
|
|
|
# have multiple ppp interfaces, you need to put
|
|
|
|
# them all in here!
|
|
|
|
#
|
|
|
|
# Please note that you can only use interface names
|
|
|
|
# in here that have a bandwidth defined in the tcdevices
|
|
|
|
# file
|
|
|
|
#
|
|
|
|
# MARK The mark value which is an integer in the range 1-255.
|
|
|
|
# You define this marks in the tcrules file, marking
|
|
|
|
# the traffic you want to fit in the classes defined
|
2005-09-28 21:39:47 +02:00
|
|
|
# in here.
|
2005-08-31 22:48:22 +02:00
|
|
|
#
|
|
|
|
# You can use the same marks for different Interfaces
|
|
|
|
#
|
|
|
|
# RATE The minimum bandwidth this class should get,
|
|
|
|
# when the traffic load rises. Please note
|
|
|
|
# that first the classes which equal or a lesser priority
|
|
|
|
# value are served.
|
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
# You can use the following
|
2005-08-31 22:48:22 +02:00
|
|
|
#Use kbit or kbps(for Kilobytes per second) for
|
|
|
|
# speed, and make sure there is NO space between the
|
|
|
|
# number and the unit.
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
2005-08-31 22:48:22 +02:00
|
|
|
# CEIL The maximum bandwidth this class is allowed to use
|
|
|
|
# when the link is idle. Useful if you have traffic
|
|
|
|
# which can get full speed when more needed services
|
|
|
|
# (e.g. ssh) are not used.
|
|
|
|
#
|
|
|
|
# You can use the value "full" in here for setting
|
|
|
|
# the maximum bandwidth to the defined output bandwidth
|
|
|
|
# of that interface
|
|
|
|
#
|
|
|
|
# Use kbit or kbps(for Kilobytes per second) for
|
|
|
|
# speed, and make sure there is NO space between the
|
|
|
|
# number and the unit.
|
|
|
|
#
|
|
|
|
# PRIORITY you have to define a priority for the class
|
|
|
|
# Packages in a class with a higher priority (=lesser value)
|
|
|
|
# are handled before lesser priority onces.
|
|
|
|
# You can just define the mark value here also, if you are
|
|
|
|
# increasing the mark values with lesser priority.
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
|
|
|
# OPTIONS A comma-separated list of options including the
|
2005-08-31 22:48:22 +02:00
|
|
|
# following:
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
|
|
|
# default - this is the default class for that
|
|
|
|
# interface where all traffic should go,
|
2005-08-31 22:48:22 +02:00
|
|
|
# that is not classified otherwise.
|
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
# NOTE: defining default for exactly one
|
2005-08-31 22:48:22 +02:00
|
|
|
# class per interface is mandatory!
|
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
# tos-<tosname> - this lets you define a filter for
|
2005-08-31 22:48:22 +02:00
|
|
|
# the given <tosname> which lets you
|
|
|
|
# define a value of the Type Of Service
|
2005-10-04 16:54:20 +02:00
|
|
|
# bits in the ip packet which causes
|
|
|
|
# the packet to go in this class.
|
2005-08-31 22:48:22 +02:00
|
|
|
# Please note, that this filter overrides
|
|
|
|
# all mark settings, so if you define
|
|
|
|
# a tos filter for a class all traffic
|
|
|
|
# having that mark will go in it regard-
|
2005-10-04 16:54:20 +02:00
|
|
|
# less of the mark on the packet.
|
2005-09-28 21:39:47 +02:00
|
|
|
# You can use the following
|
2005-08-31 22:48:22 +02:00
|
|
|
# for this option
|
|
|
|
#
|
|
|
|
# tos-minimize-delay (16)
|
|
|
|
# tos-maximize-throughput (8)
|
|
|
|
# tos-maximize-reliability (4)
|
|
|
|
# tos-minimize-cost (2)
|
|
|
|
# tos-normal-service (0)
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
|
|
|
# NOTE: each of this options is only
|
2005-08-31 22:48:22 +02:00
|
|
|
# valid for ONE class per interface.
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
2005-08-31 22:48:22 +02:00
|
|
|
# tcp-ack - if defined causes an tc filter to
|
2005-09-28 21:39:47 +02:00
|
|
|
# be created that puts all tcp ack
|
2005-08-31 22:48:22 +02:00
|
|
|
# packets on that interface that have
|
|
|
|
# an size of <=64 Bytes to go in this
|
|
|
|
# class. This is useful for speeding up
|
|
|
|
# downloads. Please note that the size
|
2005-10-04 16:54:20 +02:00
|
|
|
# of the ack packets is limited to 64
|
2005-08-31 22:48:22 +02:00
|
|
|
# bytes as some applications (p2p for
|
2005-10-04 16:54:20 +02:00
|
|
|
# example) use to make every packet an
|
|
|
|
# ack packet which would cause them
|
|
|
|
# all into here. We want only packets
|
2005-08-31 22:48:22 +02:00
|
|
|
# WITHOUT payload to match, so the size
|
|
|
|
# limit.
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
|
|
|
# NOTE: This option is only valid for
|
2005-08-31 22:48:22 +02:00
|
|
|
# ONE class per interface.
|
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
#
|
2005-08-31 22:48:22 +02:00
|
|
|
#
|
|
|
|
# Example 1: Suppose you are using PPP over Ethernet (DSL)
|
|
|
|
# and ppp0 is the interface for this. The
|
|
|
|
# device has an outgoing bandwidth of 500kbit.
|
|
|
|
# You have 3 classes here, the first you can use for
|
|
|
|
# interactive traffic (ssh) the second for p2p networking
|
|
|
|
# and the last one the rest. They all have a guaranteed
|
|
|
|
# bandwidth of 100kbit upstream, but 1 and 3 can get
|
2005-09-28 21:39:47 +02:00
|
|
|
# full speed if link is idle, 2 is limited to 200kbit
|
2005-08-31 22:48:22 +02:00
|
|
|
#
|
2005-09-28 21:39:47 +02:00
|
|
|
# ppp0 1 100kbit full 1 tcp-ack,tos-minimize-delay
|
|
|
|
# ppp0 2 100kbit 200kbit 2
|
2005-10-04 16:58:14 +02:00
|
|
|
# ppp0 3 full/3 full 3 default
|
2005-08-31 22:48:22 +02:00
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
#INTERFACE MARK RATE CEIL PRIORITY OPTIONS
|
|
|
|
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
|