1SHOREWALL-TCDEVICES(5) Configuration Files SHOREWALL-TCDEVICES(5)
2
3
4
6 tcdevices - Shorewall Traffic Shaping Devices file
7
9 /etc/shorewall[6]/tcdevices
10
12 Entries in this file define the bandwidth for interfaces on which you
13 want traffic shaping to be enabled.
14
15 If you do not plan to use traffic shaping for a device, don't put it in
16 here as it limits the throughput of that device to the limits you set
17 here.
18
19 A note on the bandwidth definitions used in this file:
20
21 · don't use a space between the integer value and the unit: 30kbit is
22 valid while 30 kbit is not.
23
24 · you can use one of the following units:
25
26 kbps
27 Kilobytes per second.
28
29 mbps
30 Megabytes per second.
31
32 kbit
33 Kilobits per second.
34
35 mbit
36 Megabits per second.
37
38 bps or number
39 Bytes per second.
40
41 · Only whole integers are allowed.
42
43 The columns in the file are as follows (where the column name is
44 followed by a different name in parentheses, the different name is used
45 in the alternate specification syntax).
46
47 INTERFACE - [number:]interface
48 Name of interface. Each interface may be listed only once in this
49 file. You may NOT specify the name of an alias (e.g., eth0:0) here;
50 see http://www.shorewall.net/FAQ.htm#faq18[1]
51
52 You may NOT specify wildcards here, e.g. if you have multiple ppp
53 interfaces, you need to put them all in here!
54
55 If the device doesn't exist, a warning message will be issued
56 during "shorewall [re]start" and "shorewall reload" and traffic
57 shaping configuration will be skipped for that device.
58
59 Shorewall assigns a sequential interface number to each interface
60 (the first entry in the file is interface 1, the second is
61 interface 2 and so on) You can explicitly specify the interface
62 number by prefixing the interface name with the number and a colon
63 (":"). Example: 1:eth0.
64
65 IN-BANDWIDTH (in_bandwidth) -
66 {-|bandwidth[:burst]|~bandwidth[:interval:decay_interval]}
67 The incoming bandwidth of that interface. Please note that you are
68 not able to do traffic shaping on incoming traffic, as the traffic
69 is already received before you could do so. But this allows you to
70 define the maximum traffic allowed for this interface in total, if
71 the rate is exceeded, the packets are dropped. You want this mainly
72 if you have a DSL or Cable connection to avoid queuing at your
73 providers side.
74
75 If you don't want any traffic to be dropped, set this to a value to
76 zero in which case Shorewall will not create an ingress qdisc.Must
77 be set to zero if the REDIRECTED INTERFACES column is non-empty.
78
79 The optional burst option was added in Shorewall 4.4.18. The
80 default burst is 10kb. A larger burst can help make the bandwidth
81 more accurate; often for fast lines, the enforced rate is well
82 below the specified bandwidth.
83
84 What is described above creates a rate/burst policing filter.
85 Beginning with Shorewall 4.4.25, a rate-estimated policing filter
86 may be configured instead. Rate-estimated filters should be used
87 with Ethernet adapters that have Generic Receive Offload enabled by
88 default. See Shorewall FAQ 97a[2].
89
90 To create a rate-estimated filter, precede the bandwidth with a
91 tilde ("~"). The optional interval and decay_interval determine how
92 often the rate is estimated and how many samples are retained for
93 estimating. Please see
94 http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt
95 for details. If not specified, the default interval is 250ms and
96 the default decay_interval is 4sec.
97
98 OUT-BANDWIDTH (out_bandwidth) - bandwidth
99 The outgoing bandwidth of that interface. This is the maximum speed
100 your connection can handle. It is also the speed you can refer as
101 "full" if you define the tc classes in shorewall-tcclasses[3](5).
102 Outgoing traffic above this rate will be dropped.
103
104 OPTIONS -
105 {-|{classify|htb|hfsc|linklayer={ethernet|atm|adsl}|tsize=tsize|mtu=mtu|mpu=mpu|overhead=overhead}
106 ,...}
107 classify — When specified, Shorewall will not generate tc or
108 Netfilter rules to classify traffic based on packet marks. You must
109 do all classification using CLASSIFY rules in
110 shorewall-mangle[4](5).
111
112 htb - Use the Hierarchical Token Bucket queuing discipline. This is
113 the default.
114
115 hfsc - Shorewall normally uses the Hierarchical Token Bucket
116 queuing discipline. When hfsc is specified, the Hierarchical Fair
117 Service Curves discipline is used instead (see tc-hfsc (7)).
118
119 linklayer - Added in Shorewall 4.5.6. Type of link (ethernet, atm,
120 adsl). When specified, causes scheduler packet size manipulation as
121 described in tc-stab (8). When this option is given, the following
122 options may also be given after it: mtu=mtu - The device MTU;
123 default 2048 (will be rounded up to a power of two)
124
125 mpu=mpubytes - Minimum packet size used in calculations. Smaller
126 packets will be rounded up to this size
127
128 tsize=tablesize - Size table entries; default is 512
129
130 overhead=overheadbytes - Number of overhead bytes per packet.
131
132 REDIRECTED INTERFACES (redirect)- [interface[,interface]...]
133 May only be specified if the interface in the INTERFACE column is
134 an Intermediate Frame Block (IFB) device. Causes packets that enter
135 each listed interface to be passed through the egress filters
136 defined for this device, thus providing a form of incoming traffic
137 shaping. When this column is non-empty, the classify option is
138 assumed.
139
141 Example 1:
142 Suppose you are using PPP over Ethernet (DSL) and ppp0 is the
143 interface for this. The device has an outgoing bandwidth of 500kbit
144 and an incoming bandwidth of 6000kbit
145
146 #INTERFACE IN-BANDWIDTH OUT-BANDWIDTH OPTIONS REDIRECTED
147 # INTERFACES
148 1:ppp0 6000kbit 500kbit
149
151 /etc/shorewall/tcdevices
152
153 /etc/shorewall6/tcdevices
154
156 tc-hfsc (7)
157
158 http://www.shorewall.net/traffic_shaping.htm[5]
159
160 http://www.shorewall.net/configuration_file_basics.htm#Pairs[6]
161
162 http://ace-host.stuart.id.au/russell/files/tc/doc/estimators.txt
163
164 shorewall(8)
165
167 1. http://www.shorewall.net/FAQ.htm#faq18
168 http://www.shorewall.net/FAQ.htm#faq18
169
170 2. Shorewall FAQ 97a
171 http://www.shorewall.net/FAQ.htm#faq97a
172
173 3. shorewall-tcclasses
174 http://www.shorewall.net/manpages/shorewall-tcclasses.html
175
176 4. shorewall-mangle
177 http://www.shorewall.net/manpages/shorewall-mangle.html
178
179 5. http://www.shorewall.net/traffic_shaping.htm
180 http://www.shorewall.net/traffic_shaping.htm
181
182 6. http://www.shorewall.net/configuration_file_basics.htm#Pairs
183 http://www.shorewall.net/configuration_file_basics.htm#Pairs
184
185
186
187Configuration Files 01/17/2019 SHOREWALL-TCDEVICES(5)