[LARTC] traffic shaping on single ip...

2004-04-08 Thread Cristiano Soares




Hi all. Im using the following CQB shaper to shape 
IP addresses:

DEV=eth1 (internal eth)

tc qdisc del dev $DEV roottc qdisc add dev $DEV 
root handle 1: cbq avpkt 1000 bandwidth 100mbit
tc class add dev $DEV parent 1: classid 1:1 cbq 
rate 256kbit allot 1500 prio 5 bounded isolatedtc class add dev $DEV parent 
1: classid 1:2 cbq rate 512kbit allot 1500 prio 5 bounded isolated

tc filter add dev $DEV parent 1: protocol ip prio 
16 u32 match ip dst 192.168.2.230 flowid 1:2tc filter add dev $DEV parent 1: 
protocol ip prio 16 u32 match ip src 192.168.2.230 flowid 1:2

tc filter add dev $DEV parent 1: protocol ip prio 
16 u32 match ip dst 192.168.2.188 flowid 1:1tc filter add dev $DEV parent 1: 
protocol ip prio 16 u32 match ip src 192.168.2.188 flowid 1:1

tc filter add dev $DEV parent 1: protocol ip prio 
16 u32 match ip dst 192.168.2.172 flowid 1:1tc filter add dev $DEV parent 1: 
protocol ip prio 16 u32 match ip src 192.168.2.172 flowid 1:1

The thing is, i want to be able to shape inbound 
different from outbound traffic. I use an ADSL line so, i need to shape up 
significantly lower than down. Thanks a lot.
And also, is there a better way to shape traffic 
like this? Thanks a lot.

Cristiano


Re: [LARTC] traffic shaping on single ip...

2004-04-08 Thread Roy



You cant control input traffic that way at 
all.

you need to use imq for inbound traffic control, or 
at least policers.

also cbq is very old and should be replaced with 
htb


  - Original Message - 
  From: 
  Cristiano Soares 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, April 08, 2004 7:54 
  PM
  Subject: [LARTC] traffic shaping on 
  single ip...
  
  
  Hi all. Im using the following CQB shaper to 
  shape IP addresses:
  
  DEV=eth1 (internal eth)
  
  tc qdisc del dev $DEV roottc qdisc add dev 
  $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
  tc class add dev $DEV parent 1: classid 1:1 cbq 
  rate 256kbit allot 1500 prio 5 bounded isolatedtc class add dev $DEV 
  parent 1: classid 1:2 cbq rate 512kbit allot 1500 prio 5 bounded 
  isolated
  
  tc filter add dev $DEV parent 1: protocol ip prio 
  16 u32 match ip dst 192.168.2.230 flowid 1:2tc filter add dev $DEV parent 
  1: protocol ip prio 16 u32 match ip src 192.168.2.230 flowid 1:2
  
  tc filter add dev $DEV parent 1: protocol ip prio 
  16 u32 match ip dst 192.168.2.188 flowid 1:1tc filter add dev $DEV parent 
  1: protocol ip prio 16 u32 match ip src 192.168.2.188 flowid 1:1
  
  tc filter add dev $DEV parent 1: protocol ip prio 
  16 u32 match ip dst 192.168.2.172 flowid 1:1tc filter add dev $DEV parent 
  1: protocol ip prio 16 u32 match ip src 192.168.2.172 flowid 
  1:1
  
  The thing is, i want to be able to shape inbound 
  different from outbound traffic. I use an ADSL line so, i need to shape up 
  significantly lower than down. Thanks a lot.
  And also, is there a better way to shape traffic 
  like this? Thanks a lot.
  
  Cristiano