Forked from IGZalbertogregoris/increase_network_latency.sh
Created
April 3, 2024 01:44
-
-
Save nickyvanurk/f9005de9e6b7e40c7028dbd227381242 to your computer and use it in GitHub Desktop.
Emulate network latency in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install iproute (Ubuntu) | |
sudo apt-get install iproute | |
# Increase network latency in eth0 (250 milliseconds) | |
sudo tc qdisc add dev eth0 root netem delay 250ms | |
# Delete network modifications | |
sudo tc qdisc del dev eth0 root netem | |
# To make this change in localhost you must only replace "eth0" to "lo" ( --- WARNING --- in this case time will double ) | |
sudo tc qdisc add dev lo root netem delay 250ms | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info: https://tuongvy7.wordpress.com/2017/04/07/linux-network-packet-loss-emulation-with-netem-ubuntu/