From mboxrd@z Thu Jan 1 00:00:00 1970 From: Victor Cassar Date: Tue, 07 Jan 2003 23:55:55 +0000 Subject: Re: [LARTC] Incomprehensive problem with tc filter & mangle... Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Ronan:=20 If you are bridging remember that traffic classfiers can=B4t see the bridged traffic thats why all the traffic goes to the default queue there is no support for brdige + classifiers unless you apply the right patches Victor Cassar --- Ronan LAVIEC wrote: > First of all, hi !!! > And please be comprehensive for my poor english, > cause I'm French and French > do not speak very well foreign language :o). >=20 > So my problem : >=20 > I use -j MARK in mangle table to catch packets with > tc filter and to put > them in one or another class, but this doesn't work. >=20 > Here is the script I try to use to do QoS : >=20 > # This script try to give priority to small packets > traffic > # This is due to always have good ping in online > game, even if some > uploading are on. >=20 > UPLINK=124 > UPLINK_OTHERp >=20 > LAN_IFACE=3Deth1 > EXT_IFACE=3Dppp0 >=20 > # Mark all packets > $IPTABLES -t mangle -A PREROUTING -i $LAN_IFACE -m > length --length 0:200 -j > MARK --set-mark 10 > $IPTABLES -t mangle -A PREROUTING -i $LAN_IFACE -m > length --length > 200:400 -j MARK --set-mark 15 > $IPTABLES -t mangle -A PREROUTING -i $LAN_IFACE -m > length --length > 400:800 -j MARK --set-mark 20 > $IPTABLES -t mangle -A PREROUTING -i $LAN_IFACE -m > length --length > 800:1500 -j MARK --set-mark 25 >=20 > $TC qdisc del dev $EXT_IFACE root 2> /dev/null > > /dev/null > $TC qdisc del dev $EXT_IFACE ingress 2> /dev/null > > /dev/null >=20 > $TC qdisc add dev $EXT_IFACE root handle 1: htb > default 20 >=20 > $TC class add dev $EXT_IFACE parent 1: classid 1:1 > htb rate ${UPLINK}kbit > burst 6k >=20 > $TC class add dev $EXT_IFACE parent 1:1 classid 1:10 > htb rate ${UPLINK}kbit > \ > burst 6k prio 1 > $TC class add dev $EXT_IFACE parent 1:1 classid 1:20 > htb rate > ${UPLINK_OTHER}kbit \ > burst 6k prio 2 >=20 > $TC qdisc add dev $EXT_IFACE parent 1:10 handle 10: > sfq perturb 10 > $TC qdisc add dev $EXT_IFACE parent 1:20 handle 20: > sfq perturb 10 >=20 > # The rules that's didn't work, and I don't now why. > $TC filter add dev $EXT_IFACE parent 1: protocol ip > prio 15 \ > handle 10 fw classid 1:10 > $TC filter add dev $EXT_IFACE parent 1: protocol ip > prio 20 \ > handle 15 fw classid 1:10 >=20 > # End of rc.qos >=20 > I don't now why this doesn't work, because filter > rules are setting up, a > "tc filter show" gives : >=20 > filter parent 1: protocol ip pref 15 fw > filter parent 1: protocol ip pref 15 fw handle 0xa > classid 1:10 > filter parent 1: protocol ip pref 20 fw > filter parent 1: protocol ip pref 20 fw handle 0xf > classid 1:10 >=20 > But "tc class show" always gives : >=20 > class htb 1:1 root rate 124Kbit ceil 124Kbit burst > 6Kb/8 mpu 0b cburst > 1757b/8 mpu 0b level 7 > Sent 205068 bytes 151 pkts (dropped 0, overlimits > 0) > rate 2122bps 1pps > lended: 0 borrowed: 0 giants: 0 > tokens: 217601 ctokens: -8773 >=20 > class htb 1:10 parent 1:1 leaf 10: prio 1 quantum > 1587 rate 124Kbit ceil > 124Kbit burst 6Kb/8 mpu 0b cburst 1757b/8 mpu 0b > level 0 > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 317109 ctokens: 90735 >=20 > class htb 1:20 parent 1:1 leaf 20: prio 2 quantum > 1000 rate 70Kbit ceil > 70Kbit burst 6Kb/8 mpu 0b cburst 1688b/8 mpu 0b > level 0 > Sent 205068 bytes 151 pkts (dropped 0, overlimits > 0) > rate 2029bps 1pps > lended: 151 borrowed: 0 giants: 0 > tokens: 385463 ctokens: -21851 >=20 > This is always the default option that is used, it's > as if the filter > weren't there. >=20 > And as this is my firts attempt to make something > like this, I do not > necessaraly understand all the subtibility of tc > rules (like u32 matches). >=20 > Ronan LAVIEC. >=20 > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/