From: "Joel" <zealous@bonbon.net>
To: lartc@vger.kernel.org
Subject: [LARTC] ~Restriction Problem~
Date: Tue, 14 Oct 2003 11:15:27 +0000 [thread overview]
Message-ID: <marc-lartc-106613250220050@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 5171 bytes --]
----- Original Message -----
From: Joel
To: lartc@mailman.ds9a.nl
Sent: Tuesday, October 14, 2003 12:12 PM
Subject: ~Restriction Problem~
Dear all,
I have rehat 9.0 server connected to router. The link is 1 mbps
Now i want to share only 260 kbps bandwidth through the linux server to the clients.
I have wrote the script. but with it i can restrict the total bandwidth to 260 kbps.
i dont want to give more than 260 thats it.
all clients are given individual bandwidht from 260 total.
plz tell me where i m wrong and if u could little modify the script that would be really great.
Stef ...i wish u will help me out to solve the problem.
thanks
Joel
this the script.
#!/bin/sh
D2VCABLE=260
cmnGp=37
jcom=50
ultra=64
collector=40
lakhanpal=40
ashwin=60
prabhu=35
helpdesk=45
quantam=40
cms=40
siddharth=60
TC=` which tc`
ADDFILTER="$TC filter add dev eth4"
$TC qdisc del dev eth4 root
### Root Qdisc
$TC qdisc add dev eth4 root handle 5: htb default 12
$TC class add dev eth4 parent 5: classid 5:1 htb rate 256kbit ceil $[D2VCABLE]kbit quantum 3000
### jcom
$TC class add dev eth4 parent 5:1 classid 5:2001 htb rate $[jcom]kbit ceil $[jcom+10]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2001 handle 2001 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 2 u32 match ip dst 202.160.162.208/29 flowid 5:2001
$ADDFILTER protocol ip parent 5: prio 2 u32 match ip dst 10.255.2.16/30 flowid 5:2001
### collector
$TC class add dev eth4 parent 5:1 classid 5:2002 htb rate $[collector]kbit ceil $[collector+5]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2002 handle 2002 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.2.1.40 flowid 5:2002
### lakhanpal
$TC class add dev eth4 parent 5:1 classid 5:2003 htb rate $[lakhanpal]kbit ceil $[lakhanpal+5]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2003 handle 2003 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.255.0.17 flowid 5:2003
### ashwin
$TC class add dev eth4 parent 5:1 classid 5:2004 htb rate $[ashwin]kbit ceil $[ashwin+5]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2004 handle 2004 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.1.1.8/29 flowid 5:2004
### prabhu 202
$TC class add dev eth4 parent 5:1 classid 5:2005 htb rate $[prabhu]kbit ceil $[prabhu+5]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2005 handle 2005 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.202 flowid 5:2005
### 203
$TC class add dev eth4 parent 5:1 classid 5:2006 htb rate 35kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2006 handle 2006 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.203 flowid 5:2006
### 204
$TC class add dev eth4 parent 5:1 classid 5:2007 htb rate 35kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2007 handle 2007 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.204 flowid 5:2007
### 205
$TC class add dev eth4 parent 5:1 classid 5:2008 htb rate 35kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2008 handle 2008 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.205 flowid 5:2008
### 206
$TC class add dev eth4 parent 5:1 classid 5:2009 htb rate 35kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2009 handle 2009 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.206 flowid 5:2009
### quantam
$TC class add dev eth4 parent 5:1 classid 5:2010 htb rate 40kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2010 handle 2010 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.1.5.34 flowid 5:2010
### Siddharth
$TC class add dev eth4 parent 5:1 classid 5:2011 htb rate $[siddharth]kbit ceil $[siddharth]kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2011 handle 2011 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.2.1.18 flowid 5:2011
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.2.1.19 flowid 5:2011
### 250
$TC class add dev eth4 parent 5:1 classid 5:2012 htb rate 35kbit ceil 40kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2012 handle 2012 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 3 u32 match ip dst 10.0.0.250 flowid 5:2012
### helpdesk
$TC class add dev eth4 parent 5:1 classid 5:2013 htb rate 40kbit ceil 45kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2013 handle 2013 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 2 u32 match ip dst 10.2.5.15 flowid 5:2013
### Joel test
$TC class add dev eth4 parent 5:1 classid 5:2014 htb rate 40kbit ceil 50kbit quantum 3000
$TC qdisc add dev eth4 parent 5:2014 handle 2014 sfq perturb 10
$ADDFILTER protocol ip parent 5: prio 2 u32 match ip dst 10.10.10.10 flowid 5:2014
[-- Attachment #2: Type: text/html, Size: 22333 bytes --]
next reply other threads:[~2003-10-14 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 11:15 Joel [this message]
2003-10-15 18:49 ` [LARTC] ~Restriction Problem~ Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-106613250220050@msgid-missing \
--to=zealous@bonbon.net \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.