Skip to contentSkip to conversation

Packets Going to default class

LARTC hareram 2 participants 2 messages Apr 28, 2005 – Apr 29, 2005

lore
Share & tools
lore

hareram

author
#0 lore raw

Hi

I have tested with FC3 but iam not able get any good results on that. in the list some one recomend me that > 3.17 HTB should work

I saw latest FC4 test2 has the HTB 3.17 with iptables 1.3.0

i have install in my P4 box, and trying to test

when iam uploading its working perfect, but when iam downloading its going to default class
can some one experinced the same problem

below is the my config

$TC qdisc add dev $IFACE root handle 1: htb default 15
$TC class add dev $IFACE parent 1: classid 1:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
$TC class add dev $IFACE parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit prio 0
$TC class add dev $IFACE parent 1:1 classid 1:15 htb rate 256kbit ceil 256kbit prio 0
$TC qdisc add dev $IFACE parent 1:10 handle 10: sfq perturb 10 $TC qdisc add dev $IFACE parent 1:15 handle 15: sfq perturb 10 $TC filter add dev $IFACE parent 1:0 protocol ip prio 0 handle 10 fw classid 1:10
$TC filter add dev $IFACE parent 1:0 protocol ip prio 0 handle 15 fw classid 1:15

$TC qdisc add dev $NFACE root handle 2: htb default 40
$TC class add dev $NFACE parent 2: classid 2:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
$TC class add dev $NFACE parent 2:1 classid 2:20 htb rate 512kbit ceil 512kbit prio 0
$TC class add dev $NFACE parent 2:1 classid 2:40 htb rate 256kbit ceil 256kbit prio 0
$TC qdisc add dev $NFACE parent 2:20 handle 20: sfq perturb 10 $TC qdisc add dev $NFACE parent 2:40 handle 40: sfq perturb 10 $TC filter add dev $NFACE parent 2:0 protocol ip prio 0 handle 20 fw classid 2:20
$TC filter add dev $NFACE parent 2:0 protocol ip prio 0 handle 40 fw classid 2:40

$I -t mangle -A FORWARD -s a.b.c.d/24 -d 0/0 --j MARK --set-mark 10 # $I -t mangle -A FORWARD -s 0/0 -d a.b.c.d/24 --j MARK --set-mark 20 #

the out put show like below for the download... here can observe that all the traffic going to 2:40 instead of 2:20

# tc -s -d class show dev eth1
class htb 2:1 root rate 102400Kbit ceil 102400Kbit burst 14387b/8 mpu 0b 
overhead 0b cburst 14387b/8 mpu 0b overhead 0b level 7
 Sent 1610799 bytes 6437 pkt (dropped 0, overlimits 0 requeues 0)
 rate 1952bit 5pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 1140 ctokens: 1140

class htb 2:20 parent 2:1 leaf 20: prio 0 quantum 6400 rate 512000bit ceil 512000bit burst 1663b/8 mpu 0b overhead 0b cburst 1663b/8 mpu 0b overhead 0b level 0
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: 26624 ctokens: 26624

class htb 2:40 parent 2:1 leaf 40: prio 0 quantum 3200 rate 256000bit ceil 256000bit burst 1631b/8 mpu 0b overhead 0b cburst 1631b/8 mpu 0b overhead 0b level 0
Sent 1610799 bytes 6437 pkt (dropped 0, overlimits 0 requeues 0) rate 1960bit 5pps backlog 0b 0p requeues 0
lended: 6437 borrowed: 0 giants: 0
tokens: 47104 ctokens: 47104

upload i can see the traffic in 1:10,

# tc -s -d class show dev eth0
class htb 1:1 root rate 102400Kbit ceil 102400Kbit burst 14387b/8 mpu 0b 
overhead 0b cburst 14387b/8 mpu 0b overhead 0b level 7
 Sent 1578305 bytes 5581 pkt (dropped 0, overlimits 0 requeues 0)
 rate 1408bit 2pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 1146 ctokens: 1146

class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 6400 rate 512000bit ceil 512000bit burst 1663b/8 mpu 0b overhead 0b cburst 1663b/8 mpu 0b overhead 0b level 0
Sent 1328917 bytes 2243 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0
lended: 2243 borrowed: 0 giants: 0
tokens: 25856 ctokens: 25856

class htb 1:15 parent 1:1 leaf 15: prio 0 quantum 3200 rate 256000bit ceil 256000bit burst 1631b/8 mpu 0b overhead 0b cburst 1631b/8 mpu 0b overhead 0b level 0
Sent 249388 bytes 3338 pkt (dropped 0, overlimits 0 requeues 0) rate 1336bit 1pps backlog 0b 0p requeues 0
lended: 3338 borrowed: 0 giants: 0
tokens: 49408 ctokens: 49408

iptables -xnvL -t mangle

# iptables -xvnL -t mangle

Chain FORWARD (policy ACCEPT 244799 packets, 132669070 bytes)
pkts bytes target prot opt in out source
destination

    2243  1297515 MARK       all  --  *      *       a.b.c.d/24 
0.0.0.0/0           MARK set 0xa
    3720  1386013 MARK       all  --  *      *       0.0.0.0/0 

a.b.c.d/24 MARK set 0x14

could some one telling what is wrong, or is still problem with 3.17 too or any problem with iptables

any suggestions will be great

hare

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 48 lines · hareram

Hi

I have tested with FC3 but iam not able get any good results on that. in the list some one recomend me that > 3.17 HTB should work

I saw latest FC4 test2 has the HTB 3.17 with iptables 1.3.0

i have install in my P4 box, and trying to test

when iam uploading its working perfect, but when iam downloading its going to default class
can some one experinced the same problem

below is the my config

$TC qdisc add dev $IFACE root handle 1: htb default 15
$TC class add dev $IFACE parent 1: classid 1:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
$TC class add dev $IFACE parent 1:1 classid 1:10 htb rate 512kbit ceil 512kbit prio 0
$TC class add dev $IFACE parent 1:1 classid 1:15 htb rate 256kbit ceil 256kbit prio 0
$TC qdisc add dev $IFACE parent 1:10 handle 10: sfq perturb 10 $TC qdisc add dev $IFACE parent 1:15 handle 15: sfq perturb 10 $TC filter add dev $IFACE parent 1:0 protocol ip prio 0 handle 10 fw classid 1:10
$TC filter add dev $IFACE parent 1:0 protocol ip prio 0 handle 15 fw classid 1:15

$TC qdisc add dev $NFACE root handle 2: htb default 40
$TC class add dev $NFACE parent 2: classid 2:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit
$TC class add dev $NFACE parent 2:1 classid 2:20 htb rate 512kbit ceil 512kbit prio 0
$TC class add dev $NFACE parent 2:1 classid 2:40 htb rate 256kbit ceil 256kbit prio 0
$TC qdisc add dev $NFACE parent 2:20 handle 20: sfq perturb 10 $TC qdisc add dev $NFACE parent 2:40 handle 40: sfq perturb 10 $TC filter add dev $NFACE parent 2:0 protocol ip prio 0 handle 20 fw classid 2:20
$TC filter add dev $NFACE parent 2:0 protocol ip prio 0 handle 40 fw classid 2:40

$I -t mangle -A FORWARD -s a.b.c.d/24 -d 0/0 --j MARK --set-mark 10 # $I -t mangle -A FORWARD -s 0/0 -d a.b.c.d/24 --j MARK --set-mark 20 #

the out put show like below for the download... here can observe that all the traffic going to 2:40 instead of 2:20

<snip>

Quoted 4 lines

could some one telling what is wrong, or is still problem with 3.17 too or any problem with iptables

any suggestions will be great

I can't see why that doesn't work for you - A copy and paste of it works OK for me.

You don't really need the filters for default classes and it's best to delete the root qdisc before you add a new one.

Maybe you still had some filters around from an earlier test that messesd things up.

I am using the latest TC, iptables and 2.6.12-rc1.

Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc