* Re: [LARTC] few doubts about the working of tc
@ 1980-01-03 23:15 Stef Coene
2002-03-25 16:14 ` Akarapu Mahesh
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Stef Coene @ 1980-01-03 23:15 UTC (permalink / raw)
To: lartc
On Tuesday 26 March 2002 18:01, Akarapu Mahesh wrote:
> HI stef,
> The following is the test scenario i am using.
>
> A--->B--->C
>
> First let me explain what i am doing here. I want to rate limit the traffic
> between A and B dynamically. I am doing this on A using "tc". All these
> machines have redhat 7.1 and A has 2.2.13 kernel with diffserv patch and B
> and C have 2.4.3 kernels.The following is the script that i am using.
>
>
> 1)tc qdisc del dev eth1 root
> 2)tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit cell 8 avpkt
> 1000 mpu 64
> 3)tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
> 100Mbit allot 1514 cell 8 weight 10Mbit prio 8 maxburst 20 avpkt 1000
> 4)tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate
> 60Mbit allot 1514 cell 8 weight 6Mbit prio 3 maxburst 20 avpkt 1000 bounded
> 5)sudo tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit
> rate 40Mbit allot 1514 cell 8 weight 4Mbit prio 7 maxburst 20 avpkt 1000
> bounded
> 6)tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
> 192.168.123.5 flowid 1:2
>
> SInce i want to limit only the traffic between A and C i created only one
> filter for class 1:2. NOw i am changing the bandwidth limit using the
> following command. In the above 192.168.123.5 is the address of C.
>
> 7)tc class change dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit
> rate 60Mbit allot 1514 cell 8 weight 6Mbit prio 3 maxburst 20 avpkt 1000
> bounded
>
> Now let me tell my doubts.
>
> 1)Now suppose the bandwidth limit of A-->C traffic is changed from 60Mbps
> to 20Mbps during a transfer, how does tc react to it?? Does it send the
> packets remaining in the queue at 60Mbps or 20Mbps or does it drop all the
> packets before changing the limit to 20Mbps??
I don't know what happens if you use the change command. :(. It will change
the bandwidth, but I don't know what happens with the queue.
> 2) Can i run the same script on B to limit the taffic between A and C??
Yes
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LARTC] few doubts about the working of tc
1980-01-03 23:15 [LARTC] few doubts about the working of tc Stef Coene
@ 2002-03-25 16:14 ` Akarapu Mahesh
2002-03-25 17:51 ` Stef Coene
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Akarapu Mahesh @ 2002-03-25 16:14 UTC (permalink / raw)
To: lartc
HI,
I am new to tc. I have a few basic doubts about the working of tc.I am
trying to limit the bandwidth between two linux machines to 12Mbps. I am
using the route filter to achieve this. I tested with ttcp traffic between
these machines. I used tcpdump cature the data during this transfer and
observed this using tcptrace. I find that the throuhgput was much higher
than 12Mbp sometimes during the transfer. But the avg throughput for the
whole transfer was 12Mbps. NOw my doubt is how tc is going to limit the
bandwidth?? Please let me know how exactly tc limits the bandwidth.
thanks
mahesh
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] few doubts about the working of tc
1980-01-03 23:15 [LARTC] few doubts about the working of tc Stef Coene
2002-03-25 16:14 ` Akarapu Mahesh
@ 2002-03-25 17:51 ` Stef Coene
2002-03-26 13:46 ` Julián Muñoz
2002-03-26 17:01 ` Akarapu Mahesh
3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2002-03-25 17:51 UTC (permalink / raw)
To: lartc
On Monday 25 March 2002 17:14, Akarapu Mahesh wrote:
> HI,
> I am new to tc. I have a few basic doubts about the working of tc.I am
> trying to limit the bandwidth between two linux machines to 12Mbps. I am
> using the route filter to achieve this. I tested with ttcp traffic between
> these machines. I used tcpdump cature the data during this transfer and
> observed this using tcptrace. I find that the throuhgput was much higher
> than 12Mbp sometimes during the transfer. But the avg throughput for the
> whole transfer was 12Mbps. NOw my doubt is how tc is going to limit the
> bandwidth?? Please let me know how exactly tc limits the bandwidth.
How do you made your setup ? CBQ or HTB? classes, qdiscs, filters ?
More info plz.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] few doubts about the working of tc
1980-01-03 23:15 [LARTC] few doubts about the working of tc Stef Coene
2002-03-25 16:14 ` Akarapu Mahesh
2002-03-25 17:51 ` Stef Coene
@ 2002-03-26 13:46 ` Julián Muñoz
2002-03-26 17:01 ` Akarapu Mahesh
3 siblings, 0 replies; 5+ messages in thread
From: Julián Muñoz @ 2002-03-26 13:46 UTC (permalink / raw)
To: lartc
tc doesn't limit the traffic, it is the kernel who does it.
The limitation of the traffic is based on some queue theories. Packets are
enqueued in a way, and then dequeued and sent to the netwok interface.
The fact that the throughput is sometime very high can be explained how
the queues manage the bursts of datas. We could say it is a feature, not a
bug. But if you don't want it, it is a parameter of the queue, that you
can change with tc (hehehe, here is the question!) with a parameter like
"burst" (it depends of the type of queue).
On Mon, 25 Mar 2002, Akarapu Mahesh wrote:
>
> HI,
> I am new to tc. I have a few basic doubts about the working of tc.I am
> trying to limit the bandwidth between two linux machines to 12Mbps. I am
> using the route filter to achieve this. I tested with ttcp traffic between
> these machines. I used tcpdump cature the data during this transfer and
> observed this using tcptrace. I find that the throuhgput was much higher
> than 12Mbp sometimes during the transfer. But the avg throughput for the
> whole transfer was 12Mbps. NOw my doubt is how tc is going to limit the
> bandwidth?? Please let me know how exactly tc limits the bandwidth.
>
> thanks
> mahesh
>
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
--
__o
_ \<_
(_)/(_)
Saludos de Julián
EA4ACL
-.-
Foro Wireless Madrid
http://opennetworks.rg3.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] few doubts about the working of tc
1980-01-03 23:15 [LARTC] few doubts about the working of tc Stef Coene
` (2 preceding siblings ...)
2002-03-26 13:46 ` Julián Muñoz
@ 2002-03-26 17:01 ` Akarapu Mahesh
3 siblings, 0 replies; 5+ messages in thread
From: Akarapu Mahesh @ 2002-03-26 17:01 UTC (permalink / raw)
To: lartc
HI stef,
The following is the test scenario i am using.
A--->B--->C
First let me explain what i am doing here. I want to rate limit the traffic
between A and B dynamically. I am doing this on A using "tc". All these
machines have redhat 7.1 and A has 2.2.13 kernel with diffserv patch and B
and C have 2.4.3 kernels.The following is the script that i am using.
1)tc qdisc del dev eth1 root
2)tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit cell 8 avpkt
1000 mpu 64
3)tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
100Mbit allot 1514 cell 8 weight 10Mbit prio 8 maxburst 20 avpkt 1000
4)tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate
60Mbit allot 1514 cell 8 weight 6Mbit prio 3 maxburst 20 avpkt 1000 bounded
5)sudo tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit
rate 40Mbit allot 1514 cell 8 weight 4Mbit prio 7 maxburst 20 avpkt 1000
bounded
6)tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst
192.168.123.5 flowid 1:2
SInce i want to limit only the traffic between A and C i created only one
filter for class 1:2. NOw i am changing the bandwidth limit using the
following command. In the above 192.168.123.5 is the address of C.
7)tc class change dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate
60Mbit allot 1514 cell 8 weight 6Mbit prio 3 maxburst 20 avpkt 1000 bounded
Now let me tell my doubts.
1)Now suppose the bandwidth limit of A-->C traffic is changed from 60Mbps to
20Mbps during a transfer, how does tc react to it?? Does it send the packets
remaining in the queue at 60Mbps or 20Mbps or does it drop all the packets
before changing the limit to 20Mbps??
2) Can i run the same script on B to limit the taffic between A and C??
thanks
mahesh
>From: Stef Coene <stef.coene@docum.org>
>To: "Akarapu Mahesh" <mahesh_a6@hotmail.com>, lartc@mailman.ds9a.nl
>Subject: Re: [LARTC] few doubts about the working of tc
>Date: Mon, 25 Mar 2002 18:51:33 +0100
>
>On Monday 25 March 2002 17:14, Akarapu Mahesh wrote:
> > HI,
> > I am new to tc. I have a few basic doubts about the working of tc.I am
> > trying to limit the bandwidth between two linux machines to 12Mbps. I am
> > using the route filter to achieve this. I tested with ttcp traffic
>between
> > these machines. I used tcpdump cature the data during this transfer and
> > observed this using tcptrace. I find that the throuhgput was much higher
> > than 12Mbp sometimes during the transfer. But the avg throughput for the
> > whole transfer was 12Mbps. NOw my doubt is how tc is going to limit the
> > bandwidth?? Please let me know how exactly tc limits the bandwidth.
>How do you made your setup ? CBQ or HTB? classes, qdiscs, filters ?
>More info plz.
>
>Stef
>
>--
>
>stef.coene@docum.org
> "Using Linux as bandwidth manager"
> http://www.docum.org/
> #lartc @ irc.openprojects.net
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-03-26 17:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1980-01-03 23:15 [LARTC] few doubts about the working of tc Stef Coene
2002-03-25 16:14 ` Akarapu Mahesh
2002-03-25 17:51 ` Stef Coene
2002-03-26 13:46 ` Julián Muñoz
2002-03-26 17:01 ` Akarapu Mahesh
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.