[Originally posted Mar 13, 2012 4:55 AM by Antti Uitto]
Linux Advanced Routing & Traffic Control HOWTO
As I said, Linux is a powerful tool for network-related stuff.
The link above is to an extensive HOWTO article about routing and other networking services available in most Linux distributions.
Here is a nice one that I tried on my own router host.
If you are hosting Internet gateway for some community, put this to the interface from where the traffic returns to their LAN:
sudo tc qdisc add dev eth1 root tbf rate 64kbit latency 50ms burst 128kbit
They’ll love you for it! 🙂