ssh
and telnet
) or to services that only deal with small blocks of data.
tc
command (provided by the iproute package). Since its interface is quite complex, using higher-level tools is recommended.
wondershaper
(in the similarly-named package) is to minimize latencies independent of network load. This is achieved by limiting total traffic to a value that falls just short of the link saturation value.
wondershaper interface
download_rate
upload_rate
. The interface can be eth0
or ppp0
for example, and both rates are expressed in kilobits per second. The wondershaper remove interface
command disables traffic control on the specified interface.
up
and down
directives to the /etc/network/interfaces
file allowing declared commands to be run, respectively, after the interface is configured and before it is deconfigured. For example:
Example 10.9. Changes in the /etc/network/interfaces
file
iface eth0 inet dhcp up /sbin/wondershaper eth0 500 100 down /sbin/wondershaper remove eth0
wondershaper
in /etc/ppp/ip-up.d/
will enable traffic control as soon as the connection is up.
pfifo_fast
queue scheduler, which provides a few interesting features by itself. The priority of each processed IP packet is based on the ToS field (Type of Service) of this packet; modifying this field is enough to take advantage of the scheduling features. There are five possible values:
iptables -t mangle -A PREROUTING -p tcp --sport ssh -j TOS --set-tos Minimize-Delay iptables -t mangle -A PREROUTING -p tcp --dport ssh -j TOS --set-tos Minimize-Delay