Dear All, I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn''t go to the right class (it always go to the default class). Any help will be appreciated here''s my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here''s my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here''s my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- any any anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- any any anywhere anywhere tcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- any any anywhere anywhere MARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- any any anywhere anywhere MARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here''s my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 filter parent 1: protocol ip pref 49152 fw filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 tc -s class show dev eth1 class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) rate 712bps 5pps lended: 4 borrowed: 0 giants: 0 tokens: 34107 ctokens: 34107 class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit burst 1803b cburst 1957b Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 90199 ctokens: 55942 class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst 1650b cburst 1701b Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) rate 340bps 3pps lended: 990 borrowed: 0 giants: 0 tokens: 320599 ctokens: 165400 class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst 1680b cburst 1711b Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 210124 ctokens: 155635 class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit burst 1834b cburst 2008b Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 79781 ctokens: 50224 class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst 1680b cburst 1701b Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) rate 3Kbit 1pps lended: 148 borrowed: 4 giants: 0 tokens: 202125 ctokens: 163799 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
----- Original Message ----- From: <mjoachimiak@poczta.onet.pl> To: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> Sent: Wednesday, August 04, 2004 1:40 PM Subject: Re: [LARTC] htb and fw problems> hi! > your default class must not have rate grater than your desired speed rate. > If you have 64kbps your class shoud have 60kbps or less. Without this htb > will not work as you except! > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > ----- Original Message ----- > From: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> > To: <lartc@mailman.ds9a.nl> > Sent: Wednesday, August 04, 2004 11:00 AM > Subject: [LARTC] htb and fw problems > > > > Dear All, > > I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9,and> gentoo. > > I have a leased-line 64 kbps. > > I can see the counter works in iptables, but in the htb, it doesn''t goto> the right class (it always go to the default class). > > > > Any help will be appreciated > > > > > > here''s my htb conf > > #!/bin/bash > > > > tc qdisc del dev eth1 root > > > > tc qdisc add dev eth1 root handle 1: htb default 80 > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil35kbps> prio 3 > > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps > prio 0 > > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps > prio 2 > > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil40kbps> prio 1 > > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps > prio 4 > > > > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 > > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 > > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 > > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 > > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > > > > tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 > > tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 > > tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 > > tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 > > tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 > > > > Here''s my iptables rules*mangle > > :PREROUTING ACCEPT [1061:863210] > > :INPUT ACCEPT [1022:857788] > > :FORWARD ACCEPT [0:0] > > :OUTPUT ACCEPT [947:201743] > > :POSTROUTING ACCEPT [947:201743] > > -N personal > > -N others > > -N personal1 > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j > personal > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > > -A OUTPUT -p tcp -m tcp --dport 80 -j others > > -A personal -j MARK --set-mark 40 > > -A others -j MARK --set-mark 20 > > > > > > Here''s my iptables -L -v -t mangle -x output > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > > pkts bytes target prot opt in out source > destination > > > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > > pkts bytes target prot opt in out source > destination > > > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > > pkts bytes target prot opt in out source > destination > > > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > > pkts bytes target prot opt in out source > destination > > 11105 14785525 personal tcp -- any any anywhere > 192.168.1.145 tcp spt:webcache > > 28465 2233910 others tcp -- any any anywhere > anywhere tcp dpt:www > > > > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > > pkts bytes target prot opt in out source > destination > > > > Chain others (1 references) > > pkts bytes target prot opt in out source > destination > > 28465 2233910 MARK all -- any any anywhere > anywhere MARK set 0x14 > > > > Chain personal (1 references) > > pkts bytes target prot opt in out source > destination > > 11105 14785525 MARK all -- any any anywhere > anywhere MARK set 0x28 > > > > Chain personal1 (0 references) > > pkts bytes target prot opt in out source > destination > > > > Here''s my > > > > /sbin/tc -s qdisc show dev eth1 > > > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > > > > tc -s -d filter show dev eth1 > > > > filter parent 1: protocol ip pref 49151 fw > > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > > filter parent 1: protocol ip pref 49151 fw > > filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > > filter parent 1: protocol ip pref 49151 fw > > filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > > filter parent 1: protocol ip pref 49151 fw > > filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > > filter parent 1: protocol ip pref 49152 fw > > filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > > > > tc -s class show dev eth1 > > > > class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b > > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > > rate 712bps 5pps > > lended: 4 borrowed: 0 giants: 0 > > tokens: 34107 ctokens: 34107 > > > > class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbitburst> 1803b cburst 1957b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 90199 ctokens: 55942 > > > > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst > 1650b cburst 1701b > > Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > > rate 340bps 3pps > > lended: 990 borrowed: 0 giants: 0 > > tokens: 320599 ctokens: 165400 > > > > class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst > 1680b cburst 1711b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 210124 ctokens: 155635 > > > > class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbitburst> 1834b cburst 2008b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 79781 ctokens: 50224 > > > > class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst > 1680b cburst 1701b > > Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > > rate 3Kbit 1pps > > lended: 148 borrowed: 4 giants: 0 > > tokens: 202125 ctokens: 163799 > > _______________________________________________ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Dear, I have change tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps to tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps still with the same result any other tips? On Wed, 4 Aug 2004 13:41:34 +0200 <mjoachimiak@poczta.onet.pl> wrote:> > ----- Original Message ----- > From: <mjoachimiak@poczta.onet.pl> > To: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> > Sent: Wednesday, August 04, 2004 1:40 PM > Subject: Re: [LARTC] htb and fw problems > > > > hi! > > your default class must not have rate grater than your desired speed rate. > > If you have 64kbps your class shoud have 60kbps or less. Without this htb > > will not work as you except! > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > > ----- Original Message ----- > > From: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> > > To: <lartc@mailman.ds9a.nl> > > Sent: Wednesday, August 04, 2004 11:00 AM > > Subject: [LARTC] htb and fw problems > > > > > > > Dear All, > > > I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, > and > > gentoo. > > > I have a leased-line 64 kbps. > > > I can see the counter works in iptables, but in the htb, it doesn''t go > to > > the right class (it always go to the default class). > > > > > > Any help will be appreciated > > > > > > > > > here''s my htb conf > > > #!/bin/bash > > > > > > tc qdisc del dev eth1 root > > > > > > tc qdisc add dev eth1 root handle 1: htb default 80 > > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > > > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil > 35kbps > > prio 3 > > > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps > > prio 0 > > > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps > > prio 2 > > > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil > 40kbps > > prio 1 > > > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps > > prio 4 > > > > > > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 > > > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 > > > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 > > > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 > > > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > > > > > > tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 > > > tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 > > > tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 > > > tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 > > > tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 > > > > > > Here''s my iptables rules*mangle > > > :PREROUTING ACCEPT [1061:863210] > > > :INPUT ACCEPT [1022:857788] > > > :FORWARD ACCEPT [0:0] > > > :OUTPUT ACCEPT [947:201743] > > > :POSTROUTING ACCEPT [947:201743] > > > -N personal > > > -N others > > > -N personal1 > > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j > > personal > > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > > > -A OUTPUT -p tcp -m tcp --dport 80 -j others > > > -A personal -j MARK --set-mark 40 > > > -A others -j MARK --set-mark 20 > > > > > > > > > Here''s my iptables -L -v -t mangle -x output > > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > > > pkts bytes target prot opt in out source > > destination > > > > > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > > > pkts bytes target prot opt in out source > > destination > > > > > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > > > pkts bytes target prot opt in out source > > destination > > > > > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > > > pkts bytes target prot opt in out source > > destination > > > 11105 14785525 personal tcp -- any any anywhere > > 192.168.1.145 tcp spt:webcache > > > 28465 2233910 others tcp -- any any anywhere > > anywhere tcp dpt:www > > > > > > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > > > pkts bytes target prot opt in out source > > destination > > > > > > Chain others (1 references) > > > pkts bytes target prot opt in out source > > destination > > > 28465 2233910 MARK all -- any any anywhere > > anywhere MARK set 0x14 > > > > > > Chain personal (1 references) > > > pkts bytes target prot opt in out source > > destination > > > 11105 14785525 MARK all -- any any anywhere > > anywhere MARK set 0x28 > > > > > > Chain personal1 (0 references) > > > pkts bytes target prot opt in out source > > destination > > > > > > Here''s my > > > > > > /sbin/tc -s qdisc show dev eth1 > > > > > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > > > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > > > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > > > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > > > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > > > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > > > > > > > tc -s -d filter show dev eth1 > > > > > > filter parent 1: protocol ip pref 49151 fw > > > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > > > filter parent 1: protocol ip pref 49151 fw > > > filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > > > filter parent 1: protocol ip pref 49151 fw > > > filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > > > filter parent 1: protocol ip pref 49151 fw > > > filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > > > filter parent 1: protocol ip pref 49152 fw > > > filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > > > > > > > tc -s class show dev eth1 > > > > > > class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b > > > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > > > rate 712bps 5pps > > > lended: 4 borrowed: 0 giants: 0 > > > tokens: 34107 ctokens: 34107 > > > > > > class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit > burst > > 1803b cburst 1957b > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > lended: 0 borrowed: 0 giants: 0 > > > tokens: 90199 ctokens: 55942 > > > > > > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst > > 1650b cburst 1701b > > > Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > > > rate 340bps 3pps > > > lended: 990 borrowed: 0 giants: 0 > > > tokens: 320599 ctokens: 165400 > > > > > > class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst > > 1680b cburst 1711b > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > lended: 0 borrowed: 0 giants: 0 > > > tokens: 210124 ctokens: 155635 > > > > > > class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit > burst > > 1834b cburst 2008b > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > lended: 0 borrowed: 0 giants: 0 > > > tokens: 79781 ctokens: 50224 > > > > > > class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst > > 1680b cburst 1701b > > > Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > > > rate 3Kbit 1pps > > > lended: 148 borrowed: 4 giants: 0 > > > tokens: 202125 ctokens: 163799 > > > _______________________________________________ > > > LARTC mailing list / LARTC@mailman.ds9a.nl > > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello, On Wednesday 04 August 2004 11:00, Ing Isianto Istiadi wrote:> I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and > gentoo. I have a leased-line 64 kbps. > I can see the counter works in iptables, but in the htb, it doesn''t go to > the right class (it always go to the default class). > > Any help will be appreciated > > > here''s my htb conf > #!/bin/bash > > tc qdisc del dev eth1 root > > tc qdisc add dev eth1 root handle 1: htb default 80 > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps > prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil > 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps > ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate > 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb > rate 8kbps ceil 10kbps prio 4Well, it''s just a wild guess, but do you really have a 64 k-byte/second leased line or could it be a 64 k-bit/second line? If it''s the latter you should try: tc class add dev eth1 parent 1: classid 1:1 htb rate 64kbit ceil 64kbit and see if that works out. I''d also highly recommend reading http://www.docum.org/docum.org/faq/cache/74.html rgds, Arno _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Dear Isianto Istiadi, Here are your class creation statements: : [ snip ] 1: classid 1:1 htb rate 65kbps ceil 65kbps : [ snip ] 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 : [ snip ] 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 : [ snip ] 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 : [ snip ] 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 : [ snip ] 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 You are configuring HTB to guarantee exactly 64kbps to the children classes. - Leaf class rate is guaranteed. HTB does not check parent classes. This may be non-intuitive or even counter-intuitive. - Your rates, then total 64kbps: 20 + 5 + 8 + 23 + 8 = 64 Perhaps you could try dropping the guaranteed bandwidth (sum of rates of leaf classes) below 60kbps. -Martin -- Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
only short answer test sorry ----- Original Message ----- From: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> To: <lartc@mailman.ds9a.nl> Sent: Wednesday, August 04, 2004 3:11 PM Subject: Re: [LARTC] htb and fw problems> Dear, I have change > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > to > tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps > still with the same result > any other tips? > > On Wed, 4 Aug 2004 13:41:34 +0200 > <mjoachimiak@poczta.onet.pl> wrote: > > > > > ----- Original Message ----- > > From: <mjoachimiak@poczta.onet.pl> > > To: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> > > Sent: Wednesday, August 04, 2004 1:40 PM > > Subject: Re: [LARTC] htb and fw problems > > > > > > > hi! > > > your default class must not have rate grater than your desired speedrate.> > > If you have 64kbps your class shoud have 60kbps or less. Without thishtb> > > will not work as you except! > > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil65kbps> > > ----- Original Message ----- > > > From: "Ing Isianto Istiadi" <isianto.istiadi@adirarental.com> > > > To: <lartc@mailman.ds9a.nl> > > > Sent: Wednesday, August 04, 2004 11:00 AM > > > Subject: [LARTC] htb and fw problems > > > > > > > > > > Dear All, > > > > I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptablesv1.2.9,> > and > > > gentoo. > > > > I have a leased-line 64 kbps. > > > > I can see the counter works in iptables, but in the htb, it doesn''tgo> > to > > > the right class (it always go to the default class). > > > > > > > > Any help will be appreciated > > > > > > > > > > > > here''s my htb conf > > > > #!/bin/bash > > > > > > > > tc qdisc del dev eth1 root > > > > > > > > tc qdisc add dev eth1 root handle 1: htb default 80 > > > > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil65kbps> > > > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil > > 35kbps > > > prio 3 > > > > tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil10kbps> > > prio 0 > > > > tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil11kbps> > > prio 2 > > > > tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil > > 40kbps > > > prio 1 > > > > tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil10kbps> > > prio 4 > > > > > > > > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 > > > > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 > > > > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 > > > > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 > > > > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > > > > > > > > tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid1:10> > > > tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid1:20> > > > tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid1:30> > > > tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid1:40> > > > tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid1:80> > > > > > > > Here''s my iptables rules*mangle > > > > :PREROUTING ACCEPT [1061:863210] > > > > :INPUT ACCEPT [1022:857788] > > > > :FORWARD ACCEPT [0:0] > > > > :OUTPUT ACCEPT [947:201743] > > > > :POSTROUTING ACCEPT [947:201743] > > > > -N personal > > > > -N others > > > > -N personal1 > > > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > > > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j > > > personal > > > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > > > > -A OUTPUT -p tcp -m tcp --dport 80 -j others > > > > -A personal -j MARK --set-mark 40 > > > > -A others -j MARK --set-mark 20 > > > > > > > > > > > > Here''s my iptables -L -v -t mangle -x output > > > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > > > > pkts bytes target prot opt in out source > > > destination > > > > > > > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > > > > pkts bytes target prot opt in out source > > > destination > > > > > > > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > > > > pkts bytes target prot opt in out source > > > destination > > > > > > > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > > > > pkts bytes target prot opt in out source > > > destination > > > > 11105 14785525 personal tcp -- any any anywhere > > > 192.168.1.145 tcp spt:webcache > > > > 28465 2233910 others tcp -- any any anywhere > > > anywhere tcp dpt:www > > > > > > > > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > > > > pkts bytes target prot opt in out source > > > destination > > > > > > > > Chain others (1 references) > > > > pkts bytes target prot opt in out source > > > destination > > > > 28465 2233910 MARK all -- any any anywhere > > > anywhere MARK set 0x14 > > > > > > > > Chain personal (1 references) > > > > pkts bytes target prot opt in out source > > > destination > > > > 11105 14785525 MARK all -- any any anywhere > > > anywhere MARK set 0x28 > > > > > > > > Chain personal1 (0 references) > > > > pkts bytes target prot opt in out source > > > destination > > > > > > > > Here''s my > > > > > > > > /sbin/tc -s qdisc show dev eth1 > > > > > > > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > > > > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > > > > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > > > > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > > > > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > > > > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > > > > > > > > > > tc -s -d filter show dev eth1 > > > > > > > > filter parent 1: protocol ip pref 49151 fw > > > > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > > > > filter parent 1: protocol ip pref 49151 fw > > > > filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > > > > filter parent 1: protocol ip pref 49151 fw > > > > filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > > > > filter parent 1: protocol ip pref 49151 fw > > > > filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > > > > filter parent 1: protocol ip pref 49152 fw > > > > filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > > > > > > > > > > tc -s class show dev eth1 > > > > > > > > class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst2264b> > > > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > > > > rate 712bps 5pps > > > > lended: 4 borrowed: 0 giants: 0 > > > > tokens: 34107 ctokens: 34107 > > > > > > > > class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit > > burst > > > 1803b cburst 1957b > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > lended: 0 borrowed: 0 giants: 0 > > > > tokens: 90199 ctokens: 55942 > > > > > > > > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbitburst> > > 1650b cburst 1701b > > > > Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > > > > rate 340bps 3pps > > > > lended: 990 borrowed: 0 giants: 0 > > > > tokens: 320599 ctokens: 165400 > > > > > > > > class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbitburst> > > 1680b cburst 1711b > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > lended: 0 borrowed: 0 giants: 0 > > > > tokens: 210124 ctokens: 155635 > > > > > > > > class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit > > burst > > > 1834b cburst 2008b > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > lended: 0 borrowed: 0 giants: 0 > > > > tokens: 79781 ctokens: 50224 > > > > > > > > class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbitburst> > > 1680b cburst 1701b > > > > Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > > > > rate 3Kbit 1pps > > > > lended: 148 borrowed: 4 giants: 0 > > > > tokens: 202125 ctokens: 163799 > > > > _______________________________________________ > > > > LARTC mailing list / LARTC@mailman.ds9a.nl > > > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:http://lartc.org/> > > > > > > _______________________________________________ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Ok, here''s my new htb config #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 debug 3333333 tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbit ceil 60kbit tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbit ceil 65kbit prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 10kbit ceil 15kbit prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 5kbit ceil 11kbit prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 20kbit ceil 23kbit prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 5kbit ceil 10kbit prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 1 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 2 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 3 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 4 fw flowid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 whith the same effect. Thanks for pointing out the parent''s rate. it''s my mistakes ^_^> > > > > Here''s my iptables rules*mangle > > > > > :PREROUTING ACCEPT [1061:863210] > > > > > :INPUT ACCEPT [1022:857788] > > > > > :FORWARD ACCEPT [0:0] > > > > > :OUTPUT ACCEPT [947:201743] > > > > > :POSTROUTING ACCEPT [947:201743] > > > > > -N personal > > > > > -N others > > > > > -N personal1 > > > > > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > > > > > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j > > > > personal > > > > > #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > > > > > -A OUTPUT -p tcp -m tcp --dport 80 -j others > > > > > -A personal -j MARK --set-mark 40 > > > > > -A others -j MARK --set-mark 20 > > > > > > > > > > > > > > > Here''s my iptables -L -v -t mangle -x output > > > > > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > > > > > > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > > > > > > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > > > > > > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > 11105 14785525 personal tcp -- any any anywhere > > > > 192.168.1.145 tcp spt:webcache > > > > > 28465 2233910 others tcp -- any any anywhere > > > > anywhere tcp dpt:www > > > > > > > > > > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > > > > > > Chain others (1 references) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > 28465 2233910 MARK all -- any any anywhere > > > > anywhere MARK set 0x14 > > > > > > > > > > Chain personal (1 references) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > 11105 14785525 MARK all -- any any anywhere > > > > anywhere MARK set 0x28 > > > > > > > > > > Chain personal1 (0 references) > > > > > pkts bytes target prot opt in out source > > > > destination > > > > > > > > > > Here''s my > > > > > > > > > > /sbin/tc -s qdisc show dev eth1 > > > > > > > > > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > > > > > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > > > > > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > > > > > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > > > > > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > > > > > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > > > > > > > > > > > > > tc -s -d filter show dev eth1 > > > > > > > > > > filter parent 1: protocol ip pref 49151 fw > > > > > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > > > > > filter parent 1: protocol ip pref 49151 fw > > > > > filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > > > > > filter parent 1: protocol ip pref 49151 fw > > > > > filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > > > > > filter parent 1: protocol ip pref 49151 fw > > > > > filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > > > > > filter parent 1: protocol ip pref 49152 fw > > > > > filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > > > > > > > > > > > > > tc -s class show dev eth1 > > > > > > > > > > class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst > 2264b > > > > > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > > > > > rate 712bps 5pps > > > > > lended: 4 borrowed: 0 giants: 0 > > > > > tokens: 34107 ctokens: 34107 > > > > > > > > > > class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit > > > burst > > > > 1803b cburst 1957b > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > lended: 0 borrowed: 0 giants: 0 > > > > > tokens: 90199 ctokens: 55942 > > > > > > > > > > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit > burst > > > > 1650b cburst 1701b > > > > > Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > > > > > rate 340bps 3pps > > > > > lended: 990 borrowed: 0 giants: 0 > > > > > tokens: 320599 ctokens: 165400 > > > > > > > > > > class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit > burst > > > > 1680b cburst 1711b > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > lended: 0 borrowed: 0 giants: 0 > > > > > tokens: 210124 ctokens: 155635 > > > > > > > > > > class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit > > > burst > > > > 1834b cburst 2008b > > > > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > > > > lended: 0 borrowed: 0 giants: 0 > > > > > tokens: 79781 ctokens: 50224 > > > > > > > > > > class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit > burst > > > > 1680b cburst 1701b > > > > > Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > > > > > rate 3Kbit 1pps > > > > > lended: 148 borrowed: 4 giants: 0 > > > > > tokens: 202125 ctokens: 163799 > > > > > _______________________________________________ > > > > > LARTC mailing list / LARTC@mailman.ds9a.nl > > > > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: > http://lartc.org/ > > > > > > > > > > _______________________________________________ > > > LARTC mailing list / LARTC@mailman.ds9a.nl > > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > > > _______________________________________________ > > LARTC mailing list / LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
it looks like you might have a problem with your marking with the FW.>#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 >-A OUTPUT -p tcp -m tcp --dport 80 -j others >-A personal -j MARK --set-mark 40 >-A others -j MARK --set-mark 20From Looking at this I see the first commented link that as the mark in hex, Don''t all the marks need to be written this way? 0x80 0x40 0x20 ? This is just a guess I don''t really know. Ing Isianto Istiadi (isianto.istiadi@adirarental.com) wrote:> >Dear All, >I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. >I have a leased-line 64 kbps. >I can see the counter works in iptables, but in the htb, it doesn''t go to the rightclass (it always go to the default class).> >Any help will be appreciated > > >here''s my htb conf >#!/bin/bash > >tc qdisc del dev eth1 root > >tc qdisc add dev eth1 root handle 1: htb default 80 >tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps >tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 >tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 >tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 >tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 >tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 > >tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 >tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 >tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 >tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 >tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > >tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 >tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 >tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 >tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 >tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 > >Here''s my iptables rules*mangle >:PREROUTING ACCEPT [1061:863210] >:INPUT ACCEPT [1022:857788] >:FORWARD ACCEPT [0:0] >:OUTPUT ACCEPT [947:201743] >:POSTROUTING ACCEPT [947:201743] >-N personal >-N others >-N personal1 >#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 >-A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal >#-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 >-A OUTPUT -p tcp -m tcp --dport 80 -j others >-A personal -j MARK --set-mark 40 >-A others -j MARK --set-mark 20 > > >Here''s my iptables -L -v -t mangle -x output >Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > pkts bytes target prot opt in out source destination > >Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > pkts bytes target prot opt in out source destination > >Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > pkts bytes target prot opt in out source destination > >Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > pkts bytes target prot opt in out source destination > 11105 14785525 personal tcp -- any any anywhere192.168.1.145 tcp spt:webcache> 28465 2233910 others tcp -- any any anywhere anywheretcp dpt:www> >Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > pkts bytes target prot opt in out source destination > >Chain others (1 references) > pkts bytes target prot opt in out source destination > 28465 2233910 MARK all -- any any anywhere anywhereMARK set 0x14> >Chain personal (1 references) > pkts bytes target prot opt in out source destination > 11105 14785525 MARK all -- any any anywhere anywhereMARK set 0x28> >Chain personal1 (0 references) > pkts bytes target prot opt in out source destination > >Here''s my > >/sbin/tc -s qdisc show dev eth1 > >qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) >qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) >qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) >qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) >qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) >qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > >tc -s -d filter show dev eth1 > >filter parent 1: protocol ip pref 49151 fw >filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 >filter parent 1: protocol ip pref 49151 fw >filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 >filter parent 1: protocol ip pref 49151 fw >filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 >filter parent 1: protocol ip pref 49151 fw >filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 >filter parent 1: protocol ip pref 49152 fw >filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > >tc -s class show dev eth1 > >class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > rate 712bps 5pps > lended: 4 borrowed: 0 giants: 0 > tokens: 34107 ctokens: 34107 > >class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit burst 1803bcburst 1957b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 90199 ctokens: 55942 > >class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst 1650bcburst 1701b> Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > rate 340bps 3pps > lended: 990 borrowed: 0 giants: 0 > tokens: 320599 ctokens: 165400 > >class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst 1680bcburst 1711b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 210124 ctokens: 155635 > >class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit burst 1834bcburst 2008b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 79781 ctokens: 50224 > >class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst 1680bcburst 1701b> Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > rate 3Kbit 1pps > lended: 148 borrowed: 4 giants: 0 > tokens: 202125 ctokens: 163799 >_______________________________________________ >LARTC mailing list / LARTC@mailman.ds9a.nl >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >-- When dealing with a slow pipe, never underestimate the throughput of the postal system. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wed, 04 Aug 2004 14:31:06 +0000 zoop@lone.ath.cx wrote:> it looks like you might have a problem with your marking with the FW.That''s what I thought, but I can''t troubleshoot any other way. I tried both ways 0x80, 80 to the same affect. The strange problem is if I omitted the source ip part, so iptables -A OUTPUT -p tcp -t mangle --dport www -j MARK --set-mark 40 it works I''m out of my head ^_^> > From Looking at this I see the first commented link that as the mark in hex, Don''t > all the marks need to be written this way? 0x80 0x40 0x20 ? > > This is just a guess I don''t really know. > > > Ing Isianto Istiadi (isianto.istiadi@adirarental.com) wrote: > > > >Dear All, > >I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. > >I have a leased-line 64 kbps. > >I can see the counter works in iptables, but in the htb, it doesn''t go to the right > class (it always go to the default class). > > > >Any help will be appreciated > > > > > >here''s my htb conf > >#!/bin/bash > > > >tc qdisc del dev eth1 root > > > >tc qdisc add dev eth1 root handle 1: htb default 80 > >tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > >tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 > >tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 > >tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 > >tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 > >tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 > > > >tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 > >tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 > >tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 > >tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 > >tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > > > >tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 > >tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 > >tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 > >tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 > >tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 > > > >Here''s my iptables rules*mangle > >:PREROUTING ACCEPT [1061:863210] > >:INPUT ACCEPT [1022:857788] > >:FORWARD ACCEPT [0:0] > >:OUTPUT ACCEPT [947:201743] > >:POSTROUTING ACCEPT [947:201743] > >-N personal > >-N others > >-N personal1 > >#-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > >-A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal > >#-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > >-A OUTPUT -p tcp -m tcp --dport 80 -j others > >-A personal -j MARK --set-mark 40 > >-A others -j MARK --set-mark 20 > > > > > >Here''s my iptables -L -v -t mangle -x output > >Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > > pkts bytes target prot opt in out source destination > > > >Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > > pkts bytes target prot opt in out source destination > > > >Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > > pkts bytes target prot opt in out source destination > > > >Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > > pkts bytes target prot opt in out source destination > > 11105 14785525 personal tcp -- any any anywhere > 192.168.1.145 tcp spt:webcache > > 28465 2233910 others tcp -- any any anywhere anywhere > tcp dpt:www > > > >Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > > pkts bytes target prot opt in out source destination > > > >Chain others (1 references) > > pkts bytes target prot opt in out source destination > > 28465 2233910 MARK all -- any any anywhere anywhere > MARK set 0x14 > > > >Chain personal (1 references) > > pkts bytes target prot opt in out source destination > > 11105 14785525 MARK all -- any any anywhere anywhere > MARK set 0x28 > > > >Chain personal1 (0 references) > > pkts bytes target prot opt in out source destination > > > >Here''s my > > > >/sbin/tc -s qdisc show dev eth1 > > > >qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > >qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > >qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > >qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > >qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > >qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > > > >tc -s -d filter show dev eth1 > > > >filter parent 1: protocol ip pref 49151 fw > >filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > >filter parent 1: protocol ip pref 49151 fw > >filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > >filter parent 1: protocol ip pref 49151 fw > >filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > >filter parent 1: protocol ip pref 49151 fw > >filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > >filter parent 1: protocol ip pref 49152 fw > >filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > > > >tc -s class show dev eth1 > > > >class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b > > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > > rate 712bps 5pps > > lended: 4 borrowed: 0 giants: 0 > > tokens: 34107 ctokens: 34107 > > > >class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit burst 1803b > cburst 1957b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 90199 ctokens: 55942 > > > >class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst 1650b > cburst 1701b > > Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > > rate 340bps 3pps > > lended: 990 borrowed: 0 giants: 0 > > tokens: 320599 ctokens: 165400 > > > >class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst 1680b > cburst 1711b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 210124 ctokens: 155635 > > > >class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit burst 1834b > cburst 2008b > > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > lended: 0 borrowed: 0 giants: 0 > > tokens: 79781 ctokens: 50224 > > > >class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst 1680b > cburst 1701b > > Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > > rate 3Kbit 1pps > > lended: 148 borrowed: 4 giants: 0 > > tokens: 202125 ctokens: 163799 > >_______________________________________________ > >LARTC mailing list / LARTC@mailman.ds9a.nl > >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > > -- > When dealing with a slow pipe, never underestimate the throughput of the postal system. > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>>I can see the counter works in iptables, but in the htb, it doesn''t go tothe right class Please write what commands do you use to see "the counter" and what counter do you mean? I think counter for ip packets isn''t it? You can try to see my problem in LARTC archive: "HTB 3.13 please help". In my opinion you have bad configured packet marking. See my configuration of packet marking. I included it with archive posts in "HTB 3.13 please help" ---------------------------------------------------------------------------- ---------------------> Dear All, > I''m using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, andgentoo.> I have a leased-line 64 kbps. > I can see the counter works in iptables, but in the htb, it doesn''t go tothe right class (it always go to the default class).> > Any help will be appreciated > > > here''s my htb conf > #!/bin/bash > > tc qdisc del dev eth1 root > > tc qdisc add dev eth1 root handle 1: htb default 80 > tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps > tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbpsprio 3> tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbpsprio 0> tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbpsprio 2> tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbpsprio 1> tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbpsprio 4> > tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 > tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 > tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 > tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 > tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 > > tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 > tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 > tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 > tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 > tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 > > Here''s my iptables rules*mangle > :PREROUTING ACCEPT [1061:863210] > :INPUT ACCEPT [1022:857788] > :FORWARD ACCEPT [0:0] > :OUTPUT ACCEPT [947:201743] > :POSTROUTING ACCEPT [947:201743] > -N personal > -N others > -N personal1 > #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 > -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -jpersonal> #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 > -A OUTPUT -p tcp -m tcp --dport 80 -j others > -A personal -j MARK --set-mark 40 > -A others -j MARK --set-mark 20 > > > Here''s my iptables -L -v -t mangle -x output > Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) > pkts bytes target prot opt in out sourcedestination> > Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) > pkts bytes target prot opt in out sourcedestination> > Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) > pkts bytes target prot opt in out sourcedestination> > Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) > pkts bytes target prot opt in out sourcedestination> 11105 14785525 personal tcp -- any any anywhere192.168.1.145 tcp spt:webcache> 28465 2233910 others tcp -- any any anywhereanywhere tcp dpt:www> > Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) > pkts bytes target prot opt in out sourcedestination> > Chain others (1 references) > pkts bytes target prot opt in out sourcedestination> 28465 2233910 MARK all -- any any anywhereanywhere MARK set 0x14> > Chain personal (1 references) > pkts bytes target prot opt in out sourcedestination> 11105 14785525 MARK all -- any any anywhereanywhere MARK set 0x28> > Chain personal1 (0 references) > pkts bytes target prot opt in out sourcedestination> > Here''s my > > /sbin/tc -s qdisc show dev eth1 > > qdisc sfq 80: limit 128p quantum 1514b perturb 10sec > Sent 386 bytes 5 pkts (dropped 0, overlimits 0) > qdisc sfq 40: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > qdisc sfq 30: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > qdisc sfq 20: limit 128p quantum 1514b perturb 10sec > Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) > qdisc sfq 10: limit 128p quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 > Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) > > > tc -s -d filter show dev eth1 > > filter parent 1: protocol ip pref 49151 fw > filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 > filter parent 1: protocol ip pref 49151 fw > filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 > filter parent 1: protocol ip pref 49151 fw > filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 > filter parent 1: protocol ip pref 49151 fw > filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 > filter parent 1: protocol ip pref 49152 fw > filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 > > > tc -s class show dev eth1 > > class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b > Sent 174465 bytes 1142 pkts (dropped 0, overlimits 0) > rate 712bps 5pps > lended: 4 borrowed: 0 giants: 0 > tokens: 34107 ctokens: 34107 > > class htb 1:10 parent 1:1 leaf 10: prio 3 rate 160Kbit ceil 280Kbit burst1803b cburst 1957b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 90199 ctokens: 55942 > > class htb 1:20 parent 1:1 leaf 20: prio 0 rate 40Kbit ceil 80Kbit burst1650b cburst 1701b> Sent 115721 bytes 990 pkts (dropped 0, overlimits 0) > rate 340bps 3pps > lended: 990 borrowed: 0 giants: 0 > tokens: 320599 ctokens: 165400 > > class htb 1:30 parent 1:1 leaf 30: prio 2 rate 64Kbit ceil 88Kbit burst1680b cburst 1711b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 210124 ctokens: 155635 > > class htb 1:40 parent 1:1 leaf 40: prio 1 rate 184Kbit ceil 320Kbit burst1834b cburst 2008b> Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > lended: 0 borrowed: 0 giants: 0 > tokens: 79781 ctokens: 50224 > > class htb 1:80 parent 1:1 leaf 80: prio 4 rate 64Kbit ceil 80Kbit burst1680b cburst 1701b> Sent 58744 bytes 152 pkts (dropped 0, overlimits 0) > rate 3Kbit 1pps > lended: 148 borrowed: 4 giants: 0 > tokens: 202125 ctokens: 163799 > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thu, 5 Aug 2004 01:40:48 +0200> Please write what commands do you use to see "the counter" and what counter > do you mean? I think counter for ip packets isn''t it?I''m using iptables -L -v -x -t mangle and look for my rule. My assumptions is that if the counter is counting up in the iptables rules, then the iptable rules catches the packet, and it should mark the catched packet with whatever marking I put. Is it correct (my assumptions)? I''ve read your archieve before, I asked but I can''t find any solutions since (in my case I really want to limit per ip for web only). Thanks _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/