throughput is low in WiFi infrastructure network

94 views
Skip to first unread message

Doaa Terri

unread,
Aug 3, 2015, 8:24:04 AM8/3/15
to ns-3-users
Hi all;

I am simulating a WiFi network with infrastructure mode (4 stations and 1 Ap). The 4 stations are saturating the network. I used 11 Mbps IEEE 802.11b. I used an on/off app with data rate of 2.4 Mbps for each node. 
I calculated the throughput and found it lower than it should be. I searched about this issue and found that it might happen due to collisions or packet loss due to congestion. I tried to solve the problem of collisions by enabling the RTS/CTS frames. However, this did not solve the problem. The problem might be occurred due to the congestion. I tried to search here in the list on how to solve the congestion problem but was not able to find something that can help me. Can someone tell me how to solve this problem please? I have attached the code.
wifi.txt

Sebastien Deronne

unread,
Aug 3, 2015, 8:36:22 AM8/3/15
to ns-3-users
I think you need to learn first how Wi-Fi works...

You have several stations => yes you should have congestion! Wi-Fi is based on CSMA/CA, where CA stands for Collision AVOIDANCE, this does not mean you won't have any collisions at all. Please refer to the standard to know how 802.11 works.
RTS/CTS => may improve performance in hidden node scenarios. Once again, refer to the standard and/or books.

Doaa Terri

unread,
Aug 3, 2015, 8:41:49 AM8/3/15
to ns-3-users
Thank you Sebastien for your replay!

I have already read about the WiFi and the IEEE 802.11b standards before doing the simulation. So could you please tell me what I misunderstood.Or what part exactly I should re-study in order to gain more understanding. 

Sebastien Deronne

unread,
Aug 3, 2015, 9:04:50 AM8/3/15
to ns-3-users

As I said you misunderstood how CSMA/CA works.

Why do you think you won't have collision in your case?
Collision avoidance is ensured by choosing a random number is the contention window. But two or more stations can choose the same number, resulting in a collision.

Doaa Terri

unread,
Aug 3, 2015, 9:19:21 AM8/3/15
to ns-3-...@googlegroups.com
Thank you Sebastien for your reply!

Yes, what you have pointed is absolutely correct, but the station should sense the channel before sending (unless there is a station that are hidden )
So how can I avoid the collisions and improve the throughput. 

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lJ7uewOJDSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Doaa Terri

unread,
Aug 3, 2015, 9:27:05 AM8/3/15
to ns-3-...@googlegroups.com
I have one more question if you don't mind
how can I debug such a problem ? if I want to monitor the packets in order to check the number of dropped packets, how can i do this ? 
I cant use the flow-monitor because it monitor the packet on the IP level. 

Doaa Terri

unread,
Aug 3, 2015, 9:28:00 AM8/3/15
to ns-3-users
I have one more question if you don't mind
how can I debug such a problem ? if I want to monitor the packets in order to check the number of dropped packets, how can i do this ? 
I cant use the flow-monitor because it monitor the packet on the IP level. 



On Monday, August 3, 2015 at 5:19:21 PM UTC+4, Doaa Terri wrote:
Thank you Sebastien for your reply!

Yes, what you have pointed is absolutely correct, but the station should sense the channel before sending (unless there is a station that are hidden )
So how can I avoid the collisions and improve the throughput. 
On Mon, Aug 3, 2015 at 5:04 PM, Sebastien Deronne <sebastie...@gmail.com> wrote:

As I said you misunderstood how CSMA/CA works.

Why do you think you won't have collision in your case?
Collision avoidance is ensured by choosing a random number is the contention window. But two or more stations can choose the same number, resulting in a collision.

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lJ7uewOJDSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Sebastien Deronne

unread,
Aug 3, 2015, 10:01:34 AM8/3/15
to ns-3-users
Yes it senses the medium at the start of each slot, so if at that point of time the channel is still sensed idle, the transmission starts, even though another transmission had started at the exact same time but with propagation delay you wont see it directly. So there is no problem, it is the expected behavior. This is all well explained in books, please refer to them, I have unfortunately no time to teach how this works here.

Doaa Terri

unread,
Aug 3, 2015, 11:03:21 AM8/3/15
to ns-3-...@googlegroups.com
Thanks a lot Sebastien for the clarification! I will read a book as you suggested to gain more knowledge about CSMA/CA
But as you mentioned that this is an expected behavior, so shall I accept the results I 've obtained or shall I investigate in order to solve this problem. shall I go for the congestion factor? 

Regards 

On Mon, Aug 3, 2015 at 6:01 PM, Sebastien Deronne <sebastie...@gmail.com> wrote:
Yes it senses the medium at the start of each slot, so if at that point of time the channel is still sensed idle, the transmission starts, even though another transmission had started at the exact same time but with propagation delay you wont see it directly. So there is no problem, it is the expected behavior. This is all well explained in books, please refer to them, I have unfortunately no time to teach how this works here.

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lJ7uewOJDSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Doaa Terri

unread,
Aug 4, 2015, 7:54:00 AM8/4/15
to ns-3-users
Hi Sebastian 

I tried to do the simulation for 1 station and 1 AP , in order to detect the problem. However I also received low throughput for the station. i am suspecting that there is some setup missing for the application 
I used an on/off app (as I want to generate a CBR traffic) and install it on the station. i also install a packet sink on the ap. here is below what I have done. Could you please advise.

OnOffHelper onoff("ns3::UdpSocketFactory",InetSocketAddress(ApInterface.GetAddress (0), port));
onoff.SetAttribute ("OnTime",  StringValue("ns3::ConstantRandomVariable[Constant=1]"));
onoff.SetAttribute ("OffTime",  StringValue("ns3::ConstantRandomVariable[Constant=0]"));
onoff.SetAttribute("DataRate", StringValue("11Mbps"));
onoff.SetAttribute("PacketSize", StringValue("2000"));
ApplicationContainer apps = onoff.Install(wifiStaNodes.Get(0));

apps.Start(Seconds((2.0)));
apps.Stop(Seconds(150.0));

// create an application (the packet sink application)

PacketSinkHelper sink ("ns3::UdpSocketFactory",InetSocketAddress (Ipv4Address::GetAny (), 4500));
  ApplicationContainer sinkApp = sink.Install (ap.Get (0));
  sinkApp.Start (Seconds (1.0));
sinkApp.Stop (Seconds (160.0));





On Monday, August 3, 2015 at 7:03:21 PM UTC+4, Doaa Terri wrote:
Thanks a lot Sebastien for the clarification! I will read a book as you suggested to gain more knowledge about CSMA/CA
But as you mentioned that this is an expected behavior, so shall I accept the results I 've obtained or shall I investigate in order to solve this problem. shall I go for the congestion factor? 

Regards 
On Mon, Aug 3, 2015 at 6:01 PM, Sebastien Deronne <sebastie...@gmail.com> wrote:
Yes it senses the medium at the start of each slot, so if at that point of time the channel is still sensed idle, the transmission starts, even though another transmission had started at the exact same time but with propagation delay you wont see it directly. So there is no problem, it is the expected behavior. This is all well explained in books, please refer to them, I have unfortunately no time to teach how this works here.

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/lJ7uewOJDSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Matteo Danieletto

unread,
Aug 4, 2015, 2:10:13 PM8/4/15
to ns-3-users
Hi Doaa,
Which the throughput you found?
Which is the distance between nodes and access point?


Matteo
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Doaa Terri

unread,
Aug 4, 2015, 4:53:45 PM8/4/15
to ns-3-...@googlegroups.com
Hi Matteo
this is a sample of what I get. All the values are around 0.1. What o you mean by the distance between the node and the AP? do you mean the transmission range? you can refere to the script attached above
0.1 0
1.1 0
2.1 0.000448
3.1 0.080192
4.1 0.100352
5.1 0.090496
6.1 0.097664
7.1 0.09856
8.1 0.095424
9.1 0.102592
10.1 0.097216
11.1 0.09856
12.1 0.107968
13.1 0.094528
14.1 0.108864
15.1 0.098112
16.1 0.095872
17.1 0.096768
18.1 0.09856
19.1 0.099904
20.1 0.106176
21.1 0.103936
22.1 0.101248
23.1 0.102592
24.1 0.102592
25.1 0.101248
26.1 0.10304
27.1 0.097216
28.1 0.10528
29.1 0.1008
30.1 0.10304


Reply all
Reply to author
Forward
0 new messages