ssh
與 telnet
) 或祗服務小量資料的封包優先處理。
tc
命令 (由 iproute 套件提供) 設定 QoS 參數。因為其介面較為複雜,建議使用高階的工具。
wondershaper
(在同名的套件中) 的主要目的是最小化獨立網路負載的延遲。經由限制整體流量的值縮短連結的飽和值。
wondershaper interface download_rate upload_rate
命令,設定流量控制。可以是 eth0
或 ppp0
介面,兩者的速度均以每秒千位元為單位。wondershaper remove 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:
範例 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 DSCP field (Differentiated of Services Code Point) of this packet; modifying this 6-bit field is enough to take advantage of the scheduling features. Refer to https://en.wikipedia.org/wiki/Differentiated_services#Class_Selector for more information.
nft add table ip mangle nft add rule ip mangle PREROUTING tcp sport 22 counter ip dscp set 0x04 nft add rule ip mangle PREROUTING tcp dport 22 counter ip dscp set 0x04