Monday, August 13, 2007

Use Netem to Set Packet Loss

Set the loss to 30% at beginning (the first command):
# tc qdisc add dev eth0 root netem loss 30%

Change the loss to 10%:
# tc qdisc change dev eth0 root netem loss 10%

Restore to normal (the last command):
# tc qdisc del dev eth0 root