Skip to content

Instantly share code, notes, and snippets.

@vy
Last active May 18, 2021 21:36
Show Gist options
  • 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
@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