All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] cbq bounded problem
@ 2003-06-05  4:47 Zealous
  2003-06-05  7:41 ` Stef Coene
  2003-06-06  3:41 ` [LARTC] CBQ " Zealous
  0 siblings, 2 replies; 3+ messages in thread
From: Zealous @ 2003-06-05  4:47 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 570 bytes --]

Dear all,

I have 1 mbps line to internet.

Our linux server is connected to router of 1mb

Linux server gets 1mb bandwidth.

I have done SOURCE MASQUERADING on linux.

I have attached a cbq bandwidth script. I want to allow the traffic to restrict to 200Kbps. it should not exceed beyond 200. 

I have made a configuration and i kept on the server but the traffic goes beyond 200 .....it even goes to 350 and 400.
how can i restrict the traffic on 200. ????
plz check the attached script .
plz open in word.
any help is great for me. 

Thanks,
Joel

[-- Attachment #1.2: Type: text/html, Size: 1776 bytes --]

[-- Attachment #2: cbq.txt --]
[-- Type: text/plain, Size: 4771 bytes --]

#!/sbin/sh

TC=` which tc`
IP=` which ip`

d2vtotal=150
cable=170
jcom=45
collector=40
lakhanpal=36
ashwin=60
free=25
helpdesk=50
prabhu=30
cmnGp=35
cms=34

#### CONFIG FOR 10Mbit ROOT BANDWIDTH ####

$TC qdisc del dev eth4 root

$TC qdisc add dev eth4 root handle 10: cbq bandwidth 10Mbit avpkt 1000

$TC class add dev eth4 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate $[d2vtotal]Kbit allot 1514 weight 50Kbit prio 8 maxburst 20 avpkt 1000 bounded


#### CONFIG FOR FREE GROUP 30 KBPS ####
$TC class add dev eth4 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate $[free]Kbit allot 1514 weight 4kbit prio 3 maxburst 20 avpkt 1000 bounded

#### CONFIG FOR CABLE IN SHARING FOR 170 KBPS
$TC class add dev eth4 parent 10:1 classid 10:200 cbq bandwidth 10Mbit rate $[cable]Kbit allot 1514 weight 30Kbit prio 3 maxburst 20 avpkt 800 bounded

#### SFQ CONFIGURATION ####
$TC qdisc add dev eth4 parent 10:100 sfq quantum 1514b perturb 15
$TC qdisc add dev eth4 parent 10:200 sfq quantum 1514b perturb 15

#### RESTRICTION PER SUBNET FOR FREE GROUP 30KBPS  ####
# $TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst /28 flowid 10:100

#### INDIVIDUAL CONFIGURATION FOR JCOM / COLLECTOR / LAKHANPAL / ASHWIN ####

## COLLECTOR ##
$TC class add dev eth4 parent 10:200 classid 10:1000 cbq bandwidth 10Mbit rate $[collector]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded

$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.2.1.40 flowid 10:1000

## LAKHANPAL ##
$TC class add dev eth4 parent 10:200 classid 10:1001 cbq bandwidth 10Mbit rate $[lakhanpal]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded

$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.255.0.17 flowid 10:1001

## ASHWIN VANASPATI ##
$TC class add dev eth4 parent 10:200 classid 10:1002 cbq bandwidth 10Mbit rate $[ashwin]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded

$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.1.1.8/29 flowid 10:1002

## JCOM ##
$TC class add dev eth4 parent 10:200 classid 10:1003 cbq bandwidth 10Mbit rate $[jcom]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded

$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.100.2.2/29 flowid 10:1003
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.255.2.16/30 flowid 10:1003

## HELPDESK ##
$TC class add dev eth4 parent 10:200 classid 10:1004 cbq bandwidth 10Mbit rate $[helpdesk]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 10.2.5.15 flowid 10:1004

## PRABHU ##
$TC class add dev eth4 parent 10:200 classid 10:1005 cbq bandwidth 10Mbit rate $[prabhu]Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 800 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.2.100 flowid 10:1005
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip src 192.168.2.100 flowid 10:1005

## 203 ##
$TC class add dev eth4 parent 10:200 classid 10:1006 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 10Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.3.100 flowid 10:1006

## 204 ##
$TC class add dev eth4 parent 10:200 classid 10:1007 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.5.100 flowid 10:1007

## 205 ##
$TC class add dev eth4 parent 10:200 classid 10:1008 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.6.100 flowid 10:1008

## 206 ## 
$TC class add dev eth4 parent 10:200 classid 10:1009 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.7.100 flowid 10:1009

## 207 ## 
$TC class add dev eth4 parent 10:200 classid 10:1010 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.8.100 flowid 10:1010

## CMS ##
$TC class add dev eth4 parent 10:200 classid 10:1011 cbq bandwidth 10Mbit rate $[cms]Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 100 u32 match ip dst 192.168.10.100 flowid 10:1011



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

* Re: [LARTC] cbq bounded problem
  2003-06-05  4:47 [LARTC] cbq bounded problem Zealous
@ 2003-06-05  7:41 ` Stef Coene
  2003-06-06  3:41 ` [LARTC] CBQ " Zealous
  1 sibling, 0 replies; 3+ messages in thread
From: Stef Coene @ 2003-06-05  7:41 UTC (permalink / raw)
  To: lartc

On Thursday 05 June 2003 06:35, Zealous wrote:
> Dear all,
>
> I have 1 mbps line to internet.
>
> Our linux server is connected to router of 1mb
>
> Linux server gets 1mb bandwidth.
>
> I have done SOURCE MASQUERADING on linux.
>
> I have attached a cbq bandwidth script. I want to allow the traffic to
> restrict to 200Kbps. it should not exceed beyond 200.
>
> I have made a configuration and i kept on the server but the traffic goes
> beyond 200 .....it even goes to 350 and 400. how can i restrict the traffic
> on 200. ????
> plz check the attached script .
> plz open in word.
> any help is great for me.
Some tips :
- Adding the sfq qdisc to class 10:200 is useless.  It's removed as soon as 
you add a subclass.
- Are you sure your packes are queued in the class you want?  Check it out 
with tc -s -d class show dev eth4.
- prio 100 is too much.  The maximum is 7.
- avpkt 800 should reflect your average packet size.  Are you sure it's only 
800 bytes?
- Is your NIC configured at 10Mbit?  (bandwidth parameter)
Take weight = rate / 10.
- Use htb and visit www.docum.org :)

Stef


-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

* [LARTC] CBQ bounded problem
  2003-06-05  4:47 [LARTC] cbq bounded problem Zealous
  2003-06-05  7:41 ` Stef Coene
@ 2003-06-06  3:41 ` Zealous
  1 sibling, 0 replies; 3+ messages in thread
From: Zealous @ 2003-06-06  3:41 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Dear friends,

I have 1 mbps line connected to linux server.

from linux server i have masqueraded some clients. I want to use only 200
kbps. I have attached the script.
But on this script the traffic goes up to 350 kbps.
how can i bound the bandwidth to 200 kbps.
it should not exceed more than that.
plz see the script.
where m i wrong.
any suggestions???

Thanking You,
Joel

[-- Attachment #2: channels.cbq.eth4 --]
[-- Type: application/octet-stream, Size: 5438 bytes --]

#!/sbin/sh

TC=` which tc`
IP=` which ip`

d2vtotal=150
cable=170
jcom=50
collector=40
lakhanpal=36
ashwin=60
free=25
helpdesk=50
prabhu=30
cmnGp=35
cms=34

#### CONFIG FOR 10Mbit ROOT BANDWIDTH ####

$TC qdisc del dev eth4 root

$TC qdisc add dev eth4 root handle 10: cbq bandwidth 10Mbit avpkt 1000

$TC class add dev eth4 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate $[d2vtotal]Kbit allot 1514 weight 1Mbit prio 7 maxburst 20 avpkt 1000 bounded


#### CONFIG FOR FREE GROUP 30 KBPS ####
$TC class add dev eth4 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate $[free]Kbit allot 1514 weight 2.5Kbit prio 3 maxburst 20 avpkt 1000 bounded

#### CONFIG FOR CABLE IN SHARING FOR 170 KBPS
$TC class add dev eth4 parent 10:1 classid 10:200 cbq bandwidth 10Mbit rate $[cable]Kbit allot 1514 weight 3Kbit prio 3 maxburst 20 avpkt 1000 bounded

#### SFQ CONFIGURATION ####
#$TC qdisc add dev eth4 parent 10:100 sfq quantum 1514b perturb 15
#$TC qdisc add dev eth4 parent 10:200 sfq quantum 1514b perturb 15

#### RESTRICTION PER SUBNET FOR FREE GROUP 30KBPS  ####
# $TC filter add dev eth4 parent 10:0 protocol ip prio 3 u32 match ip dst /28 flowid 10:100

#### INDIVIDUAL CONFIGURATION FOR JCOM / COLLECTOR / LAKHANPAL / ASHWIN ####

## COLLECTOR ##
$TC class add dev eth4 parent 10:200 classid 10:1000 cbq bandwidth 10Mbit rate $[collector]Kbit allot 1514 weight 4Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1000 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 10.2.1.40 flowid 10:1000

## LAKHANPAL ##
$TC class add dev eth4 parent 10:200 classid 10:1001 cbq bandwidth 10Mbit rate $[lakhanpal]Kbit allot 1514 weight 3Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1001 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 10.255.0.17 flowid 10:1001

## ASHWIN VANASPATI ##
$TC class add dev eth4 parent 10:200 classid 10:1002 cbq bandwidth 10Mbit rate $[ashwin]Kbit allot 1514 weight 6Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1002 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 10.1.1.8/29 flowid 10:1002

## JCOM ##
$TC class add dev eth4 parent 10:200 classid 10:1003 cbq bandwidth 10Mbit rate $[jcom]Kbit allot 1514 weight 5Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1003 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.0.10/29 flowid 10:1003
$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 10.255.2.16/30 flowid 10:1003

## HELPDESK ##
$TC class add dev eth4 parent 10:200 classid 10:1004 cbq bandwidth 10Mbit rate $[helpdesk]Kbit allot 1514 weight 5Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1004 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 10.2.5.15 flowid 10:1004

## PRABHU ##
$TC class add dev eth4 parent 10:200 classid 10:1005 cbq bandwidth 10Mbit rate $[prabhu]Kbit allot 1514 weight 3Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1005 sfq quantum 1514b perturb 15
$TC filter add dev eth4 parent 10:0 protocol ip prio 3 u32 match ip dst 192.168.100.50 flowid 10:1005
$TC filter add dev eth4 parent 10:0 protocol ip prio 3 u32 match ip src 192.168.100.60 flowid 10:1005

## 203 ##
$TC class add dev eth4 parent 10:200 classid 10:1006 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 3Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1006 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.100.70 flowid 10:1006

## 204 ##
$TC class add dev eth4 parent 10:200 classid 10:1007 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 3Kbit prio 3 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1007 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.0.80 flowid 10:1007


## 205 ##
$TC class add dev eth4 parent 10:200 classid 10:1008 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 3Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1008 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.100.55 flowid 10:1008


## 206 ## 
$TC class add dev eth4 parent 10:200 classid 10:1009 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 3Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.100.99 flowid 10:1009

## 207 ## 
$TC class add dev eth4 parent 10:200 classid 10:1010 cbq bandwidth 10Mbit rate 30Kbit allot 1514 weight 3Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.100.85 flowid 10:1010

## CMS ##
$TC class add dev eth4 parent 10:200 classid 10:1011 cbq bandwidth 10Mbit rate $[cms]Kbit allot 1514 weight 3Kbit prio 5 maxburst 20 avpkt 1000 bounded
$TC qdisc add dev eth4 parent 10:1011 sfq quantum 1514b perturb 15

$TC filter add dev eth4 parent 10:0 protocol ip prio 5 u32 match ip dst 192.168.100.2 flowid 10:1011



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

end of thread, other threads:[~2003-06-06  3:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-05  4:47 [LARTC] cbq bounded problem Zealous
2003-06-05  7:41 ` Stef Coene
2003-06-06  3:41 ` [LARTC] CBQ " Zealous

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.