Translate

<emphasis>GOING FURTHER</emphasis> Optimal configuration
SourceTranslationState
182
Once a network interface is configured, setting up this traffic limitation is achieved by running <command>wondershaper <replaceable>interface</replaceable> <replaceable>download_rate</replaceable> <replaceable>upload_rate</replaceable></command>. The interface can be <literal>eth0</literal> or <literal>ppp0</literal> for example, and both rates are expressed in kilobits per second. The <command>wondershaper remove <replaceable>interface</replaceable></command> command disables traffic control on the specified interface.
配置网络接口后,运行 <command>wondershaper <replaceable>interface</replaceable> <replaceable>download_rate</replaceable> <replaceable>upload_rate</replaceable></command>命令,设置流量控制。可以是 <literal>eth0</literal> 或 <literal>ppp0</literal> 接口,两者的速度均以每秒千位为单位。<command>wondershaper remove <replaceable>interface</replaceable></command> 命令可以在特定接口停用流量控制。
183
For an Ethernet connection, this script is best called right after the interface is configured. This is done by adding <literal>up</literal> and <literal>down</literal> directives to the <filename>/etc/network/interfaces</filename> file allowing declared commands to be run, respectively, after the interface is configured and before it is deconfigured. For example:
184
Changes in the <filename>/etc/network/interfaces</filename> file
185

iface eth0 inet dhcp
up /sbin/wondershaper eth0 500 100
down /sbin/wondershaper remove eth0
186
In the PPP case, creating a script that calls <command>wondershaper</command> in <filename>/etc/ppp/ip-up.d/</filename> will enable traffic control as soon as the connection is up.
187
<emphasis>GOING FURTHER</emphasis> Optimal configuration
188
The <filename>/usr/share/doc/wondershaper/README.Debian.gz</filename> file describes, in some detail, the configuration method recommended by the package maintainer. In particular, it advises measuring the download and upload speeds so as to best evaluate real limits.
189
Standard Configuration
190
Barring a specific QoS configuration, the Linux kernel uses the <literal>pfifo_fast</literal> queue scheduler, which provides a few interesting features by itself. The priority of each processed IP packet is based on the ToS field (<emphasis>Type of Service</emphasis>) of this packet; modifying this field is enough to take advantage of the scheduling features. There are five possible values:
191
Normal-Service (0);
192
Minimize-Cost (2);

Loading…

Loading…

Glossary

Source Translation
GOING FURTHER 进阶阅读

Source information

Flags
xml-text
Source string age
4 years ago
Translation file
zh-CN/10_network-infrastructure.po, string 187
String priority
Medium