All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Bridge with Traffic shaping
@ 2002-07-27 17:56 Roché Compaan
  2002-07-28 15:21 ` Stef Coene
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Roché Compaan @ 2002-07-27 17:56 UTC (permalink / raw)
  To: lartc

Hi,

I am fairly new to routing and traffic control but I with the
help of the lartc howto I managed to setup a bridge with htb
traffic control.  The traffic shapping does not seem to work
as I expected and I would really appreciate if somebody
can tell my why this is the case.

My setup:
I have a DSL router connecting a /28 network to the internet.
I put a linux box with 2 ethernet cards between my router and
the rest of the subnet.  I set up the linux box as an ethernet
bridge where the 2 ethernet cards has no ip address and the
bridge has an ip address.  I patched the kernel with the IMQ
patch so that I can shape incoming traffic.  eth0 is connected
to the router and eth1 is connect to the rest of the public
subnet.  I have an iptables rule that routes all traffic on eth1
to the imq device.

I started with a very simple htb setup to make testing easier:

#!/bin/bash
tc qdisc del dev imq0 root
ip link set imq0 down

tc qdisc add dev imq0 root handle 1: htb default 12

tc class add dev imq0 parent 1: classid 1:1 htb rate 128kbit ceil
128kbit
tc class add dev imq0 parent 1:1 classid 1:10 htb rate 64kbit ceil
128kbit
tc class add dev imq0 parent 1:1 classid 1:11 htb rate 32kbit ceil
128kbit
tc class add dev imq0 parent 1:1 classid 1:12 htb rate 32kbit ceil
128kbit

tc filter add dev imq0 protocol ip parent 1:0 prio 1 u32 \
  match ip dst 196.44.35.53 flowid 1:10
tc filter add dev imq0 protocol ip parent 1:0 prio 1 u32 \
  match ip dst 196.44.35.54 flowid 1:10
tc filter add dev imq0 protocol ip parent 1:0 prio 1 u32 \
  match ip dst 196.44.35.55 flowid 1:10

tc filter add dev imq0 protocol ip parent 1:0 prio 1 u32 \
  match ip dst 196.44.35.51 flowid 1:11
tc filter add dev imq0 protocol ip parent 1:0 prio 1 u32 \
  match ip dst 196.44.35.52 flowid 1:11

iptables -F
iptables -X
iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0

ip link set imq0 up

My problem is that all traffic seems to go through the default
htb class although there are lots of traffic matching the
other 2 classes.


root@griet root # tc -d -s class show dev imq0

class htb 1:1 root prio 0 rate 128Kbit ceil 128Kbit burst 1753b/8 mpu 0b
cburst 1753b/8 mpu 0b quantum 1638 level 3 
 Sent 13194 bytes 147 pkts (dropped 0, overlimits 0) 
 rate 7bps 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 101 ctokens: 101

class htb 1:10 parent 1:1 prio 0 rate 64Kbit ceil 128Kbit burst 1679b/8
mpu 0b cburst 1753b/8 mpu 0b quantum 819 level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 205 ctokens: 107

class htb 1:11 parent 1:1 prio 0 rate 32Kbit ceil 128Kbit burst 1638b/8
mpu 0b cburst 1753b/8 mpu 0b quantum 409 level 0 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 400 ctokens: 107

class htb 1:12 parent 1:1 prio 0 rate 32Kbit ceil 128Kbit burst 1638b/8
mpu 0b cburst 1753b/8 mpu 0b quantum 409 level 0 
 Sent 13194 bytes 147 pkts (dropped 0, overlimits 0) 
 rate 7bps 
 lended: 147 borrowed: 0 giants: 0 injects: 0
 tokens: 373 ctokens: 101


Any help would be greatly appreciated.


-- 
Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-07-30 17:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-27 17:56 [LARTC] Bridge with Traffic shaping Roché Compaan
2002-07-28 15:21 ` Stef Coene
2002-07-29  5:27 ` Roché Compaan
2002-07-29  6:05 ` Chris K Ellsworth
2002-07-29  6:22 ` Roché Compaan
2002-07-29 12:54 ` Stef Coene
2002-07-29 16:36 ` Chris K Ellsworth
2002-07-29 21:44 ` Roché Compaan
2002-07-30 17:37 ` Stef Coene

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.