maximum capacity of simulated WiFi 802.11n network

536 views
Skip to first unread message

Sourav Chakraborty

unread,
Aug 19, 2017, 6:34:48 AM8/19/17
to ns-3-users

Hi All,
I have simulated a WiFi network with the following configuration --
 
  YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
  phy.SetChannel (channel.Create ());
  //phy.Set ("ChannelNumber", UintegerValue(48));
 
  WifiHelper wifi;
  wifi.SetStandard(WIFI_PHY_STANDARD_80211n_2_4GHZ);
  wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
  // disable RTS/CTS.
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("99999999"));
 
  // disable fragmentation
  //Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2222200"));
 
 
  QosWifiMacHelper mac = QosWifiMacHelper::Default ();
  //NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();
  //WifiMacHelper mac;
  Ssid ssid = Ssid ("ns-3-ssid");
  mac.SetType ("ns3::StaWifiMac",
               "Ssid", SsidValue (ssid),
           "QosSupported", BooleanValue (true)
          );
 
  NetDeviceContainer staDevices;
  staDevices = wifi.Install (phy, mac, wifiStaNodes);
 
  mac.SetType ("ns3::ApWifiMac",
               "Ssid", SsidValue (ssid),
           "QosSupported", BooleanValue (true),
           "BeaconGeneration", BooleanValue (true)
          );

How do I get the aggregate  maximum capacity of this 802.11n network that is simulated?
Is it possible to get per STA capacity(maximum) and if so how?

Regards,
Sourav

Sampath

unread,
Aug 19, 2017, 7:23:41 PM8/19/17
to ns-3-users
Hi Sourav,

Did you try the flow monitor?

Regards,
Sampath

Sourav Chakraborty

unread,
Aug 20, 2017, 8:01:07 PM8/20/17
to ns-3-users
I use flow monitor to get statistics of flows at discrete intervals of time.....But I want to get the capacity of the simulated 802.11n network. Suppose I simulate 1Mbps flows one by one into the network. Then after how many flows will the network reach saturation(or when queues start to overflow and packet loss starts increasing? That is what I mean by capacity of the network. It should be possible to theoretically calculate such capacity based on the simulation parameters. Can you please show me how to calculate that?

Sampath

unread,
Aug 21, 2017, 7:36:11 PM8/21/17
to ns-3-users
Hi Sourav,

It depends on few things. Physical layer data rate, no of users, collisions, packet size, aggregation, etc. Ideally if you have a 11 Mbps data rate, you should be able to fit eleven 1 Mbps users. But in reality the collisions will degrade the channel capacity. 
ht-wifi-network.cc example in the NS3 examples might solve your problem. It simulates all the physical layer data rates (MCS) and calculate achievable throughput. If you need a theoretical proof, you can refer to some literature like Bianchi's model.

Sampath

Rediet

unread,
Aug 31, 2017, 2:39:10 AM8/31/17
to ns-3-users
Also add the following to Sampath's long list: MAC level overhead (DIFS/AIFS, SIFS, BO, MAC header and FCS, etc). PHY level data rates are only applicable on PSDUs...

Sourav Chakraborty

unread,
Sep 1, 2017, 7:23:29 AM9/1/17
to ns-3-users
In order to reach such limiting conditions in the 802.11n 2.4GHZ network under investigation, I add 1 Mbps flows with 1300 bytes UDP packet size, every second.

The four EDCA access categories are implemented as DropTail queues in the AP, which are basic first-in-first-out (FIFO) queues that performs a tail drop when a queue is full. The default value used is 100 packets.
The plots are attached.

I am not able to explain why after 50 seconds, the networks seems to have reached saturation. Is it because of increased collisions or queues becoming full? Can you please help me in explaining this.

Regards,
Sourav
AveragePacketLoss_mod.png
AverageThroughput_mod.png

Sourav Chakraborty

unread,
Sep 1, 2017, 7:25:15 AM9/1/17
to ns-3-users

Attaching Average Delay plot as well.
AverageDelay_mod.png

Sourav Chakraborty

unread,
Sep 1, 2017, 7:50:39 PM9/1/17
to ns-3-users

Attaching my simple script for this as well
onlyWifi.cc

Sampath

unread,
Sep 2, 2017, 7:15:55 PM9/2/17
to ns-3-users
Hi,

You have used idealwifimanager, which will adjust the physical rate according to channel condition. Even though you send data at 1 Mbps from onoffapplication. You may try constantratemanager, which will use a constant physical rate.
Further you can use flow monitor to check the reason for packet drop. It give a drop reason code.

Cheers,
Sampath

Sourav Chakraborty

unread,
Sep 3, 2017, 2:21:09 AM9/3/17
to ns-3-users
Hi Sampath,
Thanks for your response...please keep this conversation going as I need your help

Firstly,

FlowMonitor can only capture packets at Network level. Hence packet losses at MAC/PHY due to congestion etc, will not be obtained by FlowMonitor.
So even if I use IdealWifiManager, should I be able to specifically say what is collision level and congestion etc that is causing packet losses and justify the saturation of network at around 50 s?

Next,
I am trying to use ConstantRateWifiManager as you mentioned for 802.11n using ns-3.26, thus --


  YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
  phy.SetChannel (channel.Create ());
  //phy.Set ("ChannelNumber", UintegerValue(48));

  WifiHelper wifi;
  wifi.SetStandard(WIFI_PHY_STANDARD_80211n_2_4GHZ);
  //std::string phyMode ("OfdmRate135MbpsBW40MHz");
  //wifi.SetStandard(WIFI_PHY_STANDARD_80211g);
  //wifi.SetRemoteStationManager ("ns3::IdealWifiManager");
  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", StringValue ("OfdmRate54Mbps"));


  // disable RTS/CTS.
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("99999999"));

  // disable fragmentation
  //Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2222200"));


  NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();



But am getting errror as below......

:
msg="Can't find response rate for OfdmRate54Mbps", file=../src/wifi/model/wifi-remote-station-manager.cc, line=1273
terminate called without an active exception
Command ['/home/sourav/Desktop/research/ns-allinone-3.26/ns-3.26/build/scratch/onlyWifi_ConstantRate', '--numberOfNodes=100'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

Can you suggest how to rectify this?
REgards,
Sourav

Sampath

unread,
Sep 4, 2017, 7:10:10 PM9/4/17
to ns-3-users
Hi,

You can use Trace Sources to track packet losses in MAC and PHY layers. MacRx, PhyTx, so and so. 
You cannot get 'OfdmRate54Mbps' at 2.4 GHz. You can use ErpOfdmRate54Mbps
Please refer the following lines in wifi-phy.cc


991 {
992  NS_LOG_FUNCTION (this);
993  if (Is2_4Ghz (GetFrequency ()))
994  {
995  Configure80211b ();
996  Configure80211g ();
997  }
998  if (Is5Ghz (GetFrequency ()))
999  {
1000  Configure80211a ();
1001  }

 I suggest you carefully implement the wifi and refer to Trace Sources in MAC and PHY layers. 

Cheers 
Sampath

Rediet

unread,
Sep 5, 2017, 3:03:42 AM9/5/17
to ns-3-users
Hello,

Your STAs are 50m from the AP, the rate control algo will thus stabilize around a certain data rate (you'll have to check which one); this will give you the max PHY layer data rate. Your total application rate should be below this rate considering overhead of PLCP, MAC and layers above.
On the other hand, after 50s, you're having 50 Mbps. Maybe your PHY layer cannot support such a rate...

Rediet
Reply all
Reply to author
Forward
0 new messages