[LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link
Nick Howden
n.howden@eris.qinetiq.com
Thu, 1 Jul 2004 10:54:15 +0100
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