All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link
@ 2004-07-01  9:54 Nick Howden
  2004-07-01 10:54 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth Ed Wildgoose
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nick Howden @ 2004-07-01  9:54 UTC (permalink / raw)
  To: lartc

Hello, 

I am attempting to use the LARTC traffic control to simulate a radio link that 
has variable bandwidth and availability. The basic bandwidth could be as low 
as 500 bits/sec but will generally be about 4000 bits/sec. If the simulated 
radio link is unavailable (zero bandwidth) then packets should be queued 
until a link is re-established. 

i.e. Initial bandwidth is 5000bits/sec
then to 0 bits/sec
and back to 5000bits/sec

However, I am having several different problems

Problem 1:
Setting a very low bandwidth tbf - if the rate is less than my ethernet MTU 
size then packets appear to just get thrown away

Problem 2:
Preventing packets being sent instantaneously then arrive at the tbf (because 
sufficient tokens are available in the bucket?) I have tried to set the burst 
and minburst parameters but packets still appear to be transmitted too soon 
(e.g. a 5000bit packet should be delayed for 1 second on a 5000bit link)

Problem 3:
Is it possible to stop the flow of data when the simulated link is unavailable 
- whilst still keeping a queue of packets


The tc command line I am using is
tc qdisc add dev eth0 root tbf rate 5kbit burst 0.01kbit limit 50kbit peakrate 
5kbit minburst 500

and to simulate a temporary link loss I use
tc qdisc change dev eth0 root tbf rate 0.001kbit burst 0.01kbit limit 50kbit 
peakrate 5kbit minburst 500 


Any help would be much appreciated.  
-- 
Nick Howden -  Senior IT Analyst
QinetiQ Trusted Information Management
Woodward Building, Room B009
Malvern Technology Park, WR14 3PS
Telephone 01684 895566, Fax 896660

The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution, 
or any action taken or omitted to be taken in reliance on such information is
prohibited and may be unlawful

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

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

* Re: [LARTC] Using Token Bucket Filter to simulate a low bandwidth
  2004-07-01  9:54 [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link Nick Howden
@ 2004-07-01 10:54 ` Ed Wildgoose
  2004-07-01 11:08 ` Catalin BOIE
  2004-07-01 11:26 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio hclfm
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Wildgoose @ 2004-07-01 10:54 UTC (permalink / raw)
  To: lartc

Nick Howden wrote:

>Hello, 
>
>I am attempting to use the LARTC traffic control to simulate a radio link that 
>has variable bandwidth and availability. The basic bandwidth could be as low 
>as 500 bits/sec but will generally be about 4000 bits/sec. If the simulated 
>radio link is unavailable (zero bandwidth) then packets should be queued 
>until a link is re-established. 
>  
>

Yeah, I think you are going to find it hard to simulate equivalent 
latency as well?

I seem to remember a kernel module for slowing down a link for testing?  
Can't remember the details, but I saw it in my 2.6 kernel somewhere.  
Perhaps check the docs on that.

For my own custom apps I simulated a satellite link simply by writing a 
small proxy program for my particular protocol (in perl and again in 
VB).  It queued packets and released them after a set time period at a 
set rate.  If you are only testing a simple app then this is another way 
to go

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

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

* Re: [LARTC] Using Token Bucket Filter to simulate a low bandwidth
  2004-07-01  9:54 [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link Nick Howden
  2004-07-01 10:54 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth Ed Wildgoose
@ 2004-07-01 11:08 ` Catalin BOIE
  2004-07-01 11:26 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio hclfm
  2 siblings, 0 replies; 4+ messages in thread
From: Catalin BOIE @ 2004-07-01 11:08 UTC (permalink / raw)
  To: lartc

> I seem to remember a kernel module for slowing down a link for testing? 
> Can't remember the details, but I saw it in my 2.6 kernel somewhere.  Perhaps 
> check the docs on that.

Yes, it's Stephen's sch_delay. Both 2.4 and 2.6 versions available.
Just run the 2.4.26 or 2.6.7 and last version of iproute2.
Then: tc qdisc add dev eth0 root delay limit 100000 latency 3000ms

> For my own custom apps I simulated a satellite link simply by writing a small 
> proxy program for my particular protocol (in perl and again in VB).  It 
> queued packets and released them after a set time period at a set rate.  If 
> you are only testing a simple app then this is another way to go
>
> Ed W
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio
  2004-07-01  9:54 [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link Nick Howden
  2004-07-01 10:54 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth Ed Wildgoose
  2004-07-01 11:08 ` Catalin BOIE
@ 2004-07-01 11:26 ` hclfm
  2 siblings, 0 replies; 4+ messages in thread
From: hclfm @ 2004-07-01 11:26 UTC (permalink / raw)
  To: lartc

<P><BR></P><P><FONT FACE="Monospace,Courier">!!Hello,<BR></FONT><BR><FONT FACE="Monospace,Courier">!!I am attempting to use the LARTC traffic control to simulate a radio link that<BR>!!has variable bandwidth and availability. The basic bandwidth could be as low<BR>!!as 500 bits/sec but will generally be about 4000 bits/sec. If the simulated<BR>!!radio link is unavailable (zero bandwidth) then packets should be queued<BR>!!until a link is re-established.<BR></FONT><BR><FONT FACE="Monospace,Courier">!!i.e. Initial bandwidth is 5000bits/sec<BR>!!then to 0 bits/sec<BR>!!and back to 5000bits/sec<BR></FONT><BR><FONT FACE="Monospace,Courier">!!However, I am having several different problems<BR></FONT><BR><FONT FACE="Monospace,Courier">!!Problem 1:<BR>!!Setting a very low bandwidth tbf - if the rate is less than my ethernet MTU<BR>!!size then packets appear to just get thrown away<BR></FONT></P><P>Hi ,</P><P>the module for simulating delay is sch_delay .</P><P>tc qdisc add dev eth0 root delay latency 300ms rate 100mbit</P><P>regards,</P><P>U.SivaKumar,</P><P>HCL Infosystems Limited.</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P></P>_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2004-07-01 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-01  9:54 [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link Nick Howden
2004-07-01 10:54 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth Ed Wildgoose
2004-07-01 11:08 ` Catalin BOIE
2004-07-01 11:26 ` [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio hclfm

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.