Explanations of Data Rate, Available Bandwidth, Throughput and Delay

185 views
Skip to first unread message

Hassam Mughal

unread,
May 28, 2020, 7:32:55 AM5/28/20
to ns-3-users
Greetings Everyone.

I am trying to calculate data transfer time between mobile devices, by calculating the available bandwidth. I use the current data rate of WifiTxVector and divide it by 2, to consider as available bandwidth. But I am not confirmed that whether that data rate is just the data rate of the wireless channel or is it based on the current communication. In my case, I am using manet-routing-compare.cc class. The TX and RX trace sources are triggered on every packet being sent and received respectively. And in those trace source methods, I am accessing the data rate values from the WifiTxVector.
As per my simulation results, the values that I get are regardless of the amount of data being transmitted or not. So, if this one just tells the channel data rate, then how can I find the current data rate on a particular wifi interface?

I will highly appreciate, if someone can explain the Data Rate, Available Bandwidth, Throughput and Delay according to NS-3.

Thanks in advance.

Monika Prakash

unread,
May 28, 2020, 7:39:36 AM5/28/20
to ns-3-...@googlegroups.com
Hi Hassam, 

Please enable pcap traces on the interfaces. Then you can easily view the data rate of any particular interface from the captured pcap using wireshark. 

Thanks

Monika
Research Associate
UAE University

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/7547e965-580d-4255-ab08-6a91615332db%40googlegroups.com.

Hassam Mughal

unread,
May 28, 2020, 7:46:55 AM5/28/20
to ns-3-users
Hello Monika,
Thanks for your prompt response. The PCAP Traces are already enabled. However, instead of looking for the data rate in PCAP using Wireshark, I want to print them as my simulation ends in a CSV file, as I am doing it already.
UAE University

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.

Tom Henderson

unread,
May 28, 2020, 10:08:41 AM5/28/20
to ns-3-...@googlegroups.com, Hassam Mughal
The terms that you are capitalizing above are contextual and there is no
official definition for them that holds across all of ns-3 in all
contexts, or networking in general.

Roughly speaking, the Wi-Fi data rate is the rate that is used to
compute the transmission delay of a Wi-Fi frame, as data is serialized
for a transmission path. It is selected by the rate control algorithm
or set to a constant if the constant rate manager is used. As you
mention, it is independent of whether you send data or how much you try
to send. Throughput can be defined as the amount of data actually sent
over time, and can be measured by observing the trace sources.
Available bandwidth is not a term used very much in the ns-3 models, but
I think you can consider it to be the maximum achievable throughput.
Delay at the channel level usually has two components, a propagation
delay based on speed of light, and a transmission delay based on the
data rate. Delay may also occur in other parts of the models, such as a
delay to encode or decode data for transmission.

- Tom

Hassam Mughal

unread,
May 28, 2020, 10:31:44 AM5/28/20
to ns-3-users
A bundle of thanks Dr. Tom, for the brief explanations about each term.
So, if I want to calculate the available bandwidth at each wireless interface, of each node, then should I do it like this:
Initially, get the Channel Capacity of each wireless interface. As in my case, I am considering two wifi interfaces. 1st Interface uses standard IEEE 802.11b with ConstantRateWifiManager, DataMode and Control Modes: DsssRate11Mbps. Whereas the other interface uses IEEE 802.11n_5Ghz standard, with MinstrelHtWifiManager, NonUniCastMode and ErpOfdmRate36Mbps.
After that, I should get the previous interval's throughput value of each wireless interface on each node. Once I have these values, then I should subtract the throughput from channel capacity. So will that be my available bandwidth? Or do I need to consider more? I need to calculate available bandwidth every time a node is transmitting a packet.

Thanks
Best Regards,
Hassam

Tom Henderson

unread,
May 28, 2020, 11:50:07 AM5/28/20
to Hassam Mughal, ns-3-users
On 5/28/20 7:14 AM, Hassam Mughal wrote:
> Hello Dr. Tom,
>
> A bundle of thanks for your explanation. So, what would be the best way
> to calculate the available bandwidth at each node before transmitting a
> packet? What I think is if I use the total channel capacity and the
> previous interval throughput value, and based on that calculate the
> available bandwidth. Or, is there some other proper way, that will
> provide me with the exactly available bandwidth on each wireless
> interface. In my simulation, I am using two wifi interfaces, one with
> IEEE 802.11b, DsssRate11Mbps and ConstantRateWifiManager with Data Mode.
> While on the other Wifi Interface, I am using IEEE 802.11n_5GHZ with
> ErpOfdmRate36Mbps and MinstrelHtWifiManager with NonUnicastMode.

Please keep in mind that Wi-Fi is a shared channel, so if you talk about
available bandwidth or total channel capacity in this context, it is
more complicated. The available bandwidth that you have at any given
time depends on who you are sending to, and who else in your radio range
is also sending at the same time. Also, channel capacity is an
information theory concept and not something typically related to
simulation.

In short, I do not think you can just use a term like 'available
bandwidth' without explaining exactly what you mean by it in your
context. Rather than try to come up with definitions on the mailing
list, I suggest instead that you survey the literature and see how
others have used these terms, and adapt one or more of the definitions
to align with your scenario.

For instance, if you go to https://scholar.google.com and search for
'wifi available bandwidth', you will find many papers that use the term,
and other terminology can be similarly searched.

- Tom
Reply all
Reply to author
Forward
0 new messages