Skip to content

Instantly share code, notes, and snippets.

@vy
Last active May 18, 2021 21:36
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vy/51df9ff6552e7d73a851 to your computer and use it in GitHub Desktop.
Save vy/51df9ff6552e7d73a851 to your computer and use it in GitHub Desktop.
Add 5s delay to outgoing traffic from port 34001
tc qdisc add dev eth0 root handle 1: prio
tc qdisc add dev eth0 parent 1:3 handle 30: netem delay 5s
tc filter add dev eth0 protocol ip parent 1:0 u32 match ip sport 34001 0xffff flowid 1:3
@Sivaraj23
Copy link

when i tried executing this command,
sudo tc qdisc add dev eth0 parent 1:3 handle 30: netem delay 5s

im getting this error.

Error: Specified qdisc not found.

@vy
Copy link
Author

vy commented Apr 14, 2021

Sorry @Sivaraj23, I haven't touched tc since 2014.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment