From mboxrd@z Thu Jan 1 00:00:00 1970 From: "kristiadi himawan" Date: Mon, 22 Sep 2003 11:37:43 +0000 Subject: [LARTC] HTB in a bridge+trunk MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0035_01C38138.9C52F560" Message-Id: List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0035_01C38138.9C52F560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear All, Sorry if my question here ever asked before by someone else. I have configuration like this : |---------trunking------| V eth0 eth1 V router<--->bridge with htb<--->switch 202.xx.xx.227 #!/bin/bash tc qdisc del dev eth0 root handle 1: tc qdisc add dev eth0 root handle 1: htb default 10 tc class add dev eth0 parent 1: classid 1:1 htb rate 32kbit ceil 32kbit tc class add dev eth0 parent 1:1 classid 1:10 htb rate 24kbit ceil = 24kbit tc class add dev eth0 parent 1:1 classid 1:20 htb rate 8kbit ceil 8kbit tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst = 202.xx.xx.227 flowid 1:20 I already patch kernel and tc with htb3.6-020525.tgz from htb website. Here is the result when there's traffic to 202.xx.xx.227, it should go = to 1:20, but fill class 1:10 (red sign). ### eth0: queueing disciplines qdisc htb 1: r2q 10 default 10 direct_packets_stat 0 Sent 584256 bytes 881 pkts (dropped 0, overlimits 1113) backlog 35p ### eth0: traffic classes class htb 1:1 root rate 32Kbit ceil 32Kbit burst 1639b cburst 14704b Sent 554186 bytes 846 pkts (dropped 0, overlimits 0) rate 3040bps 3pps lended: 0 borrowed: 0 giants: 0 tokens: -7997 ctokens: 8145 class htb 1:10 parent 1:1 prio 0 rate 24Kbit ceil 24Kbit burst 1629b = cburst 1629b Sent 584256 bytes 881 pkts (dropped 0, overlimits 0) rate 3040bps 3pps backlog 35p lended: 846 borrowed: 0 giants: 0 tokens: -447876 ctokens: -447876 class htb 1:20 parent 1:1 prio 0 rate 8Kbit ceil 8Kbit burst 1609b = cburst 1609b Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 1287999 ctokens: 1287999 ### eth0: filtering rules filter parent 1: protocol ip pref 1 u32 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht = 800 bkt 0 flowid 1:20 match ca2ba0e3/ffffffff at 16 Why when i put htb on eth0 to filter class 1:20 the shaping always goes = to default class 1:10 not 1:20 class, the same problem occur when i put = htb on eth1? I already patch the kernel with 3c95x vlan patch too. Any idea why the filter not working properly or i need another patch to = get u32 working in bridging+trunking or i must replace u32 filter with = fwmark from ebtables? Thnx. ------=_NextPart_000_0035_01C38138.9C52F560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear All,
 
Sorry if my question here ever asked = before by=20 someone else.
I have configuration like this = :
          &nbs= p;          |---------t= runking------|
           &n= bsp;        V =20 eth0         eth1  = V
         = router<--->bridge=20 with htb<--->switch
202.xx.xx.227
 
#!/bin/bash
tc qdisc del dev eth0 root handle 1:
tc qdisc add = dev=20 eth0 root handle 1: htb default 10
tc class add dev eth0 parent 1: classid 1:1 htb rate 32kbit ceil=20 32kbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 24kbit = ceil=20 24kbit
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 8kbit = ceil=20 8kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip = dst=20 202.xx.xx.227 flowid 1:20
 
I already patch kernel and tc with htb3.6-020525.tgz = from=20 htb website.
 
Here is the result when there's traffic to 202.xx.xx.227, it should = go to=20 1:20, but fill class 1:10 (red sign).
 
### eth0: queueing disciplines
qdisc htb 1: r2q 10 default 10 direct_packets_stat 0
 Sent = 584256=20 bytes 881 pkts (dropped 0, overlimits 1113)
 backlog 35p

### eth0: traffic classes
class htb 1:1 root rate 32Kbit ceil 32Kbit burst 1639b cburst=20 14704b
 Sent 554186 bytes 846 pkts (dropped 0, overlimits=20 0)
 rate 3040bps 3pps
 lended: 0 borrowed: 0 giants:=20 0
 tokens: -7997 ctokens: 8145
class htb 1:10 parent 1:1 prio 0 rate 24Kbit ceil 24Kbit burst = 1629b cburst=20 1629b
 Sent 584256 bytes 881 pkts (dropped = 0,=20 overlimits 0)
 
rate 3040bps 3pps backlog = 35p
 lended: 846=20 borrowed: 0 giants: 0
 tokens: -447876 ctokens: -447876
class htb 1:20 parent 1:1 prio 0 rate 8Kbit ceil 8Kbit burst 1609b = cburst=20 1609b
 Sent 0 bytes 0 pkts (dropped 0, overlimits = 0)
 lended: 0=20 borrowed: 0 giants: 0
 tokens: 1287999 ctokens: 1287999

### eth0: filtering rules
filter parent 1: protocol ip pref 1 u32
filter parent 1: = protocol ip=20 pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 = u32 fh=20 800::800 order 2048 key ht 800 bkt 0 flowid 1:20
  match=20 ca2ba0e3/ffffffff at 16

Why when i put htb on eth0 to filter class 1:20=20 the shaping always goes to default class 1:10 not 1:20 = class, the=20 same problem occur when i put htb on eth1?
I already patch the kernel with 3c95x vlan patch=20 too.
Any idea why the filter not working properly or i need another = patch to get=20 u32 working in bridging+trunking or i must replace u32 filter with = fwmark from=20 ebtables?
 
Thnx.
------=_NextPart_000_0035_01C38138.9C52F560-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/