On 05/06/2013 01:17 AM, Dan Egli wrote:
> *It has some potential, I agree, having looked it over a bit. But the
> problem with Wonder Shaper (at least as I understand it) is that it doesn't
> restrict anything. Recall that I was looking to restrict certain
> ports/services/programs to less than what my bandwidth would be. This was
> for multiple reasons, not the least of which is I don't want one system to
> dominate the download pipe (or the upload pipe, but downloads are far more
> of a worry at this stage). I might look at it again, but I don't recall
> seeing anything in the Wonder Shaper scripts that would say, for example,
> Bittorrents and HTTP downloads are restricted to 10 mbit/s, meanwhile SSH
> and it's related (scp, etc...) can use up the whole bandwidth available to
> the NIC.*
>
> * *
>
> *Maybe I missed it, and if so I'll go look again. But as my memory works,
> Wonder Shaper, nice that it is, isn't what I'm looking for. *
Wonder Shaper is good for two reasons, as the tool it is intended for
and as an example of how to combine the various LARTC commands. I've
read through LARTC a half dozen times and I'm still uncertain of how it
all works together. Luckily, Wonder Shaper is just right for what I need.
You probably want to look at how this part works:
# low priority source ports
NOPRIOPORTSRC=
# low priority destination ports
NOPRIOPORTDST=
for a in $NOPRIOPORTDST
do
tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \
match ip dport $a 0xffff flowid 1:30
done
for a in $NOPRIOPORTSRC
do
tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \
match ip sport $a 0xffff flowid 1:30
done
And this part:
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip tos 0x10 0xff flowid 1:10
Corey
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/