[LARTC] What happened to diffserv?

2004-07-28 Thread Scott Brooks
I'm trying to find up to date information on diffserv, and it seems like 
either nobody is using it, or nobody is talking about using it.

Is there some good site for information about using diffserv with new kernels?

The last update on diffserv.sourceforge.net is in 2001, and most of the 
mailing list results are from that time.

Has everyone moved on to something other then diffserv, or has it died?

Thanks
-- 
Scott Brooks
Network Operations Manager
Binary Solutions Ltd.
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] return routes

2004-07-28 Thread mjoachimiak


What do you mean :
If I set the default gateway to eth0
 but send the mail thru eth1, the outgoing mail does in fact go correctly
out,
?
How are you doing this?

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Re: HTB 3.13 please help

2004-07-28 Thread mjoachimiak
//Just to not forget eth0 is WAN and eth1 is LAN . The box is NATing my lan.
I configured tcng to shape both download and upload
and i got connection loss again.
Maybe it is my script fault or it is something bad with packets marking .
this is how i mark outgoing packets
iptables -t mangle -A MYSHAPER-OUT -p tcp -s 192.168.1.23 -j MARK --set-mark
$ip

and this part of my script which is intented to shape upload:
dev eth0 {
egress {
class ($default) if 1;
htb ( r2q 1 ) {
class ( rate 800kbps, ceil 800kbps ) {

//192.168.1.0---
$ruter = class ( rate 15kbps, ceil 250kbps  ) { sfq( perturb 10secs,
quantum 1500Bytes ); } ;
  fw {

class $ruter on (23);
//ruter-



//- fw
}//fw
}//main class
}//htb
}//egress
}//eth0(none):/skrytpy#

and these are a bit of `tc -s -d class show dev eth0` prints while
connection loss after running my tcng script :

class htb 2:f parent 2:1 leaf 10: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572

class htb 2:1e parent 2:1 leaf 1f: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572

class htb 2:2d parent 2:1 leaf 2e: prio 0 quantum 1875 rate 1875bps ceil
15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 706914 ctokens: 95572


 that is interesting. let me know then. other test might be to
 reboot with maxcpus=1 to mitigate smp related bugs.

 On Sat, 25 Jan 2003 [EMAIL PROTECTED] wrote:

  Yes I'm using smp kernel.
  I thought that i make some error that i canot see so i decided to write
my
  classes using tcng this time.
  Currently i'm shaping only outgoing traffic to my local network(using
tcng)
  and it seems to work (it work one day without errors).
  Today i'm going to configure upload too.
  The difference i could see at once is that there is no connection loss
when
  i'm starting htb.
  - Original Message -
  From: devik [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: lartc [EMAIL PROTECTED]
  Sent: Sunday, July 25, 2004 10:26 AM
  Subject: Re: [LARTC] Re: HTB 3.13 please help
 
 
   From the stats is seems that no data are queued - as if nobody
   is sending them. You are using smp kernel, is your box SMP ?
   I haven't seen many smp+htb boxes thus there might be possibility
   of a bug...
   devik
  
   On Thu, 23 Jan 2003 [EMAIL PROTECTED] wrote:
  
I've attached outputs for eth0 and eth1.
I was trying to get this script running. I've added one class for my
  NATed
BOX, and it helped. Shaping was stable almost one day but then i
added
  prio
0 to eth0 filters and prio 0 for eth1 filters it has braken. So i
  removed
every prio 0 and reboot the box but it didnt helped :(.
I've noticed that when the traffic is not much (14 hosts from 50 are
up)
tc/htb works very well.
If you want new version of my script say a word.
- Original Message -
From: devik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 3:48 PM
Subject: Re: HTB 3.13 please help
   
   
 I need
 tc -s -d class show dev xxx
 output during that non-working period. 3.6 is older than 3.13.

 ---
 Martin Devera aka devik
 Linux kernel QoS/HTB maintainer
   http://luxik.cdi.cz/~devik/

 On Wed, 21 Jul 2004 [EMAIL PROTECTED] wrote:

  Thanks for your reply. I've recent put my problem on lartc list.
I'm
using
  htb 3.13 in 2-4-25smp.
  I wonder if upgrade to 3.6 will help? Could you be so kind and
take
  a
look
  at it. I'll be grateful.
  If you have no time for me i'll understand and try to resolve it
for
myself.
  Thanks.
 
  Hello everybody!
  Since week i dig lists and www and can't find solution for my
  problem.
  I'm using HTB 3.13 kernel 2-4-25 smp iptables 1.2.9.
  I've got situation like this:
 
  LAN--Linux Box(routing only)--- Linux Box
  (HTB)--Hardware Router(say:HD)--Internet
  When I start HTB it takes about 5 min. to start working and it
  works...
  within this 5min starting i can't ping HD and after about 5min I
  start
  pinging. It works like this for cuple of hours, then something
  strange
is
  happening. Ping stops, www doesn't work but radio (36kbps) (from
clients)
  works. There is no ping at all for about 1min and it starts
pinging
  for
  about 2-3min and it stops for 1-2min and so on.
  When I stop HTB 

Re: [LARTC] Re: HTB 3.13 please help

2004-07-28 Thread devik
as you can see, NO packets are going thru. You have to look
to other classes as well as to ifconfig and tc -s qdisc show dev xxx
to see wherw packets are lost.


On Wed, 28 Jul 2004 [EMAIL PROTECTED] wrote:

 //Just to not forget eth0 is WAN and eth1 is LAN . The box is NATing my lan.
 I configured tcng to shape both download and upload
 and i got connection loss again.
 Maybe it is my script fault or it is something bad with packets marking .
 this is how i mark outgoing packets
 iptables -t mangle -A MYSHAPER-OUT -p tcp -s 192.168.1.23 -j MARK --set-mark
 $ip

 and this part of my script which is intented to shape upload:
 dev eth0 {
 egress {
 class ($default) if 1;
 htb ( r2q 1 ) {
 class ( rate 800kbps, ceil 800kbps ) {

 //192.168.1.0---
 $ruter = class ( rate 15kbps, ceil 250kbps  ) { sfq( perturb 10secs,
 quantum 1500Bytes ); } ;
   fw {

 class $ruter on (23);
 //ruter-
 


 //- fw
 }//fw
 }//main class
 }//htb
 }//egress
 }//eth0(none):/skrytpy#

 and these are a bit of `tc -s -d class show dev eth0` prints while
 connection loss after running my tcng script :

 class htb 2:f parent 2:1 leaf 10: prio 0 quantum 1875 rate 1875bps ceil
 15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 706914 ctokens: 95572

 class htb 2:1e parent 2:1 leaf 1f: prio 0 quantum 1875 rate 1875bps ceil
 15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 706914 ctokens: 95572

 class htb 2:2d parent 2:1 leaf 2e: prio 0 quantum 1875 rate 1875bps ceil
 15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 706914 ctokens: 95572


  that is interesting. let me know then. other test might be to
  reboot with maxcpus=1 to mitigate smp related bugs.
 
  On Sat, 25 Jan 2003 [EMAIL PROTECTED] wrote:
 
   Yes I'm using smp kernel.
   I thought that i make some error that i canot see so i decided to write
 my
   classes using tcng this time.
   Currently i'm shaping only outgoing traffic to my local network(using
 tcng)
   and it seems to work (it work one day without errors).
   Today i'm going to configure upload too.
   The difference i could see at once is that there is no connection loss
 when
   i'm starting htb.
   - Original Message -
   From: devik [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: lartc [EMAIL PROTECTED]
   Sent: Sunday, July 25, 2004 10:26 AM
   Subject: Re: [LARTC] Re: HTB 3.13 please help
  
  
From the stats is seems that no data are queued - as if nobody
is sending them. You are using smp kernel, is your box SMP ?
I haven't seen many smp+htb boxes thus there might be possibility
of a bug...
devik
   
On Thu, 23 Jan 2003 [EMAIL PROTECTED] wrote:
   
 I've attached outputs for eth0 and eth1.
 I was trying to get this script running. I've added one class for my
   NATed
 BOX, and it helped. Shaping was stable almost one day but then i
 added
   prio
 0 to eth0 filters and prio 0 for eth1 filters it has braken. So i
   removed
 every prio 0 and reboot the box but it didnt helped :(.
 I've noticed that when the traffic is not much (14 hosts from 50 are
 up)
 tc/htb works very well.
 If you want new version of my script say a word.
 - Original Message -
 From: devik [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, July 22, 2004 3:48 PM
 Subject: Re: HTB 3.13 please help


  I need
  tc -s -d class show dev xxx
  output during that non-working period. 3.6 is older than 3.13.
 
  ---
  Martin Devera aka devik
  Linux kernel QoS/HTB maintainer
http://luxik.cdi.cz/~devik/
 
  On Wed, 21 Jul 2004 [EMAIL PROTECTED] wrote:
 
   Thanks for your reply. I've recent put my problem on lartc list.
 I'm
 using
   htb 3.13 in 2-4-25smp.
   I wonder if upgrade to 3.6 will help? Could you be so kind and
 take
   a
 look
   at it. I'll be grateful.
   If you have no time for me i'll understand and try to resolve it
 for
 myself.
   Thanks.
  
   Hello everybody!
   Since week i dig lists and www and can't find solution for my
   problem.
   I'm using HTB 3.13 kernel 2-4-25 smp iptables 1.2.9.
   I've got situation like this:
  
   LAN--Linux Box(routing only)--- Linux Box
   (HTB)--Hardware Router(say:HD)--Internet
   When I start HTB it takes about 5 min. to start working and it
   works...
   within this 5min starting i can't ping HD and after about 5min I

Re: [LARTC] IP ROUTE

2004-07-28 Thread Matias Namiot



Thanks, the problem was the kernel with 
CONFIG_IP_ROUTE_MULTIPATH

  - Original Message - 
  From: 
  Matias 
  Namiot 
  To: [EMAIL PROTECTED] 
  Sent: Monday, July 26, 2004 3:47 PM
  Subject: [LARTC] IP ROUTE
  
  Hello, my linux show me that:
  
  
  server2 root # ip route add default scope 
  global nexthop via 192.168.5.1 dev eth2 weight 1 nexthop via 192.168.160.1 dev 
  eth0 weight 1RTNETLINK answers: Invalid argument
  
  What can I do
  Thanks
  Matias
  
  ---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.726 
  / Virus Database: 481 - Release Date: 
22/07/2004


Re: [LARTC] IP ROUTE

2004-07-28 Thread Matias Namiot




I need resolv this problem now, because I haven't 
any time, and my problem is:

server2 root # ip route add default scope 
global nexthop via 192.168.5.1 dev eth2 weight 1 nexthop via 192.168.160.1 dev 
eth0 weight 1RTNETLINK answers: Invalid argument


I want make this is my configuration:

# Configuración TC para Bariloche Wireless# 
Salida a internet eth1# Subida 128k y bajada 128k

# Valores:# mbps = 1024 kbps = 1024 * 1024 bps 
= byte/s# mbit = 1024 kbit = kilobit/s.# mb = 1024 kb = 1024 * 
1024 b = byte# mbit = 1024 kbit = kilobit.# Internamente, los 
números se almacenan en bps, pero cuando tc imprime las tasas, usa lo 
siguiente:# 1Mbit = 1024 Kbit = 1024 * 1024 bps = byte/s

# Limpiamos reglas anteriorestc qdisc del 
dev eth1 root 2 /dev/null  /dev/nulltc qdisc del 
dev eth1 ingress 2 /dev/null  /dev/null

# Definimos las qdisc

# Definimos tasa superior y dispositivo de 
internetCEIL=128DEV_INT=eth1

# Esta línea se encargará de enviar por defecto a 
la clase 1:15tc qdisc add dev eth1 root handle 1: htb default 
15

# Qdisc padretc class add dev eth1 parent 1: 
classid 1:1 htb rate ${CEIL}kbit ceil ${CEIL}kbit

# Esta línea se encargará de enviar paquetes de 
baja latencia (telnet, ssh, SYN, etc) como interactivastc class add dev eth1 
parent 1:1 classid 1:10 htb rate 80kbit ceil 80kbit prio 0

# Esta línea se encargará de tráfico masivo 
WEBtc class add dev eth1 parent 1:1 classid 1:11 htb rate 80kbit ceil 
${CEIL}kbit prio 1

# Esta línea se encargará de tráfico TOS de 
maximizar transferencia y el tráfico local#tc class add dev eth1 parent 1:1 
classid 1:12 htb rate 20kbit ceil ${CEIL}kbit prio 2

# Esta línea se encargará de las máquinas con 
NATtc class add dev eth1 parent 1:1 classid 1:13 htb rate 80kbit ceil 
${CEIL}kbit prio 2

# Esta línea se encargará del correo SMTP y POP3 
con un TOS de minimizar costo.tc class add dev eth1 parent 1:1 classid 1:14 
htb rate 20kbit ceil ${CEIL}kbit prio 3

# Esta línea se encargará de tráfico masivo de las 
máquinas con NAT con Kazaa, e-Donkey, etctc class add dev eth1 parent 1:1 
classid 1:15 htb rate 10kbit ceil ${CEIL}kbit prio 3

# Aplicamos SFQ para el tráfico pesado con hash 
cada 10 segundos#tc qdisc add dev eth1 parent 1:12 handle 120: sfq perturb 
10tc qdisc add dev eth1 parent 1:13 handle 130: sfq perturb 10tc qdisc 
add dev eth1 parent 1:14 handle 140: sfq perturb 10tc qdisc add dev eth1 
parent 1:15 handle 150: sfq perturb 10

# Clasificación de paquetes con iptables# 
Se prefiere por los paquetes porque son muy flexibles y puedes hacer conteo de 
paquetes por cada regla, y con el objetivo # RETURN los paquetes no 
necesitan pasar por todas las reglas. Los paquetes con FWMARK (handle x fw) van 
en la clase indicada 

tc filter add dev eth0 parent 1:0 protocol ip prio 
1 handle 1 fw classid 1:10tc filter add dev eth0 parent 1:0 protocol ip prio 
2 handle 2 fw classid 1:11#tc filter add dev eth0 parent 1:0 protocol ip 
prio 3 handle 3 fw classid 1:12tc filter add dev eth0 parent 1:0 protocol ip 
prio 4 handle 4 fw classid 1:13tc filter add dev eth0 parent 1:0 protocol ip 
prio 5 handle 5 fw classid 1:14tc filter add dev eth0 parent 1:0 protocol ip 
prio 6 handle 6 fw classid 1:15

# Acá hay que hacer NAT con 
iptables.

# Marcando paquetes# No olvidarse el -j 
RETURN de manera que los paquetes no atraviesen todas las reglas

# Para clase 10

# Marcando iptables para paquetes ICMPiptables 
-t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x1iptables -t mangle -A 
PREROUTING -p icmp -j RETURNiptables -t mangle -A OUTPUT -p icmp -j MARK 
--set-mark 0x1iptables -t mangle -A OUTPUT -p icmp -j RETURN

# Marcando iptables para paquetes con TOS para 
Minimizar el tiempoiptables -t mangle -A PREROUTING -m tos --tos 
Minimize-Delay -j MARK --set-mark 0x1iptables -t mangle -A PREROUTING -m tos 
--tos Minimize-Delay -j RETURNiptables -t mangle -A OUTPUT -m tos --tos 
Minimize-Delay -j MARK --set-mark 0x1iptables -t mangle -A OUTPUT -m tos 
--tos Minimize-Delay -j RETURN

# Marcando iptables para paquetes SSHiptables 
-t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j MARK --set-mark 
0x1iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j 
RETURNiptables -t mangle -A OUTPUT -p tcp -m tcp --sport 22 -j MARK 
--set-mark 0x1iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 22 -j 
RETURN# Marcando iptables para paquetes de 
sincronismoiptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags 
SYN,RST,ACK SYN -j MARK --set-mark 0x1iptables -t mangle -I PREROUTING -p 
tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j RETURNiptables -t mangle -I OUTPUT 
-p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j MARK --set-mark 0x1iptables -t 
mangle -I OUTPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j 
RETURN

# Para clase 11iptables -t mangle -A 
PREROUTING -p tcp -m tcp --sport 80 -j MARK --set-mark 0x2iptables -t mangle 
-A PREROUTING -p tcp -m tcp --sport 80 -j RETURNiptables -t mangle -A OUTPUT 
-p tcp -m tcp --sport 80 -j MARK 

Re: [LARTC] Re: HTB 3.13 please help

2004-07-28 Thread mjoachimiak
oops. I took bad classes (these clients where down so there was no traffic )
lately from tc -s -d class show dev eth0.
These are classes (part of) while there was no connection from clients.
BTW is it good tcng config with fw. I mean if
 fw {
 class $classname on (2);
}
means match packet to $classname if it's mark equals 2 ?

Is there any kind of sniffer or smth like that for tc? I mean to look in
realtime packet statistics. Smthing like iptraf maybe?

class htb 2:1 root rate 800Kbit ceil 800Kbit burst 2623b/8 mpu 0b cburst
2623b/8 mpu 0b level 7
 Sent 21958200 bytes 38721 pkts (dropped 0, overlimits 0)
 rate 47328bps 68pps
 lended: 22026 borrowed: 0 giants: 0
 tokens: 20609 ctokens: 20609

class htb 2:10 parent 2:1 leaf 10: prio 0 quantum 1920 rate 15Kbit ceil
100Kbit burst 1618b/8 mpu 0b cburst 1727b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 690773 ctokens: 110592

class htb 2:23 parent 2:1 leaf 23: prio 0 quantum 1920 rate 15Kbit ceil
100Kbit burst 1618b/8 mpu 0b cburst 1727b/8 mpu 0b level 0
 Sent 2490197 bytes 3069 pkts (dropped 0, overlimits 0)
 rate 5157bps 5pps
 lended: 1015 borrowed: 2054 giants: 0
 tokens: -475203 ctokens: -30720

class htb 2:32 parent 2:1 leaf 32: prio 0 quantum 1920 rate 15Kbit ceil
100Kbit burst 1618b/8 mpu 0b cburst 1727b/8 mpu 0b level 0
 Sent 476682 bytes 1633 pkts (dropped 0, overlimits 0)
 rate 661bps 2pps
 lended: 745 borrowed: 888 giants: 0
 tokens: -235603 ctokens: 107520

class htb 2:54 parent 2:1 leaf 54: prio 0 quantum 1920 rate 15Kbit ceil
20Kbit burst 1618b/8 mpu 0b cburst 1624b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 690773 ctokens: 51

class htb 2:20 parent 2:1 leaf 20: prio 0 quantum 1920 rate 15Kbit ceil
100Kbit burst 1618b/8 mpu 0b cburst 1727b/8 mpu 0b level 0
 Sent 108 bytes 2 pkts (dropped 0, overlimits 0)
 lended: 2 borrowed: 0 giants: 0
 tokens: 649813 ctokens: 104448

- Original Message - 
From: devik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: lartc [EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 3:30 PM
Subject: Re: [LARTC] Re: HTB 3.13 please help


 as you can see, NO packets are going thru. You have to look
 to other classes as well as to ifconfig and tc -s qdisc show dev xxx
 to see wherw packets are lost.


 On Wed, 28 Jul 2004 [EMAIL PROTECTED] wrote:

  //Just to not forget eth0 is WAN and eth1 is LAN . The box is NATing my
lan.
  I configured tcng to shape both download and upload
  and i got connection loss again.
  Maybe it is my script fault or it is something bad with packets marking
.
  this is how i mark outgoing packets
  iptables -t mangle -A MYSHAPER-OUT -p tcp -s 192.168.1.23 -j
MARK --set-mark
  $ip
 
  and this part of my script which is intented to shape upload:
  dev eth0 {
  egress {
  class ($default) if 1;
  htb ( r2q 1 ) {
  class ( rate 800kbps, ceil 800kbps ) {
 
  //192.168.1.0---
  $ruter = class ( rate 15kbps, ceil 250kbps  ) { sfq( perturb
10secs,
  quantum 1500Bytes ); } ;
fw {
 
  class $ruter on (23);
 
//ruter-
  
 
 
  //- fw
  }//fw
  }//main class
  }//htb
  }//egress
  }//eth0(none):/skrytpy#
 
  and these are a bit of `tc -s -d class show dev eth0` prints while
  connection loss after running my tcng script :
 
  class htb 2:f parent 2:1 leaf 10: prio 0 quantum 1875 rate 1875bps ceil
  15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   lended: 0 borrowed: 0 giants: 0
   tokens: 706914 ctokens: 95572
 
  class htb 2:1e parent 2:1 leaf 1f: prio 0 quantum 1875 rate 1875bps ceil
  15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   lended: 0 borrowed: 0 giants: 0
   tokens: 706914 ctokens: 95572
 
  class htb 2:2d parent 2:1 leaf 2e: prio 0 quantum 1875 rate 1875bps ceil
  15000bps burst 1617b/8 mpu 0b cburst 1749b/8 mpu 0b level 0
   Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
   lended: 0 borrowed: 0 giants: 0
   tokens: 706914 ctokens: 95572
 
 
   that is interesting. let me know then. other test might be to
   reboot with maxcpus=1 to mitigate smp related bugs.
  
   On Sat, 25 Jan 2003 [EMAIL PROTECTED] wrote:
  
Yes I'm using smp kernel.
I thought that i make some error that i canot see so i decided to
write
  my
classes using tcng this time.
Currently i'm shaping only outgoing traffic to my local
network(using
  tcng)
and it seems to work (it work one day without errors).
Today i'm going to configure upload too.
The difference i could see at once is that there is no connection
loss
  when
i'm starting htb.
- Original Message -
From: devik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: lartc 

[LARTC] CBQ Problem

2004-07-28 Thread Ricardo




 Hi. I want to shape traffic 
from some IPs in my lan, but I'm w/ trouble. I have a linux box connected to the 
Internet. In the other side of this box is my LAN. I want to create the 
following scenario:
My root qdisc is attached to a 100Mbit/s NIC
I want to create a class attached to this qdisc that will limit 
thetraffic at 384Kbit/s.
I want to createtwo leaf classes that limits thetraffic at 
256Kbit/s.
I want to attach twosfq qdiscs so two classes are treated 
equally.
I want toput one LAN IP for each leaf class.
When one IP is downloading a file from internet it will never be more than 
256Kbit.
When both IPs is downloading files at the same time, they will never be 
more than 384Kbit.

(I think that is something like the webserver + smtp example that is 
in the howto)

My config:

tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 
8tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 
384Kbit weight 38Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 
bounded

tc class add dev eth1 parent 1:1 classid 1:10 cbq bandwidth 100Mbit rate 
256Kbit weight 25Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000tc 
class add dev eth1 parent 1:1 classid 1:20 cbq bandwidth 100Mbit rate 256Kbit 
weight 25Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:10 handle 100: sfqtc qdisc add dev eth1 
parent 1:20 handle 200: sfq

tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 
10.0.0.2/32 flowid 1:10tc filter add dev eth1 parent 1:0 protocol ip prio 1 
u32 match ip dst 10.0.0.3/32 flowid 1:20
When I start a download from one machine, the speed is limited at 256Kbit/s 
(this is OK)
When I start a download from both machines, the speed for each machine is 
limited to 256Kbit/s. They are getting 512Kbit/s together.
I want limit this speed at 384Kbit/s, so traffic from each machine will 
never bemore than192Kbps when both are in use.

Why it is not working for me ??? What is the mistake ?
Thank You.

Ricardo