On 1 Mar 2005 13:31:10 -0800,
(E-Mail Removed) wrote:
>yes. running RH9. Currently shaping other similar CLIENT servers that
>have private ip's (192.168.aaa.bbb), using iptables and tc. Before I
>wrote this post I was shaping with only tc, but have just now changed
>to marking the packets with iptables and then using tc, to do proper
>QoS (thanks lartc). So now I'm thinking I should be able to do this
>with the CLIENTs that have public ip's too (i.e. that are being
>forwarded through SERVER instead of NATed), right? So I could mark the
>packets in REROUTING like this:
>*mangle
>-A PREROUTING -p tcp -m tcp -s 196.28.xxx.yyy/30 -j MARK --set-mark 12
I think this is what you're looking for.
http://selab.edu.ms/twiki/bin/view/N...inuxNetworking
It is also possible to shape using a u32 match on IP (BEWARE line
wrap):
ISW1="222.111.33.44"
LoPrioCIDR_Src="$ATJ $ISW1 $ISW2 $SKYN $UNS1"
# Install root HTB, point default traffic to 1:40:
tc qdisc add dev $DEV root handle 1: htb default 40
# Shape everything at $UPLINK speed
tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit
burst 6k
tc class add dev $DEV parent 1:1 classid 1:30 htb rate
$[12*$UPLINK/100]kbit \
ceil $[12*$UPLINK/100]kbit burst 1k quantum 1514 prio 4
for a in $LoPrioCIDR_Src; do
tc filter add dev $DEV parent 1: protocol ip prio 5 u32 \
match ip src $a flowid 1:30
done
--
buck