Issue when trying to analyze the saturation throughput of IEEE 802.11e EDCA

112 views
Skip to first unread message

Sai Kiran Malyala

unread,
Mar 27, 2018, 8:38:34 AM3/27/18
to ns-3-users
Hi all,

I am trying to analyze the saturation (maintain at least one packet in the mac queue) throughput of IEEE 802.11e EDCA. For the same I considered a network of 40 nodes (STAs). For every node, I am using 4 OnOffApplications for generating saturation traffic for the four different queues (AC_BE (112-0x70), AC_BK (40-0x28), AC_VI (184-0xB8), AC_VO (192-0xC0)). The code for the same is shown below, where staDevicesCont indicate the STA devices.

     std::vector<uint8_t> tosValues = {0x70, 0x28, 0xB8, 0xC0};
     
for (uint32_t i = 0; i < nNodes; i++)
     
{
       uint16_t portNumber
= 4000;
       uint32_t j
= (i + 1) % nNodes;
       
for (uint8_t tosValue : tosValues)
       
{
         
auto ipv4 = staDevicesCont.Get (j)->GetObject<Ipv4> ();
         
const auto address = ipv4->GetAddress (1, 0).GetLocal ();
         std
::cout<<"Address: "<<address<<std::endl;
         
InetSocketAddress sinkSocket (address, portNumber++);
         sinkSocket
.SetTos (tosValue);
         
OnOffHelper onOffHelper ("ns3::UdpSocketFactory", sinkSocket);
         onOffHelper
.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1000]"));
         onOffHelper
.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
         onOffHelper
.SetAttribute ("DataRate", DataRateValue (3000000));
         onOffHelper
.SetAttribute ("PacketSize", UintegerValue (pktSize)); //bytes
         sourceApps
.Add (onOffHelper.Install (staDevicesCont.Get (i)));
         
PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", sinkSocket);
         sinkApps
.Add (packetSinkHelper.Install (staDevicesCont.Get (j)));
       
}
       printDevMacParams
(staNetDevices, i);
     
}

Also, I am using IEEE 802.11b PHY with DSSS 1Mbps data rate. When analyzing the queue sizes, I found that some of the nodes are not generating any packets throughout the simulation. Below is the trace used for checking if all nodes are generating the packets

Config::Connect("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/VO_EdcaTxopN/Queue/Enqueue", MakeCallback(&Experiment::EnqueueCallback, this));

and the callback function used is:


void
 
Experiment::EnqueueCallback (std::string context, ns3::Ptr<ns3::WifiMacQueueItem const> macQueue) {
    std
::cout << "Packet enqueued: "<< macQueue->GetAddress(WifiMacHeader::ADDR2)<< ", Size: "<< macQueue->GetSize()<<std::endl;

 
}


Can some one help me in understanding why few nodes are not at all transmitting and how can i generate saturation traffic for all the VO_EdcaTxopN, VI_EdcaTxopN, BE_EdcaTxopN, BK_EdcaTxopN queues for every node. Kindly let me know if any additional information is needed.


Thank you in advance!!

Rediet

unread,
Apr 9, 2018, 5:58:00 AM4/9/18
to ns-3-users
Hello,

Just a quick remark concerning your code. OnOffApplication starts sending packets after the OnPeriod. Usually it's set within [0.0,1.0] interval. You have set it to 1000 just to be sure, but it ends up delaying the start of your applications.

Rediet
Reply all
Reply to author
Forward
0 new messages