[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About cbr, udp and bandwidth calculation
Hi
What does mean interval in Application/Traffic/CBR
It may be the time between the start of emission of two succesive
packets, or it may be the time between the end emission of a packet and
the begining of emission of the following one.
I have a link bw=10Mb/s
and a CBR packet-length=500bytes , interval=0.005
lets compute the data flow of CBR source
1st case : 200 packets/s -> 500 x 200 byte/s -> 0.8 Mb/s
2nd case : t = time to emit one packet
t = (500 x 8)/1Mb/s = 4ms
T = emission period = 9ms -> 111 packets/s
same calcul as 1st -> 0.44 Mb/s
conclusion flow is superior to 0.44Mb/s but it is not what i can see in
ns simulation.
I put a script as joined document, it is a simulation with three nodes
in line: 0 <-> 1 <-> 2. (0,1) = 1Mb/s
A cbr source in node 0 with output in a udp agent, a sink in node 2.
The problem is that I calculate a flow greater than 0.44Mb/s, and
there is a queue in node 1 with a bw smaller than 0.34Mb/s in link (1,2)
try my script, it is very small and easy to understand
Can someone tell me where i am wrong or if there is a bug in ns.
Thanks.
cbr_udp.tcl