Skip to content

Instantly share code, notes, and snippets.

@vanadium23
Created January 17, 2018 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanadium23/730e0f0b260d2dc57f96970693283408 to your computer and use it in GitHub Desktop.
Save vanadium23/730e0f0b260d2dc57f96970693283408 to your computer and use it in GitHub Desktop.
Emulate 3g with tc
# change some_device_name to according linux network device, e.g.: eth0
# tc requires sudo for non-root user!
tc qdisc add dev some_device_name root handle 1: htb default 12
tc class add dev some_device_name parent 1:1 classid 1:12 htb rate 1.6mbit ceil 1.6mbit
tc qdisc add dev some_device_name parent 1:12 netem delay 150ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment