2006-11-16 05:17:13 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-02-04 20:31:59 +01:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
2006-11-16 05:17:13 +01:00
|
|
|
<refentry>
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>shorewall-tcdevices</refentrytitle>
|
|
|
|
|
|
|
|
<manvolnum>5</manvolnum>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>tcdevices</refname>
|
|
|
|
|
|
|
|
<refpurpose>Shorewall Traffic Shaping Devices file</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>/etc/shorewall/tcdevices</command>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>Entries in this file define the bandwidth for interfaces on which
|
|
|
|
you want traffic shaping to be enabled.</para>
|
|
|
|
|
2006-11-21 17:45:57 +01:00
|
|
|
<para>If you do not plan to use traffic shaping for a device, don't put it
|
2009-02-04 20:00:16 +01:00
|
|
|
in here as it limits the throughput of that device to the limits you set
|
2006-11-16 05:17:13 +01:00
|
|
|
here.</para>
|
|
|
|
|
2007-01-02 23:51:06 +01:00
|
|
|
<para>A note on the <emphasis>bandwidth</emphasis> definitions used in
|
|
|
|
this file:</para>
|
|
|
|
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>don't use a space between the integer value and the unit: 30kbit
|
|
|
|
is valid while 30 kbit is not.</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>you can use one of the following units:</para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2010-02-09 15:49:30 +01:00
|
|
|
<term><emphasis role="bold">kbps</emphasis></term>
|
2007-01-02 23:51:06 +01:00
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Kilobytes per second.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">mbps</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Megabytes per second.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">kbit</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Kilobits per second.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">mbit</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Megabits per second.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><emphasis role="bold">bps</emphasis> or <emphasis
|
|
|
|
role="bold">number</emphasis></term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Bytes per second.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>Only whole integers are allowed.</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2011-10-02 20:45:55 +02:00
|
|
|
<para>The columns in the file are as follows (where the column name is
|
|
|
|
followed by a different name in parentheses, the different name is used in
|
|
|
|
the alternate specification syntax).</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2008-07-10 15:33:54 +02:00
|
|
|
<term><emphasis role="bold">INTERFACE</emphasis> -
|
2008-03-19 21:43:43 +01:00
|
|
|
[<emphasis>number</emphasis>:]<emphasis>interface</emphasis></term>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
|
|
|
<listitem>
|
2006-11-23 17:06:48 +01:00
|
|
|
<para>Name of <emphasis>interface</emphasis>. 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 <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/FAQ.htm#faq18">http://www.shorewall.net/FAQ.htm#faq18</ulink></para>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
2006-11-21 17:45:57 +01:00
|
|
|
<para>You may NOT specify wildcards here, e.g. if you have multiple
|
2006-11-16 05:17:13 +01:00
|
|
|
ppp interfaces, you need to put them all in here!</para>
|
|
|
|
|
|
|
|
<para>If the device doesn't exist, a warning message will be issued
|
|
|
|
during "shorewall [re]start" and "shorewall refresh" and traffic
|
|
|
|
shaping configuration will be skipped for that device.</para>
|
2008-03-19 21:43:43 +01:00
|
|
|
|
|
|
|
<para>Shorewall assigns a sequential <firstterm>interface
|
|
|
|
number</firstterm> to each interface (the first entry in the file is
|
2009-07-16 02:50:55 +02:00
|
|
|
interface 1, the second is interface 2 and so on) You can explicitly
|
|
|
|
specify the interface number by prefixing the interface name with
|
|
|
|
the number and a colon (":"). Example: 1:eth0.</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">IN-BANDWIDTH (in_bandwidth)</emphasis> -
|
2011-10-18 14:53:31 +02:00
|
|
|
{-|<replaceable>bandwidth</replaceable>[:<replaceable>burst</replaceable>]|~<replaceable>bandwidth</replaceable>[:<replaceable>interval</replaceable>:<replaceable>decay_interval</replaceable>]}</term>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
|
|
|
<listitem>
|
2006-11-23 17:06:48 +01:00
|
|
|
<para>The incoming <emphasis>bandwidth</emphasis> 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.
|
|
|
|
But this 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.</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
|
|
|
<para>If you don't want any traffic to be dropped, set this to a
|
|
|
|
value to zero in which case Shorewall will not create an ingress
|
2008-03-19 21:43:43 +01:00
|
|
|
qdisc.Must be set to zero if the REDIRECTED INTERFACES column is
|
|
|
|
non-empty.</para>
|
2011-03-02 16:42:24 +01:00
|
|
|
|
2011-06-17 22:14:48 +02:00
|
|
|
<para>The optional burst option was added in Shorewall 4.4.18. The
|
2011-03-02 16:42:24 +01:00
|
|
|
default <replaceable>burst</replaceable> is 10kb. A larger
|
|
|
|
<replaceable>burst</replaceable> can help make the
|
|
|
|
<replaceable>bandwidth</replaceable> more accurate; often for fast
|
|
|
|
lines, the enforced rate is well below the specified
|
|
|
|
<replaceable>bandwidth</replaceable>.</para>
|
2011-10-18 14:53:31 +02:00
|
|
|
|
|
|
|
<para>What is described above creates a rate/burst policing filter.
|
|
|
|
Beginning with Shorewall 4.4.25, a rate-estimated policing filter
|
|
|
|
may be configured instead. Rate-estimated filters should be used
|
2013-05-03 18:19:45 +02:00
|
|
|
with Ethernet adapters that have Generic Receive Offload enabled by
|
2011-10-18 14:53:31 +02:00
|
|
|
default. See <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/FAQ.htm#faq97a">Shorewall FAQ
|
2011-10-18 14:53:31 +02:00
|
|
|
97a</ulink>.</para>
|
|
|
|
|
|
|
|
<para>To create a rate-estimated filter, precede the bandwidth with
|
|
|
|
a tilde ("~"). The optional interval and decay_interval determine
|
|
|
|
how often the rate is estimated and how many samples are retained
|
|
|
|
for estimating. Please see <ulink
|
|
|
|
url="http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt">http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt</ulink>
|
|
|
|
for details.</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">OUT-BANDWIDTH</emphasis> (out_bandwidth) -
|
2006-11-23 17:06:48 +01:00
|
|
|
<emphasis>bandwidth</emphasis></term>
|
2006-11-16 05:17:13 +01:00
|
|
|
|
|
|
|
<listitem>
|
2006-11-23 17:06:48 +01:00
|
|
|
<para>The outgoing <emphasis>bandwidth</emphasis> of that interface.
|
|
|
|
This is the maximum speed your connection can handle. It is also the
|
2007-01-27 19:53:50 +01:00
|
|
|
speed you can refer as "full" if you define the tc classes in <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-tcclasses.html">shorewall-tcclasses</ulink>(5).
|
2007-01-27 19:53:50 +01:00
|
|
|
Outgoing traffic above this rate will be dropped.</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-12-08 22:55:44 +01:00
|
|
|
|
|
|
|
<varlistentry>
|
2008-07-10 15:33:54 +02:00
|
|
|
<term><emphasis role="bold">OPTIONS</emphasis> - {<emphasis
|
2007-12-08 22:55:44 +01:00
|
|
|
role="bold">-</emphasis>|<emphasis
|
2012-06-12 00:45:47 +02:00
|
|
|
role="bold">{classify</emphasis>|<emphasis
|
2012-09-14 17:01:08 +02:00
|
|
|
role="bold">htb|hfsc</emphasis>|<emphasis
|
2012-06-12 00:45:47 +02:00
|
|
|
role="bold">linklayer</emphasis>={<emphasis
|
|
|
|
role="bold">ethernet</emphasis>|<emphasis
|
|
|
|
role="bold">atm</emphasis>|<emphasis
|
|
|
|
role="bold">adsl</emphasis>}|<emphasis
|
|
|
|
role="bold">tsize</emphasis>=<replaceable>tsize</replaceable>|<emphasis
|
|
|
|
role="bold">mtu</emphasis>=<replaceable>mtu</replaceable>|<emphasis
|
|
|
|
role="bold">mpu</emphasis>=<replaceable>mpu</replaceable>|<emphasis
|
|
|
|
role="bold">overhead</emphasis>=<replaceable>overhead</replaceable>}
|
|
|
|
,...}</term>
|
2007-12-08 22:55:44 +01:00
|
|
|
|
|
|
|
<listitem>
|
2009-05-24 19:06:36 +02:00
|
|
|
<para><option>classify</option> ― When specified, Shorewall will not
|
|
|
|
generate tc or Netfilter rules to classify traffic based on packet
|
|
|
|
marks. You must do all classification using CLASSIFY rules in <ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/manpages/shorewall-mangle.html">shorewall-mangle</ulink>(5).</para>
|
2009-05-24 19:06:36 +02:00
|
|
|
|
2012-09-14 17:01:08 +02:00
|
|
|
<para><option>htb</option> - Use the <firstterm>Hierarchical Token
|
|
|
|
Bucket</firstterm> queuing discipline. This is the default.</para>
|
|
|
|
|
2009-05-24 19:06:36 +02:00
|
|
|
<para><option>hfsc</option> - Shorewall normally uses the
|
2012-09-14 17:01:08 +02:00
|
|
|
Hierarchical Token Bucket queuing discipline. When
|
|
|
|
<option>hfsc</option> is specified, the <firstterm>Hierarchical Fair
|
|
|
|
Service Curves</firstterm> discipline is used instead (see tc-hfsc
|
|
|
|
(7)).</para>
|
2012-06-12 00:45:47 +02:00
|
|
|
|
|
|
|
<para><emphasis role="bold">linklayer</emphasis> - Added in
|
|
|
|
Shorewall 4.5.6. Type of link (ethernet, atm, adsl). When specified,
|
|
|
|
causes scheduler packet size manipulation as described in tc-stab
|
|
|
|
(8). When this option is given, the following options may also be
|
2012-06-12 18:40:15 +02:00
|
|
|
given after it:</para>
|
2012-06-12 00:45:47 +02:00
|
|
|
|
|
|
|
<blockquote>
|
|
|
|
<para><emphasis
|
|
|
|
role="bold">mtu</emphasis>=<replaceable>mtu</replaceable> - The
|
2012-06-12 18:40:15 +02:00
|
|
|
device MTU; default 2048 (will be rounded up to a power of
|
2012-06-12 00:45:47 +02:00
|
|
|
two)</para>
|
|
|
|
|
|
|
|
<para><emphasis
|
|
|
|
role="bold">mpu</emphasis>=<replaceable>mpubytes</replaceable> -
|
|
|
|
Minimum packet size used in calculations. Smaller packets will be
|
2012-06-12 18:40:15 +02:00
|
|
|
rounded up to this size</para>
|
2012-06-12 00:45:47 +02:00
|
|
|
|
|
|
|
<para><emphasis
|
|
|
|
role="bold">tsize</emphasis>=<replaceable>tablesize</replaceable>
|
|
|
|
- Size table entries; default is 512</para>
|
|
|
|
|
|
|
|
<para><emphasis
|
|
|
|
role="bold">overhead</emphasis>=<replaceable>overheadbytes</replaceable>
|
|
|
|
- Number of overhead bytes per packet.</para>
|
|
|
|
</blockquote>
|
2007-12-08 22:55:44 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-01-02 23:54:09 +01:00
|
|
|
|
2008-03-19 21:43:43 +01:00
|
|
|
<varlistentry>
|
2011-10-02 20:45:55 +02:00
|
|
|
<term><emphasis role="bold">REDIRECTED INTERFACES</emphasis>
|
|
|
|
(redirect)-
|
2008-03-19 21:43:43 +01:00
|
|
|
[<emphasis>interface</emphasis>[,<emphasis>interface</emphasis>]...]</term>
|
|
|
|
|
|
|
|
<listitem>
|
2009-07-16 02:50:55 +02:00
|
|
|
<para>May only be specified if the interface in the INTERFACE column
|
|
|
|
is an Intermediate Frame Block (IFB) device. Causes packets that
|
|
|
|
enter each listed interface to be passed through the egress filters
|
|
|
|
defined for this device, thus providing a form of incoming traffic
|
|
|
|
shaping. When this column is non-empty, the <emphasis
|
|
|
|
role="bold">classify</emphasis> option is assumed.</para>
|
2008-03-19 21:43:43 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2006-11-16 05:17:13 +01:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>Example 1:</term>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>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</para>
|
|
|
|
|
2008-03-19 21:43:43 +01:00
|
|
|
<programlisting> #INTERFACE IN-BANDWIDTH OUT-BANDWIDTH OPTIONS REDIRECTED
|
|
|
|
# INTERFACES
|
|
|
|
1:ppp0 6000kbit 500kbit</programlisting>
|
2006-11-16 05:17:13 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>FILES</title>
|
|
|
|
|
|
|
|
<para>/etc/shorewall/tcdevices</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See ALSO</title>
|
|
|
|
|
2012-06-13 23:29:13 +02:00
|
|
|
<para>tc-hfsc (7)</para>
|
|
|
|
|
2006-11-22 04:51:39 +01:00
|
|
|
<para><ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/traffic_shaping.htm">http://www.shorewall.net/traffic_shaping.htm</ulink></para>
|
2006-11-22 04:51:39 +01:00
|
|
|
|
2011-09-26 19:16:52 +02:00
|
|
|
<para><ulink
|
2014-01-12 22:40:03 +01:00
|
|
|
url="/configuration_file_basics.htm#Pairs">http://www.shorewall.net/configuration_file_basics.htm#Pairs</ulink></para>
|
2011-09-26 19:16:52 +02:00
|
|
|
|
2011-10-18 14:53:31 +02:00
|
|
|
<para><ulink
|
|
|
|
url="http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt">http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt</ulink></para>
|
|
|
|
|
2006-11-16 05:17:13 +01:00
|
|
|
<para>shorewall(8), shorewall-accounting(5), shorewall-actions(5),
|
2011-02-25 00:49:35 +01:00
|
|
|
shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5),
|
|
|
|
shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5),
|
|
|
|
shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
|
|
|
|
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5),
|
2012-01-09 16:19:10 +01:00
|
|
|
shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5),
|
2011-02-25 00:49:35 +01:00
|
|
|
shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5),
|
2013-12-29 00:35:08 +01:00
|
|
|
shorewall-mangle(5), shorewall-tos(5), shorewall-tunnels(5),
|
2011-02-25 00:49:35 +01:00
|
|
|
shorewall-zones(5)</para>
|
2006-11-16 05:17:13 +01:00
|
|
|
</refsect1>
|
2009-02-04 20:00:16 +01:00
|
|
|
</refentry>
|