diff --git a/Shorewall-docs2/traffic_shaping.xml b/Shorewall-docs2/traffic_shaping.xml index 1885a6570..683175d39 100644 --- a/Shorewall-docs2/traffic_shaping.xml +++ b/Shorewall-docs2/traffic_shaping.xml @@ -21,7 +21,7 @@ - 2005-12-02 + 2005-12-03 2001-2004 @@ -233,6 +233,157 @@ url="http://www.speedcheck.arcor.de/cgi-bin/speedcheck.cgi">arcor speed check). Be sure to choose a test located near you. +
+ /etc/shorewall/tcdevices + + This file allows you to define the incoming and outgoing bandwidth + for the devices you want traffic shaping to be enabled. That means, if + you want to use traffic shaping for a device, you have to define it + here. + + Columns in the file are as follows: + + + + 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 FAQ #18. + You man NOT specify wildcards here, e.g. if you have multiple ppp + interfaces, you need to put them all in here! + + + + IN-BANDWIDTH - The incoming Bandwidth of that interface. + Please note that you are not able to do traffic shaping on incoming + traffic, as the traffic is already received before you could do so. + This Column allows you to define the maximum traffic allowed for + this interface in total, if the rate is exceeded, the packets are + dropped. You want this mainly if you have a DSL or Cable Connection + to avoid queuing at your providers side. If you don't want any + traffic to be dropped set this to a value faster than your interface + maximum rate. + + + + OUT-BANDWIDTH - Specifiy the outgoing bandwidth of that + interface. This is the maximum speed your connection can handle. It + is also the speed you can refer as "full" if you define the tc + classes. Outgoing traffic above this rate will be dropped. + + + + + + + Suppose you are using PPP over Ethernet (DSL) and ppp0 is the + interface for this. The device has an outgoing bandwidth of 500kbit + and an incoming bandwidth of 6000kbit + + #INTERFACE IN-BANDWITH OUT-BANDWIDTH +ppp0 6000kbit 500kbit + +
+ +
+ /etc/shorewall/tcclasses + + This file allows you to define the actual classes that are used to + split the outgoing traffic. + + + + INTERFACE - Name of interface. Must match the name of an + interface with an entry in + /etc/shorewall/tcdevices. + + + + MARK - The mark value which is an integer in the range 1-255. + You define these marks in the tcrules file, marking the traffic you + want to go into the queueing classes defined in here. 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 even if there are others that + have a guaranteed bandwith but a lower priority. + + + + 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 important services (e.g. interactive like 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. + + + + PRIORITY - you have to define a priority for the class. + packets in a class with a higher priority (=lesser value) are + handled before less priorized onces. You can just define the mark + value here also, if you are increasing the mark values with lesser + priority. + + + + OPTIONS - A comma-separated list of options including the + following: + + + + default - this is the default class for that interface + where all traffic should go, that is not classified + otherwise. + + + defining default for exactly one class per interface is + mandatory! + + + + + tos-<tosname> - this lets you define a filter for + the given <tosname> which lets you define a value of the + Type Of Service bits in the ip package which causes the package + to go in this class. 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 regardless of the mark on + the package. You can use the following for this option: + tos-minimize-delay (16) tos-maximize-throughput (8) + tos-maximize-reliability (4) tos-minimize-cost (2) + tos-normal-service (0) + + + Each of this options is only valid for one class per interface. + + + + + tcp-ack - if defined causes an tc filter to be created + that puts all tcp ack 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 of the ack + packets is limited to 64 bytes as some applications (p2p for + example) use to make every package an ack package which would + cause them all into here. We want only packets WITHOUT payload + to match, so the size limit. Bigger packets just take their + normal way into the classes. + + + This option is only valid for class per interface. + + + + + +
+
/etc/shorewall/tcrules @@ -349,159 +500,6 @@
-
- /etc/shorewall/tcdevices - - This file allows you to define the incoming and outgoing bandwidth - for the devices you want traffic shaping to be enabled. That means, if - you want to use traffic shaping for a device, you have to define it - here. - - Columns in the file are as follows: - - - - 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 FAQ #18. - You man NOT specify wildcards here, e.g. if you have multiple ppp - interfaces, you need to put them all in here! - - - - IN-BANDWIDTH - The incoming Bandwidth of that interface. - Please note that you are not able to do traffic shaping on incoming - traffic, as the traffic is already received before you could do so. - This Column allows you to define the maximum traffic allowed for - this interface in total, if the rate is exceeded, the packets are - dropped. You want this mainly if you have a DSL or Cable Connection - to avoid queuing at your providers side. If you don't want any - traffic to be dropped set this to a value faster than your interface - maximum rate. - - - - OUT-BANDWIDTH - Specifiy the outgoing bandwidth of that - interface. This is the maximum speed your connection can handle. It - is also the speed you can refer as "full" if you define the tc - classes. Outgoing traffic above this rate will be dropped. - - - - - - - Suppose you are using PPP over Ethernet (DSL) and ppp0 is the - interface for this. The device has an outgoing bandwidth of 500kbit - and an incoming bandwidth of 6000kbit - - #INTERFACE IN-BANDWITH OUT-BANDWIDTH -ppp0 6000kbit 500kbit - -
- -
- /etc/shorewall/tcclasses - - This file allows you to define the actual classes that are used to - split the outgoing traffic. - - - - 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 FAQ #18. - You man NOT specify wildcards here, e.g. if you have multiple ppp - interfaces, you need to put them all in here! - - - - MARK - The mark value which is an integer in the range 1-255. - You define these marks in the tcrules file, marking the traffic you - want to go into the queueing classes defined in here. 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 even if there are others that - have a guaranteed bandwith but a lower priority. - - - - 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 important services (e.g. interactive like 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. - - - - PRIORITY - you have to define a priority for the class. - packets in a class with a higher priority (=lesser value) are - handled before less priorized onces. You can just define the mark - value here also, if you are increasing the mark values with lesser - priority. - - - - OPTIONS - A comma-separated list of options including the - following: - - - - default - this is the default class for that interface - where all traffic should go, that is not classified - otherwise. - - - defining default for exactly one class per interface is - mandatory! - - - - - tos-<tosname> - this lets you define a filter for - the given <tosname> which lets you define a value of the - Type Of Service bits in the ip package which causes the package - to go in this class. 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 regardless of the mark on - the package. You can use the following for this option: - tos-minimize-delay (16) tos-maximize-throughput (8) - tos-maximize-reliability (4) tos-minimize-cost (2) - tos-normal-service (0) - - - Each of this options is only valid for one class per interface. - - - - - tcp-ack - if defined causes an tc filter to be created - that puts all tcp ack 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 of the ack - packets is limited to 64 bytes as some applications (p2p for - example) use to make every package an ack package which would - cause them all into here. We want only packets WITHOUT payload - to match, so the size limit. Bigger packets just take their - normal way into the classes. - - - This option is only valid for class per interface. - - - - - -
-
ppp devices @@ -518,7 +516,7 @@ ppp0 6000kbit 500kbit #! /bin/sh -/sbin/shorewall restart +/sbin/shorewall refresh