Should anyone ask, I really do love my neighbours…

… but not when they start impacting my WIFI calls. First some background. I run 2 open access points that regularly have multiple neighbours associated. I don’t mind them piggybacking and have everything locked down and traffic on my ADSL link heavily prioritised so they don’t impact my latency sensitive applications. Today one of them started using Google Earth intensively. I noticed this because I was on a sip call that started breaking up.

A quick bit of tcpdump’ing showed this application was chewing up all my wireless bandwidth. Incidentally I only have limited wireless bandwidth since there are about 12 access points tripping over each other’s frequencies from outside my window.
I have put them back in their box with this simple script. It prioritises all traffic leaving my wireless VLAN which connects to the 2 access points. Traffic is in 3 classes – my E61 address, my wireless laptop and finally “all other traffic”

Alternatively I could always re-enable imagiImageflip mode again.

the script:

WIRELESSDEV=vlan4
# first delete everything
tc -s qdisc del dev $WIRELESSDEV root
tc qdisc add dev $WIRELESSDEV root handle 2: htb default 30
tc class add dev $WIRELESSDEV parent 2: classid 2:1 htb rate 10mbit burst 15k

tc class add dev $WIRELESSDEV parent 2:1 classid 2:10 htb rate 1mbit burst 15k
tc class add dev $WIRELESSDEV parent 2:1 classid 2:20 htb rate 1mbit burst 15k
tc class add dev $WIRELESSDEV parent 2:1 classid 2:30 htb rate 1mbit burst 15k

tc qdisc add dev $WIRELESSDEV parent 2:10 handle 10: sfq perturb 10
tc qdisc add dev $WIRELESSDEV parent 2:20 handle 20: sfq perturb 10
tc qdisc add dev $WIRELESSDEV parent 2:30 handle 30: sfq perturb 10

# control outbound
tc filter add dev vlan4 parent 2: protocol ip prio 16 u32 match ip dst 10.15.11.8 flowid 2:10 # mobile
tc filter add dev vlan4 parent 2: protocol ip prio 16 u32 match ip dst 10.15.11.7 flowid 2:20 # laptop wireless
tc filter add dev vlan4 parent 2: protocol ip prio 16 u32 match ip dst 10.15.11.2 flowid 2:20 # switch maintenance
tc filter add dev vlan4 parent 2: protocol ip prio 16 u32 match ip dst 10.15.11.3 flowid 2:20 # switch maintenance
# all other traffic goes here since we set the default class to 2:30

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.