Re: [LARTC] bandwidth controlling and monitering

2004-04-27 Thread Animesh Bansriyar
On Wed, 2004-04-28 at 08:05, kaushalender1 wrote:
>  Hi group,
> I am new to this group and linux.we have a linux box on which we are 
> giving bandwidth to multiple customers..this box have two ethernet
>interface eth0 and eth1 .Eth0 is directly connected to internet and
>eth1 is connected to customer, for examle eth1 have 10.10.X.x series
>and wth1:1 have 10.11.x.x series .Can any body help in restricting
>bandwidth 48 kbps for 10.10.x.x and 64 for 10.11.x.x and make a
>utilization graph of there bandwidt i will be highly thankfull
> 

You could have posted a better question instead of simply asking the
list how to do everything. If you don't know how to do simple bandwidth
management stuff I would suggest not trying. If you are so new to
Traffic control and Linux, get some professional consulting.

ANyway read up on the following and then get back to the list after
forming a proper question:

  Linux Advanced Routing HOWTO
  Traffic Control HOWTO
  Traffic Control howto will tell you a lot about what you want.
  LARTC list archives
  Google.

I would suggest using HTB for this.

Cheers!
Animesh


-- 
Animesh Bansriyar <[EMAIL PROTECTED]>
http://neolinuxsolutions.com, +91-651-3112497, 3122401.

Linux Intranet/Internet Servers, Specialised E-mail Setups, 
Enterprise Database and Directory Services, Linux Application 
Development and Commercial Support for Free/OpenSource Software

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


[LARTC] HTB classes and SFQ qdiscs showing 0 sent bytes

2004-02-24 Thread Animesh Bansriyar

Hi All,

I have set up a test script to limit incoming connections to my Network
Server like this. Running SuSE Linux Professional 8.2. The snippet from
my script is:



#Deleting previous root handle

tc qdisc del dev eth0 root

# Adding new root handle
tc qdisc add dev eth0 root handle 1 htb default 30

#Dividing the classes

tc class add dev eth0 parent 1: classid 1:1 htb rate 4Mbit ceil 4Mbit

tc class add dev eth0 parent 1:1 classid 1:2 htb rate 1Mbit ceil 1Mbit
burst 15k
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 1Mbit ceil 1Mbit
burst 15k
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 1Mbit ceil 1Mbit
burst 15k
tc class add dev eth0 parent 1:1 classid 1:5 htb rate 1Mbit ceil 1Mbit
burst 15k

#Addming SFQ beneath these classes

tc qdisc add dev eth0 parent 1:2 handle 2 sfq perturb 10
tc qdisc add dev eth0 parent 1:3 handle 3 sfq perturb 10
tc qdisc add dev eth0 parent 1:4 handle 4 sfq perturb 10
tc qdisc add dev eth0 parent 1:5 handle 5 sfq perturb 10

# Adding some filters

tc filter add dev eth0 protocol ip parent 1:2 prio 1 u32 \
match ip src 192.168.1.1/24 classid 1:2
tc filter add dev eth0 protocol ip parent 1:3 prio 1 u32 \
match ip src 192.168.1.2/24 classid 1:3
tc filter add dev eth0 protocol ip parent 1:4 prio 1 u32 \
match ip src 192.168.1.3/24 classid 1:4
tc filter add dev eth0 protocol ip parent 1:5 prio 1 u32 \
match ip src 192.168.1.4/24 classid 1:5



The output from 
laptop:/home/animesh/HTB # tc -s -d qdisc show dev eth0
qdisc sfq 5: limit 128p quantum 1514b flows 128/1024 perturb 10sec
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc sfq 4: limit 128p quantum 1514b flows 128/1024 perturb 10sec
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc sfq 3: limit 128p quantum 1514b flows 128/1024 perturb 10sec
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc sfq 2: limit 128p quantum 1514b flows 128/1024 perturb 10sec
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc htb 1: r2q 10 default 30 direct_packets_stat 1039 ver 3.7
 Sent 261902 bytes 1039 pkts (dropped 0, overlimits 0)
laptop:/home/animesh/HTB #

laptop:/home/animesh/HTB # tc -s -d class show dev eth0
class htb 1:1 root rate 4Mbit ceil 4Mbit burst 6841b/8 mpu 0b cburst
6841b/8 mpu 0b level 7
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 10690 ctokens: 10690

class htb 1:2 parent 1:1 leaf 2: prio 0 quantum 13107 rate 1Mbit ceil
1Mbit burst 15Kb/8 mpu 0b cburst 2909b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 95999 ctokens: 18187

class htb 1:3 parent 1:1 leaf 3: prio 0 quantum 13107 rate 1Mbit ceil
1Mbit burst 15Kb/8 mpu 0b cburst 2909b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 95999 ctokens: 18187

class htb 1:4 parent 1:1 leaf 4: prio 0 quantum 13107 rate 1Mbit ceil
1Mbit burst 15Kb/8 mpu 0b cburst 2909b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 95999 ctokens: 18187

class htb 1:5 parent 1:1 leaf 5: prio 0 quantum 13107 rate 1Mbit ceil
1Mbit burst 15Kb/8 mpu 0b cburst 2909b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 95999 ctokens: 18187

Notice the "Sent 0 bytes" for both teh SFQ qdiscs and the HTB classes. I
am stuck over here. Please suggest what might be wrong and whether my
approach is right.

Regards,
Animesh

-- 
--------
Animesh Bansriyar, CTO  |   NeoLinux Solutions, Ranchi
[EMAIL PROTECTED]   |   http://neolinuxsolutions.com
+91.651.3112497,3122401 |   Driving Technology Through Linux

  Linux Intranet/Internet Solutions and Services, Custom Applications

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