Preview:
#Setup the rate control and delay
sudo tc qdisc add dev lo root handle 1: htb default 12 
sudo tc class add dev lo parent 1:1 classid 1:12 htb rate 33kbps ceil 56kbps 
sudo tc qdisc add dev lo parent 1:12 netem delay 400ms
 
#Remove the rate control/delay
sudo tc qdisc del dev lo root
 
#To see what is configured on an interface, do this
sudo tc -s qdisc ls dev lo
 
#Replace lo with eth0/wlan0 to limit speed at lan
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter