From: <mjoachimiak@poczta.onet.pl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] htb and fw problems
Date: Wed, 04 Aug 2004 11:41:34 +0000 [thread overview]
Message-ID: <002201c47a18$0049b210$0802a8c0@monster> (raw)
In-Reply-To: <20040804160059.6fe9a596.isianto.istiadi@adirarental.com>
----- 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/
next prev parent reply other threads:[~2004-08-04 11:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 9:00 [LARTC] htb and fw problems Ing Isianto Istiadi
2004-08-04 11:41 ` mjoachimiak [this message]
2004-08-04 13:11 ` Ing Isianto Istiadi
2004-08-04 13:36 ` Arno
2004-08-04 13:41 ` Martin A. Brown
2004-08-04 13:43 ` Morten Kramer
2004-08-04 14:15 ` Ing Isianto Istiadi
2004-08-04 14:31 ` zoop
2004-08-04 14:44 ` Ing Isianto Istiadi
2004-08-04 23:40 ` mjoachimiak
2004-08-05 2:27 ` Ing Isianto Istiadi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002201c47a18$0049b210$0802a8c0@monster' \
--to=mjoachimiak@poczta.onet.pl \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.