Ups, sorry, I did one mistake, I forgot we are filtering incoming traffic and the we need to match destination ip. Also there is no need to filter the hole subnet, so we can set the mask to 32. So this would be the result:
########## downlink ############# # slow downloads down to somewhat less than the real speed to prevent # queuing at our ISP. Tune to see how high you can set it. # ISPs tend to have *huge* queues to make sure big downloads are fast # # attach ingress policer: tc qdisc add dev $DEV handle ffff: ingress HERE BEGINS THE CHANGE # filter for your roomate, drop everything that's # coming faster than half the DOWNLINK value: tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip dst \ 192.168.10.3/32 <http://192.168.10.3/24> police rate $[$DOWNLINK/2]kbit burst 10k drop flowid :1 HERE ENDS THE CHANGE # filter *everything* to it (0.0.0.0/0), drop everything that's # coming in too fast: tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1
_______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc