Traffic Shaping - Diane Trout

Links

Traffic Shaping

After being annoyed by the latency on my ssh connection while I was bittorrenting some dj mixed music, I went off and grabed a traffic shaping script for my little wrt54g router.

I installed kmod-sched, kmod-iptables-extra, and tc to get the right kernel modules and the traffic shaper program. As the script I hacked was designed for a full box instead of the limited openwrt I needed to also added the following to my /etc/services file.

ssh 22/tcp
telnet 23/tcp
http 80/tcp

I made a few modifications to the shaper script to deal with the fact OpenWrt is using ash instead of bash, and the imq module doesn't seem to exist. Also after some brief efforts I didn't get the iptables length filter to match.

On the plus side after running the script my ssh connection started behaving much better, even though bittorrent is uploading at near my max throughput. The odd thing is when I turn the script off ssh still behaves... Odd. It works, I need sleep, not going to worry about it right now.