使用 linux 模拟广域网延迟 - Emulating wide area network delays with Linux
netem (already enabled in the linux kernel) provides network emulation functionality for testing protocols by emulating the properties of wide area networks.
to simulate an additional latency of 80 ms, just type sudo tc qdisc add dev eth0 root netem delay 80ms
it just adds a fixed amount of delay to all packets going out of the local ethernet.
to stop the additional latency, just type sudo tc qdisc change dev eth0 root netem delay 0ms
lines to add to the file /etc/rc.local before exit 0, to add 40ms of latency :
# add +40ms latency tc qdisc add dev eth0 root netem delay 40ms
note: if your network interface is not eth0, replace eth0 with the name of your network interface
在调研 iperf 的时候,偶然看到。对项目很有帮助,原文链接:https://iperf.fr/iperf-servers.php#netem
上一篇: 酸奶食谱减肥计划 让你轻松瘦5斤
下一篇: 男人减肥 要避开6大减肥错误