I'm trying to police my downstream bandwith for a given port - but it seems unless I have a gigantic limit and burst, the download stops completely
IF="wlp3s0"
LIMIT="100kbit"
BURST="100kbit"
PORT="80"
echo "resetting tc"
tc qdisc del dev ${IF} ingress
echo "setting tc"
tc filter add dev ${IF} parent ffff: \
protocol ip prio 1 \
u32 match ip dport ${PORT} 0xffff \
police rate ${LIMIT} burst $BURST drop \
flowid :1
tc filter add dev ${IF} parent ffff: \
protocol ip prio 1 \
u32 match ip sport ${PORT} 0xffff \
police rate ${LIMIT} burst $BURST drop \
flowid :1
I've been tweaking things for quite some time, trying out all sorts of different values for limit and burst - wgetting chozabu.net/testfile (12mb)
any suggestions very welcome!