IFACE=wifi0 # setup ingress filtering /sbin/tc qdisc add dev $IFACE handle ffff: ingress # local network is unrestricted /sbin/tc filter add dev $IFACE parent ffff: protocol ip \ prio 10 u32 match ip src 192.168.2.0/24 \ police conform-exceed ok/ok flowid :1 # incoming internet traffic is limited. /sbin/tc filter add dev $IFACE parent ffff: protocol ip \ prio 50 u32 match ip src 0.0.0.0/0 police \ rate 1500kbit burst 10k drop flowid :2 # outgoing traffic /sbin/tc qdisc add dev $IFACE root handle 1: htb default 30 # local network is unrestricted /sbin/tc class add dev $IFACE parent 1: classid 1:10 htb \ rate 54mbit burst 15k /sbin/tc qdisc add dev $IFACE parent 1:10 handle 10: sfq perturb 10 /sbin/tc filter add dev $IFACE parent 1:0 protocol ip \ prio 10 u32 match ip dst 192.168.2.0/24 flowid 1:10 # internet traffic is limited. /sbin/tc class add dev $IFACE parent 1: classid 1:20 htb \ rate 160kbit ceil 196kbit burst 15k /sbin/tc qdisc add dev $IFACE parent 1:20 handle 20: sfq perturb 10 /sbin/tc filter add dev $IFACE parent 1:0 protocol ip \ prio 50 u32 match ip src 0.0.0.0/0 flowid 1:20Long example, I know. The main reason is that I'm not limiting traffic to local computers. Furthermore, I'm also limiting my incoming traffic to use up at most 1.5 mbit of the 2 mbit connection, so my housemates will be able to use the internet as well (Debian mirrors send data fast - fast enough to kick them out of any online game they might be playing...).There is one important detail hidden in there: sfq. This stands for "stochastic fair queueing". It tells the network stack to basically send "one packet for each connection in turn". This way, the small packets needed for download or interactive SSH sessions will get out quickly even when doing a larger upload.It works great for me - I'm having a good download rate, using the 160 kBit upload limit completely (I don't want to completely fill up the 192k upload link either) and I'm actually writing this blog entry remotely via SSH. The lag when writing is okay, probably around 300ms. Without shaping, this wouldn't work this well.(And no: just using 'sfq' for your outgoing traffic is not enough, since the key scheduling is happening at the weakest link. So you have to limit your traffic shaping setup to be just below the actual weakest link.)
35 files changed, 709 insertions(+), 190 deletions(-)That's mainly small enhancements, and a brand new Debian packaging. It's now very usable from my point of view. Moreover, the repository is now on Alioth. There's still some code improvement to do and some features to add, but I'm quite happy with it. Consequently, I just released the first version, numbered 0.1.0.

... look at how Ruby on Rails is marketed. A big play is made of how easy it is. But if a language or framework is easy then people with low self-efficacy can’t win: if they manage to do something with it then they haven’t really achieved very much because anyone can do it; if they don’t manage to do something with it then they’re complete idiots. I’m not saying that we should advertise languages or frameworks as being hard, because obviously that can put people off as well, but a recognition of the barriers that people might face may, in a strange way, make them more approachable.As Jeni brings her article to a close, it's with some shock and shame that I get the punchline loud and clear: "this isn't about you."It's about empathy, inclusivity and selflessness. Human qualities that are unrestricted to either gender.
Next.