NetEm (already enabled in the Linux kernel) provides Network Emulation functionality for testing protocols by emulating the properties of wide area ne ...
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