simulating wireless sensor network in ns-3

10,657 views
Skip to first unread message

Balador

unread,
Feb 24, 2012, 6:55:24 AM2/24/12
to ns-3-users
I read Ns-3 and also tracing section several times because tracing
system help me to get out my favorite information from output.
I think now i should start with an example and test the thing that i
have learned.
Now i should start new step and trying to select one of NS-3 examples
and modify it for sensor networks.
At this time we need 5 nodes that one of them is sink and others are
nodes that send information to sink.
Also the nodes are static.

Which exapmle is better for me? or is there any example for wireless
sensor networks in ns-3?

Balador

unread,
Feb 24, 2012, 9:20:32 AM2/24/12
to ns-3-users
one probable answer for my question is
we can define four wireless connections between sink node and other 4
sensor nodes.

is it correct or there are better options?

On Feb 24, 1:52 pm, Balador <bala...@gmail.com> wrote:
> i should change my first question
>
> i want to simulate a scenario with one sink node and 4 nodes that
> these nodes are static and use wireless connections and use 802.11 for
> mac layer.
> then i want to add battery for these nodes.
>
> what should i do?
>
> i read tutorial examples but i want to have just communication between
> the nodes and sink like WSNs. and other characteristics is like
> wireless networks.
>
> which ns-3 example would be a good example for starting?

Konstantinos

unread,
Feb 24, 2012, 9:27:18 AM2/24/12
to ns-3-...@googlegroups.com
Dear Balador,

If you want to simulate a wireless 802.11-based scenario, have a look at the examples under /example/wireless/
The simple-wifi-adhoc.cc or simple-wifi-adhoc-grid.cc should be a good starting point.

Additionally, look a the tutorial to get a better understanding of ns-3 system, not just the tracing.

Regards,
Konstantinos

Chuan Li

unread,
Feb 24, 2012, 9:59:12 AM2/24/12
to ns-3-...@googlegroups.com
Hi Balador,

My understanding is you don't have to define links for every pair of
nodes. As long as you specified the locations, mobility model of these
node, the 802.11 mac layer will do the rest of things for us, like
calculating the distance between a sender and receiver as well as the
transmitting power, receiving power.

Take a look at the two sample source code files that Konstantinos has
given to you, I believe you will have a better understanding of this.

Best,
Chuan

On Fri, 2012-02-24 at 15:31 +0100, ali balador wrote:
> thank you for your reply.
>
> i read whole but i need one node az a sink and connect others to sink.
> i want to know i should define four connections between sink and
> others or the is another way in ns-3?

ali balador

unread,
Feb 24, 2012, 10:12:40 AM2/24/12
to ns-3-...@googlegroups.com
thank you Chuan Li

my problem is that i do not know how should i define a node just as a sink.
i started to tracing those two examples.

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


Chuan Li

unread,
Feb 24, 2012, 10:18:00 AM2/24/12
to ns-3-...@googlegroups.com
Hi, Balador,

I think sink is also a node. You can let the other four nodes send
packets to this sink node (I mean, by specifying the destination address
as the address of the sink node). That's how I think the sink node
should be defined. If it's not correct, do not follow this suggestion.

Regards,
Chuan

> +unsub...@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/ns-3-users?hl=en.
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To post to this group, send email to ns-3-...@googlegroups.com.
> To unsubscribe from this group, send email to ns-3-users

> +unsub...@googlegroups.com.

ali balador

unread,
Feb 24, 2012, 10:19:56 AM2/24/12
to ns-3-...@googlegroups.com
thak you

i will try your suggestion.

To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.

Balador

unread,
Feb 24, 2012, 1:48:42 PM2/24/12
to ns-3-users
i read The simple-wifi-adhoc.cc and simple-wifi-adhoc-grid.cc
in these examples there are only one sink and also one source

for example in simple-wifi-adhoc.cc i wanted to add 3 more nodes as a
source and assign it to sink but the vitalization just show two nodes
again.

this is my code :

/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 The Boeing Company
*
* This program is free software; you can redistribute it and/or
modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
*
*/

//
// This script configures two nodes on an 802.11b physical layer, with
// 802.11b NICs in adhoc mode, and by default, sends one packet of
1000
// (application) bytes to the other node. The physical layer is
configured
// to receive at a fixed RSS (regardless of the distance and transmit
// power); therefore, changing position of the nodes has no effect.
//
// There are a number of command-line options available to control
// the default behavior. The list of available command-line options
// can be listed with the following command:
// ./waf --run "wifi-simple-adhoc --help"
//
// For instance, for this configuration, the physical layer will
// stop successfully receiving packets when rss drops below -97 dBm.
// To see this effect, try running:
//
// ./waf --run "wifi-simple-adhoc --rss=-97 --numPackets=20"
// ./waf --run "wifi-simple-adhoc --rss=-98 --numPackets=20"
// ./waf --run "wifi-simple-adhoc --rss=-99 --numPackets=20"
//
// Note that all ns-3 attributes (not just the ones exposed in the
below
// script) can be changed at command line; see the documentation.
//
// This script can also be helpful to put the Wifi layer into verbose
// logging mode; this command will turn on all wifi logging:
//
// ./waf --run "wifi-simple-adhoc --verbose=1"
//
// When you are done, you will notice two pcap trace files in your
directory.
// If you have tcpdump installed, you can try this:
//
// tcpdump -r wifi-simple-adhoc-0-0.pcap -nn -tt
//

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>

NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;

void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
}

static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic,
socket, pktSize,pktCount-1, pktInterval);
}
else
{
socket->Close ();
}
}


int main (int argc, char *argv[])
{
std::string phyMode ("DsssRate1Mbps");
double rss = -80; // -dBm
uint32_t packetSize = 1000; // bytes
uint32_t numPackets = 100;
double interval = 1.0; // seconds
bool verbose = false;

CommandLine cmd;

cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("rss", "received signal strength", rss);
cmd.AddValue ("packetSize", "size of application packet sent",
packetSize);
cmd.AddValue ("numPackets", "number of packets generated",
numPackets);
cmd.AddValue ("interval", "interval (seconds) between packets",
interval);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components",
verbose);

cmd.Parse (argc, argv);
// Convert to time object
Time interPacketInterval = Seconds (interval);

// disable fragmentation for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue
("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault
("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));

NodeContainer c;
c.Create (5);

// The below set of helpers will help us to put together the wifi
NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents (); // Turn on all Wifi logging
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);

YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// This is one parameter that matters when using FixedRssLossModel
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (0) );
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType
(YansWifiPhyHelper::DLT_IEEE802_11_RADIO);

YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay
("ns3::ConstantSpeedPropagationDelayModel");
// The below FixedRssLossModel will cause the rss to be fixed
regardless
// of the distance between the two stations, and the transmit power
wifiChannel.AddPropagationLoss
("ns3::FixedRssLossModel","Rss",DoubleValue (rss));
wifiPhy.SetChannel (wifiChannel.Create ());

// Add a non-QoS upper mac, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode",StringValue (phyMode),
"ControlMode",StringValue (phyMode));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);

// Note that with FixedRssLossModel, the positions below are not
// used for received signal strength.
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc =
CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);

InternetStackHelper internet;
internet.Install (c);

Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);

TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (c.Get (0), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (),
80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));

Ptr<Socket> source0 = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote0 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source0->SetAllowBroadcast (true);
source0->Connect (remote0);

Ptr<Socket> source1 = Socket::CreateSocket (c.Get (2), tid);
InetSocketAddress remote1 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source1->SetAllowBroadcast (true);
source1->Connect (remote1);

Ptr<Socket> source2 = Socket::CreateSocket (c.Get (3), tid);
InetSocketAddress remote2 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source2->SetAllowBroadcast (true);
source2->Connect (remote2);

Ptr<Socket> source3 = Socket::CreateSocket (c.Get (4), tid);
InetSocketAddress remote3 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source3->SetAllowBroadcast (true);
source3->Connect (remote3);

// Tracing
wifiPhy.EnablePcap ("wifi-simple-adhoc", devices);

// Output what we are doing
NS_LOG_UNCOND ("Testing " << numPackets << " packets sent with
receiver rss " << rss );

Simulator::ScheduleWithContext (source0->GetNode ()->GetId (),
Seconds (1.0), &GenerateTraffic,
source0, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source1->GetNode ()->GetId (),
Seconds (2.0), &GenerateTraffic,
source1, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source2->GetNode ()->GetId (),
Seconds (3.0), &GenerateTraffic,
source2, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source3->GetNode ()->GetId (),
Seconds (4.0), &GenerateTraffic,
source3, packetSize, numPackets,
interPacketInterval);

Simulator::Run ();
Simulator::Destroy ();

return 0;
}


On Feb 24, 4:19 pm, ali balador <bala...@gmail.com> wrote:
> thak you
>
> i will try your suggestion.
>
>
>
>
>
>
>
> On Fri, Feb 24, 2012 at 4:18 PM, Chuan Li <lanf...@gmail.com> wrote:
> > Hi, Balador,
>
> > I think sink is also a node. You can let the other four nodes send
> > packets to this sink node (I mean, by specifying the destination address
> > as the address of the sink node). That's how I think the sink node
> > should be defined. If it's not correct, do not follow this suggestion.
>
> > Regards,
> > Chuan
>
> > On Fri, 2012-02-24 at 16:12 +0100, ali balador wrote:
> > > thank you Chuan Li
>
> > > my problem is that i do not know how should i define a node just as a
> > > sink.
> > > i started to tracing those two examples.
>

Chuan Li

unread,
Feb 24, 2012, 4:22:59 PM2/24/12
to ns-3-...@googlegroups.com
You just let the NodeContainer create 5 node? How about the location of
the other three nodes?

in the your code,
--------------------------------------------------------


positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (5.0, 0.0, 0.0));

--------------------------------------------------------

there are only two sentences of this type. Maybe, you should add three
more to specify coordinations of the other three nodes.

I don't know if that is the reason, but I think it is at least worth
trying.


Chuan

Balador

unread,
Feb 25, 2012, 7:13:37 AM2/25/12
to ns-3-users
Thank you Chuan i missed it.
because of that i could see just two nodes.
but i modified simple-wifi-adhoc-grid.cc and set number of node=5 and
i have 4 source and 1sink.
it compiled very well and i could see output message for sending
packet.
but i am not sure it works as i want or not?

i want 4 source that send their packets to one sink node. but i do not
know how can i recognized sending packet in vvizualaizer because i saw
lots of green arrows and i think it can not a symbol for sending
packet.
this is my code :


NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid");

using namespace ns3;

void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
}

static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic,
socket, pktSize,pktCount-1, pktInterval);
}
else
{
socket->Close ();
}
}


int main (int argc, char *argv[])
{
std::string phyMode ("DsssRate1Mbps");
double distance = 500; // m
uint32_t packetSize = 1000; // bytes
uint32_t numPackets = 1;
uint32_t numNodes = 5; // by default, 5x5
uint32_t sinkNode = 0;
uint32_t sourceNode0 = 1;
uint32_t sourceNode1 = 2;
uint32_t sourceNode2 = 3;
uint32_t sourceNode3 = 4;
double interval = 1.0; // seconds
bool verbose = false;
bool tracing = false;

CommandLine cmd;

cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("distance", "distance (m)", distance);
cmd.AddValue ("packetSize", "size of application packet sent",
packetSize);
cmd.AddValue ("numPackets", "number of packets generated",
numPackets);
cmd.AddValue ("interval", "interval (seconds) between packets",
interval);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components",
verbose);
cmd.AddValue ("tracing", "turn on ascii and pcap tracing", tracing);
cmd.AddValue ("numNodes", "number of nodes", numNodes);
cmd.AddValue ("sinkNode", "Receiver node number", sinkNode);
cmd.AddValue ("sourceNode0", "Sender node number", sourceNode0);
cmd.AddValue ("sourceNode1", "Sender node number", sourceNode1);
cmd.AddValue ("sourceNode2", "Sender node number", sourceNode2);
cmd.AddValue ("sourceNode3", "Sender node number", sourceNode3);

cmd.Parse (argc, argv);
// Convert to time object
Time interPacketInterval = Seconds (interval);

// disable fragmentation for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue
("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault
("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));

NodeContainer c;
c.Create (numNodes);

// The below set of helpers will help us to put together the wifi
NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents (); // Turn on all Wifi logging
}

YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (-10) );
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType
(YansWifiPhyHelper::DLT_IEEE802_11_RADIO);

YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay
("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
wifiPhy.SetChannel (wifiChannel.Create ());

// Add a non-QoS upper mac, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode",StringValue (phyMode),
"ControlMode",StringValue (phyMode));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);

MobilityHelper mobility;
mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (0.0),
"MinY", DoubleValue (0.0),
"DeltaX", DoubleValue (distance),
"DeltaY", DoubleValue (distance),
"GridWidth", UintegerValue (5),
"LayoutType", StringValue
("RowFirst"));
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);

// Enable OLSR
OlsrHelper olsr;
Ipv4StaticRoutingHelper staticRouting;

Ipv4ListRoutingHelper list;
list.Add (staticRouting, 0);
list.Add (olsr, 10);

InternetStackHelper internet;
internet.SetRoutingHelper (list); // has effect on the next Install
()
internet.Install (c);

Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);

TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (c.Get (sinkNode), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (),
80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));

Ptr<Socket> source0 = Socket::CreateSocket (c.Get (sourceNode0),
tid);
InetSocketAddress remote0 = InetSocketAddress (i.GetAddress
(sinkNode, 0), 80);
source0->Connect (remote0);

Ptr<Socket> source1 = Socket::CreateSocket (c.Get (sourceNode1),
tid);
InetSocketAddress remote1 = InetSocketAddress (i.GetAddress
(sinkNode, 0), 80);
source1->Connect (remote1);

Ptr<Socket> source2 = Socket::CreateSocket (c.Get (sourceNode2),
tid);
InetSocketAddress remote2 = InetSocketAddress (i.GetAddress
(sinkNode, 0), 80);
source2->Connect (remote2);

Ptr<Socket> source3 = Socket::CreateSocket (c.Get (sourceNode3),
tid);
InetSocketAddress remote3 = InetSocketAddress (i.GetAddress
(sinkNode, 0), 80);
source3->Connect (remote3);

if (tracing == true)
{
AsciiTraceHelper ascii;
wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("wifi-simple-
adhoc-grid.tr"));
wifiPhy.EnablePcap ("wifi-simple-adhoc-grid", devices);
// Trace routing tables
Ptr<OutputStreamWrapper> routingStream =
Create<OutputStreamWrapper> ("wifi-simple-adhoc-grid.routes",
std::ios::out);
olsr.PrintRoutingTableAllEvery (Seconds (2), routingStream);

// To do-- enable an IP-level trace that shows forwarding events
only
}

// Give OLSR time to converge-- 30 seconds perhaps
Simulator::Schedule (Seconds (10.0), &GenerateTraffic,
source0, packetSize, numPackets,
interPacketInterval);

Simulator::Schedule (Seconds (15.0), &GenerateTraffic,
source1, packetSize, numPackets,
interPacketInterval);

Simulator::Schedule (Seconds (20.0), &GenerateTraffic,
source2, packetSize, numPackets,
interPacketInterval);

Simulator::Schedule (Seconds (25.0), &GenerateTraffic,
source3, packetSize, numPackets,
interPacketInterval);

// Output what we are doing
NS_LOG_UNCOND ("Testing from node " << sourceNode0 << " to " <<
sinkNode << " with grid distance " << distance);

Simulator::Stop (Seconds (32.0));
> ...
>
> read more »

Balador

unread,
Feb 25, 2012, 8:44:09 AM2/25/12
to ns-3-users
when i check the output of this code i found that it is multihop and
broadcast packets because of olsr but i want that the source nodes
send packets directly to sink nodes (single hop). how should i create
a single hop network?
> ...
>
> read more »

Balador

unread,
Feb 25, 2012, 9:54:16 AM2/25/12
to ns-3-users
i correct simple-adhoc example and more nodes but it does not work
now.

please help me about defining different source for a single-hop
scenario.

the code is:

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>

NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;

void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
}

static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
uint32_t pktCount, Time pktInterval )
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic,
socket, pktSize,pktCount-1, pktInterval);
}
else
{
socket->Close ();
}
}


int main (int argc, char *argv[])
{
std::string phyMode ("DsssRate1Mbps");
double rss = -80; // -dBm
uint32_t packetSize = 1000; // bytes
uint32_t numPackets = 1;
double interval = 1.0; // seconds
bool verbose = false;

CommandLine cmd;

cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("rss", "received signal strength", rss);
cmd.AddValue ("packetSize", "size of application packet sent",
packetSize);
cmd.AddValue ("numPackets", "number of packets generated",
numPackets);
cmd.AddValue ("interval", "interval (seconds) between packets",
interval);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components",
verbose);

cmd.Parse (argc, argv);
// Convert to time object
Time interPacketInterval = Seconds (interval);

// disable fragmentation for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue
("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault
("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));

NodeContainer c;
c.Create (5); //my modification

// The below set of helpers will help us to put together the wifi
NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents (); // Turn on all Wifi logging
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);

YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// This is one parameter that matters when using FixedRssLossModel
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (0) );
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType
(YansWifiPhyHelper::DLT_IEEE802_11_RADIO);

YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay
("ns3::ConstantSpeedPropagationDelayModel");
// The below FixedRssLossModel will cause the rss to be fixed
regardless
// of the distance between the two stations, and the transmit power
wifiChannel.AddPropagationLoss
("ns3::FixedRssLossModel","Rss",DoubleValue (rss));
wifiPhy.SetChannel (wifiChannel.Create ());

// Add a non-QoS upper mac, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode",StringValue (phyMode),
"ControlMode",StringValue (phyMode));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);

// Note that with FixedRssLossModel, the positions below are not
// used for received signal strength.
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc =
CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
positionAlloc->Add (Vector (-5.0, 0.0, 0.0)); //my modification
positionAlloc->Add (Vector (0.0, 5.0, 0.0)); //my modification
positionAlloc->Add (Vector (0.0, -5.0, 0.0)); //my modification
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);

InternetStackHelper internet;
internet.Install (c);

Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);

TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (c.Get (0), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (),
80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));

//my modification

Ptr<Socket> source0 = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote0 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source0->SetAllowBroadcast (true);
source0->Connect (remote0);

Ptr<Socket> source1 = Socket::CreateSocket (c.Get (2), tid);
InetSocketAddress remote1 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source1->SetAllowBroadcast (true);
source1->Connect (remote1);

Ptr<Socket> source2 = Socket::CreateSocket (c.Get (3), tid);
InetSocketAddress remote2 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source2->SetAllowBroadcast (true);
source2->Connect (remote2);

Ptr<Socket> source3 = Socket::CreateSocket (c.Get (4), tid);
InetSocketAddress remote3 = InetSocketAddress (Ipv4Address::GetAny
(), 80);
source3->SetAllowBroadcast (true);
source3->Connect (remote3);

// Tracing
wifiPhy.EnablePcap ("simple-adhoc", devices);

// Output what we are doing
NS_LOG_UNCOND ("Testing " << numPackets << " packets sent with
receiver rss " << rss );


//my modification

Simulator::ScheduleWithContext (source0->GetNode ()->GetId (),
Seconds (1.0), &GenerateTraffic,
source0, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source1->GetNode ()->GetId (),
Seconds (2.0), &GenerateTraffic,
source1, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source2->GetNode ()->GetId (),
Seconds (3.0), &GenerateTraffic,
source2, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source3->GetNode ()->GetId (),
Seconds (4.0), &GenerateTraffic,
source3, packetSize, numPackets,
interPacketInterval);

Simulator::Run ();
Simulator::Destroy ();

return 0;
}

> ...
>
> read more »

Li,Chuan

unread,
Feb 25, 2012, 7:59:21 PM2/25/12
to ns-3-...@googlegroups.com
Hi,

When you use the connect method of a socket, can you connect it to the sink? For example,  the variable 'local' in your code? I looked up the 'connect' method in ns-3 API documentation and find this sentence, "Initiate a connection to a remote host."

It feels like you should directly connect to the sink, maybe it will work.

By the way, I am not quite familiar with ns-3 neither, so sorry if I ever gave you any incorrect advice!

Chuan

> ...
>
> read more »

Tommaso Pecorella

unread,
Feb 27, 2012, 5:51:05 PM2/27/12
to ns-3-...@googlegroups.com
Hi,

first things first.

Terminology: you're going to simulate a 5-nodes WiFi network, with 4 nodes sending traffic to a single receiver (the sink). This is a plain wireless network. A wireless SENSOR network would have to use different MAC protocols and, right, now, they are not available.

Topology: you're going to use a star, non multi-hop network with nodes sending traffic just to the sink.

Application: your nodes will use some sort of data-generation to send traffic to the sink. The sink is not generating traffic.

Answers part.

Topology: you must set the node's positions (as already noted) or they'll not communicate. The position is also relevant for the interference between the nodes.

WiFi features: you can either use Ad-Hoc WiFi or "normal" WiFi. For your problem it doesn't matter. For the simulation results it does tho, as if you're trying to really draw numbers from the simulation, then you should consider what's the maximum throughput and packet loss of an Ad-Hoc Vs "normal" WiFi. 

Applications: you have to install some applications in the nodes and one "sink" application in the... sink. **Applications** are responsible for creating the data and "eating" them. You have to choose also if you're going to use UDP or TCP, the node's IP numbers and so on. Miss one part and the network will work most probably. But you'll not understand how it works and why.

Last but not least, the visualizer. What you're seeing are ALL the packets, including ICMP, ARP, etc. You did really believe that packets are sent in network out of the blue and the TCP, UDP and IP layers are doing their job without generating any traffic ? Of course not, you know about the control and signaling traffic. So don't be surprised if you see it in the network. You should be surprised if you'd NOT see it indeed.

Cheers,

T.

Balador

unread,
Feb 28, 2012, 4:46:01 AM2/28/12
to ns-3-users
Hi Tommaso Pecorella, Chuan,

Thank you for your attention and replies.

i modified my code.

Tommaso, i know about the things you said about terminology this is a
plain scenario for wireless sensor networks and i know that this
simulator does not support WSNs right now but i want to check the
throughput of standard mac in this scenario now.
i found that ns-3 files uses multi-hop networks but i changed it i
think and now it works like single hop i past my code here please
check my code please. because i check output files with tcpdump and
also visualizer and found that it works like single-hop.

about generating traffic, i know that i should assign a application
protocol to any node but i just change the ns-3 example and ns-3 uses
GenerateTraffic for generating packet scheduling i did not changed
application layer because it´s not important for me at this step.

yes i found my problem about node allocation. i saw that if we did not
set nodes position we can not get any results. itś obvious.

yes, this declaration " wifiMac.SetType ("ns3::AdhocWifiMac");" set
wifi mode.

your comments about application layer is so useful because i think the
ns-3 tutorial does not use that but it works what should i do for
declaring application because i did not declaring any application
protocol before?
can you explain how should i declare application protocol for sink and
source?

about network visualizer i just see the green arrows not blue and when
i had traced output files i could recognize arp packet and the other
packet that sent after finding mac address and i think that it should
be a data packet.


this is my new code:
positionAlloc->Add (Vector (0.0, 5.0, 0.0));
positionAlloc->Add (Vector (0.0, -5.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);

InternetStackHelper internet;
internet.Install (c);

Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);

TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> recvSink = Socket::CreateSocket (c.Get (0), tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (),
80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));

Ptr<Socket> source0 = Socket::CreateSocket (c.Get (1), tid);
InetSocketAddress remote0 = InetSocketAddress (i.GetAddress (0, 0),
80);
source0->SetAllowBroadcast (false);
source0->Connect (remote0);

Ptr<Socket> source1 = Socket::CreateSocket (c.Get (2), tid);
InetSocketAddress remote1 = InetSocketAddress (i.GetAddress (0, 0),
80);
source1->SetAllowBroadcast (false);
source1->Connect (remote1);

Ptr<Socket> source2 = Socket::CreateSocket (c.Get (3), tid);
InetSocketAddress remote2 = InetSocketAddress (i.GetAddress (0, 0),
80);
source2->SetAllowBroadcast (false);
source2->Connect (remote2);

Ptr<Socket> source3 = Socket::CreateSocket (c.Get (4), tid);
InetSocketAddress remote3 = InetSocketAddress (i.GetAddress (0, 0),
80);
source3->SetAllowBroadcast (false);
source3->Connect (remote3);

// Tracing
wifiPhy.EnablePcap ("simple-adhoc", devices);

// Output what we are doing
NS_LOG_UNCOND ("Testing " << numPackets << " packets sent with
receiver rss " << rss );

Simulator::ScheduleWithContext (source0->GetNode ()->GetId (),
Seconds (1.0), &GenerateTraffic,
source0, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source1->GetNode ()->GetId (),
Seconds (6.0), &GenerateTraffic,
source1, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source2->GetNode ()->GetId (),
Seconds (11.0), &GenerateTraffic,
source2, packetSize, numPackets,
interPacketInterval);

Simulator::ScheduleWithContext (source3->GetNode ()->GetId (),
Seconds (16.0), &GenerateTraffic,
source3, packetSize, numPackets,
interPacketInterval);

Simulator::Run ();
Simulator::Destroy ();

return 0;
}




Tommaso Pecorella

unread,
Feb 28, 2012, 8:11:09 PM2/28/12
to ns-3-...@googlegroups.com
Hi,

your code is working, but it does send just ONE packet:

  uint32_t numPackets = 1; 

well, one for each node excluding the sink, but still just 4 overall.

You want to increase it dramatically, or, better, to change to a proper application.

Fore example, you might try to add this:

  // Create a packet sink on the star "hub" to receive these packets

  uint16_t port = 50000;

  Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));

  PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory", sinkLocalAddress);

  ApplicationContainer sinkApp = sinkHelper.Install (serverNode);

  sinkApp.Start (Seconds (1.0));

  sinkApp.Stop (Seconds (10.0));


  // Create the OnOff applications to send TCP to the server

  OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());

  clientHelper.SetAttribute 

    ("OnTime", RandomVariableValue (ConstantVariable (1)));

  clientHelper.SetAttribute 

    ("OffTime", RandomVariableValue (ConstantVariable (0)));

  //normally wouldn't need a loop here but the server IP address is different

  //on each p2p subnet

  ApplicationContainer clientApps;

  for(uint32_t i=0; i<clientNodes.GetN (); ++i)

    {

      AddressValue remoteAddress

        (InetSocketAddress (interfaceAdjacencyList[i].GetAddress (0), port));

      clientHelper.SetAttribute ("Remote", remoteAddress);

      clientApps.Add (clientHelper.Install (clientNodes.Get (i)));

    }

  clientApps.Start (Seconds (1.0));

  clientApps.Stop (Seconds (10.0));


Check examples/tcp/tcp-star-server for the complete code and use "UdpSocketFactory" instead of "TcpSocketFactory" to use UDP (or leave it as it is for TCP).

You'll want as well to remove the actual code sending packets from your code, as it's just not useful anymore once you have proper applications.

Best regards,

Tommaso


Balador

unread,
Feb 29, 2012, 7:19:08 AM2/29/12
to ns-3-users
Hi

Thank you Tommaso

i modified my code and use examples/tcp/tcp-star-server for assigning
application layer protocols

i can run it but i got a result that i do not know exactly
i saw lots of transmission (zero packet size) from sink to source.


second question : if i change "UdpSocketFactory" instead of
"TcpSocketFactory" to use UDP this example works correctly or i should
modify more?

This is my code :

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cassert>

#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"

NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;

int main (int argc, char *argv[])
{
std::string phyMode ("DsssRate1Mbps");
double rss = -80; // -dBm
bool verbose = false;

// Set up some default values for the simulation.
Config::SetDefault ("ns3::OnOffApplication::PacketSize",
UintegerValue (250));
Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue
("5kb/s"));

CommandLine cmd;

cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("rss", "received signal strength", rss);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components",
verbose);

cmd.Parse (argc, argv);

// disable fragmentation for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
("2200"));
// turn off RTS/CTS for frames below 2200 bytes
Config::SetDefault
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue
("2200"));
// Fix non-unicast data rate to be the same as that of unicast
Config::SetDefault
("ns3::WifiRemoteStationManager::NonUnicastMode",
StringValue (phyMode));

// Here, we will create 5 nodes.
NS_LOG_INFO ("Create nodes.");
NodeContainer serverNode;
NodeContainer clientNodes;
serverNode.Create (1);
clientNodes.Create (4);
NodeContainer allNodes = NodeContainer (serverNode, clientNodes);
allNodes);

// Note that with FixedRssLossModel, the positions below are not
// used for received signal strength.
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc =
CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
positionAlloc->Add (Vector (-5.0, 0.0, 0.0));
positionAlloc->Add (Vector (0.0, 5.0, 0.0));
positionAlloc->Add (Vector (0.0, -5.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (allNodes);

InternetStackHelper internet;
internet.Install (allNodes);

Ipv4AddressHelper ipv4;
NS_LOG_INFO ("Assign IP Addresses.");
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer i = ipv4.Assign (devices);

// Create a packet sink on the star "hub" to receive these packets
uint16_t port = 50000;
Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (),
port));
PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory",
sinkLocalAddress);
ApplicationContainer sinkApp = sinkHelper.Install (serverNode);
sinkApp.Start (Seconds (1.0));
sinkApp.Stop (Seconds (10.0));

// Create the OnOff applications to send TCP to the server
OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ());
clientHelper.SetAttribute ("OnTime", RandomVariableValue
(ConstantVariable (1)));
clientHelper.SetAttribute ("OffTime", RandomVariableValue
(ConstantVariable (0)));

//normally wouldn't need a loop here but the server IP address is
different
//on each p2p subnet
ApplicationContainer clientApps;
for(uint32_t j=0; j<clientNodes.GetN (); ++j)
{
AddressValue remoteAddress (InetSocketAddress (i.GetAddress (0),
port));
clientHelper.SetAttribute ("Remote", remoteAddress);
clientApps.Add (clientHelper.Install (clientNodes.Get (j)));
}
clientApps.Start (Seconds (1.0));
clientApps.Stop (Seconds (10.0));

//configure tracing
AsciiTraceHelper ascii;
wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("tcp-single-
hop.tr"));
wifiPhy.EnablePcapAll ("tcp-single-hop");

Simulator::Run ();
Simulator::Destroy ();

return 0;
}




and this is a part of output of node1


1.000000 1000000us tsft 1.0 Mb/s 2412 MHz 11b ARP, Request who-has
10.1.1.1 (ff:ff:ff:ff:ff:ff) tell 10.1.1.2, length 28
1.001458 1001458us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
1.001468 1001468us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
1.002162 1002162us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [S], seq 0, win 65535, length 0
1.003276 1003276us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
1.004070 1004070us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.2 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
1.004420 1004420us tsft 1.0 Mb/s 2412 MHz 11b ARP, Reply 10.1.1.2 is-
at 00:00:00:00:00:02, length 28
1.005438 1005438us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
1.006288 1006288us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
1.006298 1006298us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
1.007012 1007012us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], ack 1, win 65535, length 0
1.008126 1008126us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
1.400000 1400000us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1:251, ack 1, win 65535, length 250
1.403114 1403114us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
1.403964 1403964us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 251, win
65535, length 0
1.403974 1403974us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
1.800000 1800000us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 251:501, ack 1, win 65535, length 250
1.803114 1803114us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.000000 2000000us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 251:501, ack 1, win 65535, length 250
2.003554 2003554us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
2.003868 2003868us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.004798 2004798us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
2.005112 2005112us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.006382 2006382us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 501, win
65535, length 0
2.006392 2006392us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.007510 2007510us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.3 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
2.008264 2008264us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.3 is-at 00:00:00:00:00:03, length 28
2.008578 2008578us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.008648 2008648us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 251:501, ack 1, win 65535, length 250
2.011762 2011762us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.012952 2012952us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
2.013266 2013266us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.014116 2014116us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
2.014430 2014430us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.015880 2015880us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 501, win
65535, length 0
2.015890 2015890us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.026070 2026070us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1:501, ack 1,
win 65535, length 500
2.026384 2026384us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.027234 2027234us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 501, win
65535, length 0
2.027548 2027548us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.200199 2200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 501:751, ack 1, win 65535, length 250
2.203314 2203314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.206490 2206490us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 501:751, ack
1, win 65535, length 250
2.206804 2206804us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.400199 2400199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 501:751, ack 1, win 65535, length 250
2.403314 2403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.404504 2404504us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 751, win
65535, length 0
2.404514 2404514us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.405808 2405808us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 751, win
65535, length 0
2.405818 2405818us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.409072 2409072us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 501:751, ack
1, win 65535, length 250
2.409386 2409386us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.410656 2410656us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 751, win
65535, length 0
2.410970 2410970us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.411820 2411820us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 751, win
65535, length 0
2.412134 2412134us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.600199 2600199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 751:1001, ack 1, win 65535, length 250
2.603314 2603314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.607010 2607010us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 751:1001, ack
1, win 65535, length 250
2.607324 2607324us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.800199 2800199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 751:1001, ack 1, win 65535, length 250
2.803314 2803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.806690 2806690us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 751:1001, ack
1, win 65535, length 250
2.807004 2807004us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.807934 2807934us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1001, win
65535, length 0
2.807944 2807944us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.809618 2809618us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1001, win
65535, length 0
2.809628 2809628us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.810802 2810802us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1001, win
65535, length 0
2.811116 2811116us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.000704 3000704us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.1 (ff:ff:ff:ff:ff:ff) tell 10.1.1.4,
length 28
3.001458 3001458us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
3.001772 3001772us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.004642 3004642us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1001:1251,
ack 1, win 65535, length 250
3.004956 3004956us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.005826 3005826us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
3.006140 3006140us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.006994 3006994us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.4 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
3.007424 3007424us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1001:1251, ack 1, win 65535, length 250
3.010538 3010538us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.011332 3011332us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.4 is-at 00:00:00:00:00:04, length 28
3.011646 3011646us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.012496 3012496us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
3.012810 3012810us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.013880 3013880us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
3.014194 3014194us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.019372 3019372us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1:537, ack 1,
win 65535, length 536
3.019686 3019686us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.020536 3020536us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 537, win
65535, length 0
3.020850 3020850us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.026208 3026208us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 537:1073, ack
1, win 65535, length 536
3.026522 3026522us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.029156 3029156us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1073:1251,
ack 1, win 65535, length 178
3.029470 3029470us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.030320 3030320us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1251, win
65535, length 0
3.030634 3030634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.200199 3200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1001:1251, ack 1, win 65535, length 250
3.203314 3203314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.204164 3204164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1251, win
65535, length 0
3.204174 3204174us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
3.205628 3205628us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1251, win
65535, length 0
3.205942 3205942us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.400199 3400199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1251:1501, ack 1, win 65535, length 250
3.403314 3403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.407230 3407230us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.407544 3407544us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.410594 3410594us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.410908 3410908us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.603000 3603000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.603314 3603314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.604344 3604344us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1501, win
65535, length 0
3.604354 3604354us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
3.608068 3608068us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.608382 3608382us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.609252 3609252us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1501, win
65535, length 0
3.609566 3609566us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.610856 3610856us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1501, win
65535, length 0
3.611170 3611170us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.612320 3612320us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1501, win
65535, length 0
3.612634 3612634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.800199 3800199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1501:1751, ack 1, win 65535, length 250
3.803314 3803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.806250 3806250us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
3.806564 3806564us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.810314 3810314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
3.810628 3810628us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.000704 4000704us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.1 (ff:ff:ff:ff:ff:ff) tell 10.1.1.5,
length 28
4.001458 4001458us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
4.001772 4001772us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.002642 4002642us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
4.002956 4002956us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -87dB noise
Acknowledgment RA:00:00:00:00:00:05
4.005656 4005656us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.5 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
4.006566 4006566us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1751, win
65535, length 0
4.006576 4006576us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.006950 4006950us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1501:1751, ack 1, win 65535, length 250
4.010064 4010064us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.010994 4010994us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
4.011308 4011308us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.012142 4012142us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.5 is-at 00:00:00:00:00:05, length 28
4.012456 4012456us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.013510 4013510us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.5 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
4.014264 4014264us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.5 is-at 00:00:00:00:00:05, length 28
4.014578 4014578us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.015788 4015788us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1751, win
65535, length 0
4.016102 4016102us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.019232 4019232us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
4.019546 4019546us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.020596 4020596us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1751, win
65535, length 0
4.020606 4020606us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.022120 4022120us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1751, win
65535, length 0
4.022434 4022434us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.023604 4023604us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
4.023918 4023918us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.024768 4024768us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
4.025082 4025082us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.026032 4026032us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
4.026346 4026346us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.027396 4027396us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1751, win
65535, length 0
4.027710 4027710us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.032948 4032948us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1:537, ack 1,
win 65535, length 536
4.033262 4033262us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.034552 4034552us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 537, win
65535, length 0
4.034866 4034866us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.040104 4040104us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 537:1073, ack
1, win 65535, length 536
4.040418 4040418us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.045736 4045736us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1073:1609,
ack 1, win 65535, length 536
4.046050 4046050us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.046900 4046900us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 1609, win
65535, length 0
4.047214 4047214us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.049380 4049380us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1609:1751,
ack 1, win 65535, length 142
4.049694 4049694us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.200199 4200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1751:2001, ack 1, win 65535, length 250
4.203609 4203609us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1751:2001, ack 1, win 65535, length 250
4.206724 4206724us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.209634 4209634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.209948 4209948us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.213258 4213258us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.213572 4213572us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.214422 4214422us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 2001, win
65535, length 0
4.214736 4214736us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.217606 4217606us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.217920 4217920us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.403000 4403000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.403314 4403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.404164 4404164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 2001, win
65535, length 0
4.404478 4404478us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.407210 4407210us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 2001, win
65535, length 0
4.407220 4407220us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.410434 4410434us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 2001, win
65535, length 0
4.410748 4410748us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.600199 4600199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.606290 4606290us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.606604 4606604us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.609654 4609654us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.609968 4609968us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.613378 4613378us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.613692 4613692us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.613962 4613962us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.617076 4617076us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.803000 4803000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.803314 4803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.804164 4804164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 2251, win
65535, length 0
4.804478 4804478us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.805128 4805128us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.808242 4808242us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.809432 4809432us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 2251, win
65535, length 0
4.809746 4809746us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.810816 4810816us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 2251, win
65535, length 0
4.810826 4810826us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.814178 4814178us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 2251, win
65535, length 0
4.814492 4814492us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01

Balador

unread,
Feb 29, 2012, 2:47:44 PM2/29/12
to ns-3-users
i changed aggain my code and add flowmonitor and it works but there is
a strange thing in the output.

All Tx Packets: 392
All Rx Packets: 222
All Delay: 0.0269671
All Lost Packets: 157
All Drop Packets: 0
********************************************************************************
Packets Delivery Ratio: 56%
Packets Lost Ratio: 40%
Throughput: 0.388202 Mbps


the sum of delivery and lost ratio is not 100 and we had not any drop
packet.why? what happens for the others packet? is it correct?
> 2.014116 ...
>
> read more »

Konstantinos

unread,
Feb 29, 2012, 3:46:37 PM2/29/12
to ns-3-...@googlegroups.com
Have you accounted ALL drop packets? Meaning for all (4) reasons.
There might be the case that there are some packets "still in the air". Have been transmitted, but not yet received, thus they are not accounted for Lost or Dropped.

Try to stop your sending application at t=t1 and the simulation at t=(t1+1)

Regards,
Konstantinos

Anthony Faustine

unread,
Mar 1, 2012, 3:53:29 AM3/1/12
to ns-3-...@googlegroups.com
Could you give me your code plse

> --
> You received this message because you are subscribed to the Google Groups
> "ns-3-users" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/ns-3-users/-/1iB-Y0DI8Z4J.

ali balador

unread,
Mar 1, 2012, 4:24:22 AM3/1/12
to ns-3-...@googlegroups.com
Thank you Konstantinos

i changed stop time and it works but in my scenario it needs more time.

this is my code :

#include "ns3/propagation-module.h"
#include "ns3/flow-monitor-module.h"

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"


#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cassert>



NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;


int main (int argc, char *argv[])
{
  std::string phyMode ("DsssRate1Mbps");
  double rss = -80;  // -dBm
  bool verbose = false;

  // Set up some default values for the simulation.
  Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (2500));
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("20kb/s"));


  CommandLine cmd;

  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
  cmd.AddValue ("rss", "received signal strength", rss);
  cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose);

  cmd.Parse (argc, argv);
 

// Convert to time object
  //Time interPacketInterval = Seconds (interval);
  PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory", sinkLocalAddress);

  ApplicationContainer sinkApp = sinkHelper.Install (serverNode);
  sinkApp.Start (Seconds (1.0));
  sinkApp.Stop (Seconds (100.0));

  // Create the OnOff applications to send UDP to the server
  OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());

  clientHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
  clientHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));

//normally wouldn't need a loop here but the server IP address is different
  //on each p2p subnet
  ApplicationContainer clientApps;
  for(uint32_t j=0; j<clientNodes.GetN (); ++j)
    {
      AddressValue remoteAddress (InetSocketAddress (i.GetAddress (0), port));
      clientHelper.SetAttribute ("Remote", remoteAddress);
      clientApps.Add (clientHelper.Install (clientNodes.Get (j)));
    }
  clientApps.Start (Seconds (1.0));
  clientApps.Stop (Seconds (100.0));

  //configure tracing
  AsciiTraceHelper ascii;
  wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("udp-single-hop.tr"));
  wifiPhy.EnablePcapAll ("udp-single-hop");

  // Install FlowMonitor on all nodes
  FlowMonitorHelper flowmon;
  Ptr<FlowMonitor> monitor = flowmon.InstallAll ();

  // Run simulation for 10 seconds
  Simulator::Stop (Seconds (120));
  Simulator::Run ();

  // Print per flow statistics
  monitor->CheckForLostPackets ();

  Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier> (flowmon.GetClassifier ());
  std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();
 

        uint32_t txPacketsum = 0;
        uint32_t rxPacketsum = 0;
        uint32_t rxBytesum = 0;
        uint32_t DropPacketsum = 0;
        uint32_t LostPacketsum = 0;
        double Delaysum = 0;


for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i = stats.begin (); i != stats.end (); ++i)
    {
          Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (i->first);
          std::cout << "Flow " << i->first << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n"; 
        
                txPacketsum += i->second.txPackets;
                rxPacketsum += i->second.rxPackets;
                rxBytesum += i->second.rxBytes;
                LostPacketsum += i->second.lostPackets;
                DropPacketsum += i->second.packetsDropped.size();
                Delaysum += i->second.delaySum.GetSeconds();

          std::cout << "  Tx :   " << i->second.txPackets << "(" << i->second.txBytes<< ")" << "\n";
          std::cout << "  Rx :   " << i->second.rxPackets << "(" << i->second.rxBytes<< ")" << "\n";
          std::cout << "********************************************************************************" << "\n";
          std::cout << "  Lost Packets:   " << i->second.lostPackets << "\n";
          std::cout << "  Drop Packets:   " << i->second.packetsDropped.size() << "\n";
          std::cout << "********************************************************************************" << "\n";
          std::cout << "  Packets Delivery Ratio: " << ((rxPacketsum * 100) /txPacketsum + 1) << "%" << "\n";
          std::cout << "  Packets Lost Ratio: " << ((LostPacketsum * 100) /txPacketsum) << "%" << "\n";
          std::cout << "  Throughput: " << i->second.rxBytes * 8.0 / 10.0 / 1024 / 1024  << " Mbps\n";
          std::cout << "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" << "\n";
    }
        std::cout << "********************************************************************************" << "\n";
        std::cout << "  All Tx Packets: " << txPacketsum <<"                  " << "  All Rx Packets: " << rxPacketsum << "\n";
        std::cout << "  All Lost Packets: " << LostPacketsum <<"                " << "  All Drop Packets: " << DropPacketsum << "\n";
        std::cout << "********************************************************************************" << "\n";
        std::cout << "  Packets Delivery Ratio: " << ((rxPacketsum * 100) /txPacketsum + 1) << "%" << "          " << "  Packets Lost Ratio: " << ((LostPacketsum * 100) /txPacketsum) << "%" << "\n";
        std::cout << "  All Delay: " << Delaysum / txPacketsum << "\n";
        std::cout << "  Throughput: " << rxBytesum * 8.0 / 10.0 / 1024 / 1024  << " Mbps\n";



  Simulator::Destroy ();

  return 0;
}

Konstantinos

unread,
Mar 1, 2012, 5:20:23 AM3/1/12
to ns-3-...@googlegroups.com
Dear Balador,

I am sure that this is not correct and does not count all dropped packets but gives you the different reasons of dropped packets.

DropPacketsum += i->second.packetsDropped.size();

I have used this code snipped for counting the dropped packets:

for (uint32_t j=0; j < iter->second.packetsDropped.size() ; j++){
               totalDrop += iter->second.packetsDropped[j];
               }

Regards,
Konstantinos

> For more options, visit this group at
> http://groups.google.com/group/ns-3-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.

ali balador

unread,
Mar 1, 2012, 5:27:45 AM3/1/12
to ns-3-...@googlegroups.com
Thank you I changed my code.

To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/jY1LMeP4KikJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.

ali balador

unread,
Mar 1, 2012, 8:09:20 AM3/1/12
to ns-3-...@googlegroups.com
I found a problem in out put i changed packet size from 500 to 3000
but the lost packet in 500 and 1000 is larger than 1500?
lost.png

Konstantinos

unread,
Mar 1, 2012, 8:30:49 AM3/1/12
to ns-3-...@googlegroups.com
This has to do with the RTS/CTS mechanism of WiFi

Currently you have set the threshold to 2200
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));

Which means that packets larger than 2200bytes with invoke the RTS/CTS mechanism.

Please refer to [1] if you do not know what RTS/CTS is.

Regards,
Konstantinos


[1] http://en.wikipedia.org/wiki/IEEE_802.11_RTS/CTS
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.

ali balador

unread,
Mar 1, 2012, 8:46:47 AM3/1/12
to ns-3-...@googlegroups.com
I used the same code for turn off the RTS/CTS for packets smaller than 2200 and there is not any statements related to rts/cts in the trace file for packet size smaller than 2200.it means it works well.

but the result is

packet size           lost packets
500                            24
1000                            8
1500                            4
2000                            1
2500                          170 (rts/cts)
3000                          136 (rts/cts)


what do you think? it makes sense?

i attached my code in the previous message . (http://groups.google.com/group/ns-3-users/msg/3870720a1f39dad3?)

To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/YUsH3esGiFkJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.

Konstantinos

unread,
Mar 1, 2012, 9:54:27 AM3/1/12
to ns-3-...@googlegroups.com
The results that you calculate with FlowMonitor are for NETWORK layer.
If there are retransmissions of packets/lost/dropped etc at other layers, then these are not accounted for. You have to manually trace them using for example callbacks.

Do the same experiment but also count packets dropped at PHY.

The results seem to me explainable. If RTS/CTS mechanism is used, then you minimize collisions, therefore, any lost/dropped packets are due to network/transport errors.
However, if you do not have RTS/CTS then, more packets are dropped at PHY due to collisions.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.

Balador

unread,
Mar 1, 2012, 1:16:16 PM3/1/12
to ns-3-users
yes i think now it makes sense.

How can i count the packet lost in PHY layer with flowmonitor?
or how can i count it if i can not count it with flowmonitor?

Thanks.
> > On Thu, Mar 1, 2012 at 2:30 PM, Konstantinos <dinos.katsa...@gmail.com>wrote:
>
> >> This has to do with the RTS/CTS mechanism of WiFi
>
> >> Currently you have set the threshold to 2200
> >> Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold",
> >> StringValue ("2200"));
>
> >> Which means that packets larger than 2200bytes with invoke the RTS/CTS
> >> mechanism.
>
> >> Please refer to [1] if you do not know what RTS/CTS is.
>
> >> Regards,
> >> Konstantinos
>
> >> [1]http://en.wikipedia.org/wiki/IEEE_802.11_RTS/CTS
>
> >> On Thursday, 1 March 2012 13:09:20 UTC, Balador wrote:
>
> >>> I found a problem in out put i changed packet size from 500 to 3000
> >>> but the lost packet in 500 and 1000 is larger than 1500?
>
> >>> On Thu, Mar 1, 2012 at 11:27 AM, ali balador <bala...@gmail.com> wrote:
>
> >>>> Thank you I changed my code.
>
> >>>> On Thu, Mar 1, 2012 at 11:20 AM, Konstantinos <dinos.katsa...@gmail.com
> >>>> > wrote:
>
> >>>>> Dear Balador,
>
> >>>>> I am sure that this is not correct and does not count all dropped
> >>>>> packets but gives you the different reasons of dropped packets.
>
> >>>>> DropPacketsum += i->second.packetsDropped.size(**);
>
> >>>>> I have used this code snipped for counting the dropped packets:
>
> >>>>> for (uint32_t j=0; j < iter->second.packetsDropped.**size() ; j++){
> >>>>>                totalDrop += iter->second.packetsDropped[j]**;
> >>>>>                }
>
> >>>>> Regards,
> >>>>> Konstantinos
>
> >>>>> On Thursday, 1 March 2012 09:24:22 UTC, Balador wrote:
>
> >>>>>> Thank you Konstantinos
>
> >>>>>> i changed stop time and it works but in my scenario it needs more
> >>>>>> time.
>
> >>>>>> this is my code :
>
> >>>>>> #include "ns3/propagation-module.h"
> >>>>>> #include "ns3/flow-monitor-module.h"
> >>>>>> #include "ns3/core-module.h"
> >>>>>> #include "ns3/network-module.h"
> >>>>>> #include "ns3/mobility-module.h"
> >>>>>> #include "ns3/config-store-module.h"
> >>>>>> #include "ns3/wifi-module.h"
> >>>>>> #include "ns3/internet-module.h"
> >>>>>> #include "ns3/applications-module.h"
> >>>>>> #include "ns3/ipv4-global-routing-**helpe**r.h"
>
> >>>>>> #include <iostream>
> >>>>>> #include <fstream>
> >>>>>> #include <vector>
> >>>>>> #include <string>
> >>>>>> #include <cassert>
>
> >>>>>> NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");
>
> >>>>>> using namespace ns3;
>
> >>>>>> int main (int argc, char *argv[])
> >>>>>> {
> >>>>>>   std::string phyMode ("DsssRate1Mbps");
> >>>>>>   double rss = -80;  // -dBm
> >>>>>>   bool verbose = false;
>
> >>>>>>   // Set up some default values for the simulation.
> >>>>>>   Config::SetDefault ("ns3::OnOffApplication::**Packe**tSize",
> >>>>>> UintegerValue (2500));
> >>>>>>   Config::SetDefault ("ns3::OnOffApplication::**DataR**ate",
> >>>>>> StringValue ("20kb/s"));
>
> >>>>>>   CommandLine cmd;
>
> >>>>>>   cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
> >>>>>>   cmd.AddValue ("rss", "received signal strength", rss);
> >>>>>>   cmd.AddValue ("verbose", "turn on all WifiNetDevice log
> >>>>>> components", verbose);
>
> >>>>>>   cmd.Parse (argc, argv);
>
> >>>>>> // Convert to time object
> >>>>>>   //Time interPacketInterval = Seconds (interval);
>
> >>>>>>   // disable fragmentation for frames below 2200 bytes
> >>>>>>   Config::SetDefault ("ns3::**WifiRemoteStationManage**r::**FragmentationThreshold",
> >>>>>> StringValue ("2200"));
> >>>>>>   // turn off RTS/CTS for frames below 2200 bytes
> >>>>>>   Config::SetDefault ("ns3::**WifiRemoteStationManage**r::**RtsCtsThreshold",
> >>>>>> StringValue ("2200"));
> >>>>>>   // Fix non-unicast data rate to be the same as that of unicast
> >>>>>>   Config::SetDefault ("ns3::**WifiRemoteStationManage**r::**NonUnicastMode",
>
> >>>>>>                       StringValue (phyMode));
>
> >>>>>> // Here, we will create 5 nodes.
> >>>>>>   NS_LOG_INFO ("Create nodes.");
> >>>>>>   NodeContainer serverNode;
> >>>>>>   NodeContainer clientNodes;
> >>>>>>   serverNode.Create (1);
> >>>>>>   clientNodes.Create (4);
> >>>>>>   NodeContainer allNodes = NodeContainer (serverNode, clientNodes);
>
> >>>>>>   // The below set of helpers will help us to put together the wifi
> >>>>>> NICs we want
> >>>>>>   WifiHelper wifi;
> >>>>>>   if (verbose)
> >>>>>>     {
> >>>>>>       wifi.EnableLogComponents ();  // Turn on all Wifi logging
> >>>>>>     }
> >>>>>>   wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
>
> >>>>>>   YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
> >>>>>>   // This is one parameter that matters when using FixedRssLossModel
> >>>>>>   // set it to zero; otherwise, gain will be added
> >>>>>>   wifiPhy.Set ("RxGain", DoubleValue (0) );
> >>>>>>   // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
> >>>>>>   wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_**IEEE80**2_11_RADIO);
>
> >>>>>>   YansWifiChannelHelper wifiChannel;
> >>>>>>   wifiChannel.**SetPropagationDela**y ("ns3::**
> >>>>>> ConstantSpeedPropagatio**nDelayM**odel");
> >>>>>>   // The below FixedRssLossModel will cause the rss to be fixed
> >>>>>> regardless
> >>>>>>   // of the distance between the two stations, and the transmit power
>
> >>>>>>   wifiChannel.AddPropagationLoss ("ns3::FixedRssLossModel","**Rss**",
> >>>>>> DoubleValue (rss));
> >>>>>>   wifiPhy.SetChannel (wifiChannel.Create ());
>
> >>>>>>   // Add a non-QoS upper mac, and disable rate control
> >>>>>>   NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
> >>>>>>   wifi.SetRemoteStationManager ("ns3::**ConstantRateWifiManager**",
> >>>>>>                               ****  "DataMode",StringValue (phyMode),
> >>>>>>                               ****  "ControlMode",StringValue
> >>>>>> (phyMode));
> >>>>>>   // Set it to adhoc mode
> >>>>>>   wifiMac.SetType ("ns3::AdhocWifiMac");
> >>>>>>   NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac,
> >>>>>> allNodes);
>
> >>>>>>   // Note that with FixedRssLossModel, the positions below are not
> >>>>>>   // used for received signal strength.
> >>>>>>   MobilityHelper mobility;
> >>>>>>   Ptr<ListPositionAllocator> positionAlloc = CreateObject<**
> >>>>>> ListPositionAlloc**ator> ();
> >>>>>>   positionAlloc->Add (Vector (0.0, 0.0, 0.0));
> >>>>>>   positionAlloc->Add (Vector (5.0, 0.0, 0.0));
> >>>>>>   positionAlloc->Add (Vector (-5.0, 0.0, 0.0));
> >>>>>>   positionAlloc->Add (Vector (0.0, 5.0, 0.0));
> >>>>>>   positionAlloc->Add (Vector (0.0, -5.0, 0.0));
> >>>>>>   mobility.SetPositionAllocator (positionAlloc);
> >>>>>>   mobility.SetMobilityModel ("ns3::**ConstantPositionMobilit**yModel"
> >>>>>> **);
> ...
>
> read more »

Konstantinos

unread,
Mar 1, 2012, 3:10:22 PM3/1/12
to ns-3-...@googlegroups.com
You can NOT count it with flowmonitor because flowmonitor monitors flows --> Layer 3 information!

You have to use callbacks.

rahul hada

unread,
Oct 26, 2012, 9:59:01 AM10/26/12
to ns-3-...@googlegroups.com

Dear ,
Could you please let know is it possible to simulate wormhole attack for WSN  in ns3.

Regards,
Rahul
On Friday, February 24, 2012 5:25:24 PM UTC+5:30, Balador wrote:
I read Ns-3 and also tracing section several times because tracing
system help me to get out my favorite information from output.
I think now i should start with an example and test the thing that i
have learned.
Now i should start new step and trying to select one of NS-3 examples
and modify it for sensor networks.
At this time we need 5 nodes that one of them is sink and others are
nodes that send information to sink.
Also the nodes are static.

Which exapmle is better for me? or is there any example for wireless
sensor networks in ns-3?

Nikhil Shetty

unread,
Apr 18, 2014, 1:01:14 PM4/18/14
to ns-3-...@googlegroups.com
Hi Balador,
 I have started a paper implementation in Ns3 and I need some help...Can u help

With Regards,
Nikhil V Shetty

rahul hada

unread,
Apr 18, 2014, 11:44:15 PM4/18/14
to ns-3-...@googlegroups.com
which module of WSN you are working on , as ns3 is still not fully developed for WSN

Check following link for more detail



--
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/klAS-HqU92I/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.

Rohini SharmaOhlan

unread,
Dec 8, 2014, 6:08:41 AM12/8/14
to ns-3-...@googlegroups.com
use ns-2 . much help is available

On Mon, Dec 8, 2014 at 2:43 PM, Dheeraj Pandey <dheerajp...@gmail.com> wrote:
can any one tell me code for wireless sensor network,which consist of 40 sensor node.1 sink node.and communication between sink node and sensor node.

--
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.

Tommaso Pecorella

unread,
Dec 8, 2014, 8:33:58 AM12/8/14
to ns-3-...@googlegroups.com
Hi,

it depends on what you have to do. The lr-wpan mode is included in ns-3 and it is constantly updated. By the way, it is far more precise and performant than the ns-2 one.

In the lr-wpan and sixlowpan modules you will find some examples of wsn setup. Depending on your needs, these may or may not be enough.
feel free to study these examples and ask if you have specific questions.

Cheers,

T.

Balador

unread,
Feb 24, 2012, 7:52:02 AM2/24/12
to ns-3-users
i should change my first question

i want to simulate a scenario with one sink node and 4 nodes that
these nodes are static and use wireless connections and use 802.11 for
mac layer.
then i want to add battery for these nodes.

what should i do?

i read tutorial examples but i want to have just communication between
the nodes and sink like WSNs. and other characteristics is like
wireless networks.

which ns-3 example would be a good example for starting?

ali balador

unread,
Feb 24, 2012, 9:31:07 AM2/24/12
to ns-3-...@googlegroups.com
thank you for your reply.

i read whole but i need one node az a sink and connect others to sink.
i want to know i should define four connections between sink and others or the is another way in ns-3?

On Fri, Feb 24, 2012 at 3:27 PM, Konstantinos <dinos.k...@gmail.com> wrote:
Dear Balador,

If you want to simulate a wireless 802.11-based scenario, have a look at the examples under /example/wireless/
The simple-wifi-adhoc.cc or simple-wifi-adhoc-grid.cc should be a good starting point.

Additionally, look a the tutorial to get a better understanding of ns-3 system, not just the tracing.

Regards,
Konstantinos

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/h6Eau60PoDYJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.

Dheeraj Pandey

unread,
Dec 8, 2014, 4:13:25 AM12/8/14
to ns-3-...@googlegroups.com

Pallavi Venkatesh

unread,
Sep 25, 2015, 11:58:14 AM9/25/15
to ns-3-users
Hello Seniors.....just had a glimpse of ur conversations on setting up WSN in ns3......since i am also a research scholar in the same field, thought this could be a very good platform to learn things from u all......:)


PV

unread,
Sep 25, 2015, 12:16:01 PM9/25/15
to ns-3-users
can u plz suggest me to start with WSAN setup in ns3.....i.e., clustering of nodes

PV

unread,
Oct 4, 2015, 9:26:18 AM10/4/15
to ns-3-users
A very good evening Prof. I am a research scholar from India currently working as a faculty in a engineering college, Bangalore. Sir, my area of interest is WSN. I intend to carry out my research on the ns3 simulator. Sir, read about your suggestions online. Sir, can I ask you for your mail id, so that I can be mentored by you. 

ranjeeth kumar

unread,
Oct 13, 2015, 1:26:55 AM10/13/15
to ns-3-users
hi

Is it possible to simulate the routing attacks and implementing IDS in WSN using NS3?

Regards
Ranjit

Tommaso Pecorella

unread,
Oct 13, 2015, 2:02:22 PM10/13/15
to ns-3-users
Yes. No, Maybe.

Yes, it is possible.
No, there's no pre-made code (i.e., you have to do some coding - joking... a LOT of coding).
Maybe, maybe you'll be able to perform this task, maybe not.

Have fun,

T.

Tommaso Pecorella

unread,
Oct 13, 2015, 2:03:22 PM10/13/15
to ns-3-users
The mail is public... just hoover your mouse on the icon.

T.

On Tuesday, October 13, 2015 at 7:26:55 AM UTC+2, ranjeeth kumar wrote:

rahul hada

unread,
Oct 18, 2015, 4:49:35 AM10/18/15
to ns-3-...@googlegroups.com
Yes, It is possible to create a attack model in NS3

Follow link :-


rahul hada

unread,
Oct 18, 2015, 4:51:04 AM10/18/15
to ns-3-...@googlegroups.com
Yes, It is possible to create a attack model in NS3

Follow link :-


On Tue, Oct 13, 2015 at 10:56 AM, ranjeeth kumar <ranget...@gmail.com> wrote:

mohan ba

unread,
Aug 5, 2016, 9:48:05 AM8/5/16
to ns-3-users
Hi Sir, i am manu, research scholar in same field from bangalore, where are you working sir, can you give your mail id or number, this is my mail id.

mohan ba

unread,
Aug 5, 2016, 9:53:46 AM8/5/16
to ns-3-users
Dear all,
actually WSN is a non-IP based network, do we have NS-3 API for simulating non-IP Network?
if so let me know, from the above messages, all are suggesting to refer wifi based sample programs which is a IP based network, can anyone give me the clarity about that, it will be a great help.

thank you in advance.
 

Tommaso Pecorella

unread,
Aug 5, 2016, 10:49:02 AM8/5/16
to mohan ba, ns-3-users
Hi,

please use the ns-users group.

About your question, if your traffic is non-IP, then I’d suggest to use the NetDevice directly. 6LoWPAN is meant to be used with IP, and if your traffic is non-IP...

T.


> On 05 Aug 2016, at 15:59, mohan ba <ba.m...@gmail.com> wrote:
>
> Dear Sir,
>
> I am research scholar from india, working on ns-3 for implement mobile WSN.
> can we use 6LOWPAN module to implement non-IP based network like WSN, as 6LOWPAN supports short address (non IP addresses). or we have to use IP based wifi sample program itself as a starting point to realise WSN.
>
> thanks in advance
>
>

Bharti Sheoran

unread,
Mar 12, 2018, 4:43:50 AM3/12/18
to ns-3-users
hello sir
i m pursuing M Tech from India on Fault tolerance in WSN using Two Tier data dissemination 
i have to create a sensor network with on e source and one sink static.
from where should i start simulating please suggest i have no idea what to do and from where ???

Aninda Sarker Rahul

unread,
Oct 5, 2018, 6:34:21 AM10/5/18
to ns-3-users
I have tried to use 8 clientNodes instead of four...
but its not working properly... for node 5 tx=11, rx=0
there is your code that i have modified...



#include "ns3/propagation-module.h"
#include "ns3/flow-monitor-module.h"

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"


#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cassert>



NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;


int main (int argc, char *argv[])
{
  std::string phyMode ("DsssRate1Mbps");
  double rss = -80;  // -dBm
  bool verbose = false;

  // Set up some default values for the simulation.
  Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (2500));
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("20kb/s"));


  CommandLine cmd;

  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
  cmd.AddValue ("rss", "received signal strength", rss);
  cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose);

  cmd.Parse (argc, argv);
  

// Convert to time object
  //Time interPacketInterval = Seconds (interval);



  // disable fragmentation for frames below 2200 bytes
  Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("3000"));
  // turn off RTS/CTS for frames below 2200 bytes
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("2200"));
  // Fix non-unicast data rate to be the same as that of unicast
  Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue (phyMode));
  
// Here, we will create n nodes.
  NS_LOG_INFO ("Create nodes.");
  NodeContainer serverNode;
  NodeContainer clientNodes;
  serverNode.Create (1);
  clientNodes.Create (8);
  NodeContainer allNodes = NodeContainer (serverNode, clientNodes);

  // The below set of helpers will help us to put together the wifi NICs we want
  WifiHelper wifi;
  if (verbose)
    {
      wifi.EnableLogComponents ();  // Turn on all Wifi logging
    }
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);


  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
  // This is one parameter that matters when using FixedRssLossModel
  // set it to zero; otherwise, gain will be added
  wifiPhy.Set ("RxGain", DoubleValue (0) ); 
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
  wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); 

  YansWifiChannelHelper wifiChannel;
  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
  // The below FixedRssLossModel will cause the rss to be fixed regardless
  // of the distance between the two stations, and the transmit power

  wifiChannel.AddPropagationLoss ("ns3::FixedRssLossModel","Rss", DoubleValue (rss));
  wifiPhy.SetChannel (wifiChannel.Create ());

  // Add a non-QoS upper mac, and disable rate control
  NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                                "DataMode",StringValue (phyMode),
                                "ControlMode",StringValue (phyMode));
  // Set it to adhoc mode
  wifiMac.SetType ("ns3::AdhocWifiMac");
  NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, allNodes);

  // Note that with FixedRssLossModel, the positions below are not 
  // used for received signal strength. 
  MobilityHelper mobility;
  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
  positionAlloc->Add (Vector (0.0, 0.0, 0.0));
  positionAlloc->Add (Vector (100.0, 0.0, 0.0));
  positionAlloc->Add (Vector (-100.0, 0.0, 0.0));
  positionAlloc->Add (Vector (0.0, 100.0, 0.0));
  positionAlloc->Add (Vector (0.0, -100.0, 0.0));
  positionAlloc->Add (Vector (100.0, 100.0, 0.0));
  positionAlloc->Add (Vector (100.0, -100.0, 0.0));
  positionAlloc->Add (Vector (-100.0, 100.0, 0.0));
  positionAlloc->Add (Vector (-100.0, -100.0, 0.0));

  mobility.SetPositionAllocator (positionAlloc);
  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
  mobility.Install (allNodes);

  InternetStackHelper internet;
  internet.Install (allNodes);

  Ipv4AddressHelper ipv4;
  NS_LOG_INFO ("Assign IP Addresses.");
  ipv4.SetBase ("10.1.1.0", "255.255.255.0");
  Ipv4InterfaceContainer i = ipv4.Assign (devices);

  // Create a packet sink on the star "hub" to receive these packets
  uint16_t port = 5000;
  Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
  PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory", sinkLocalAddress);

  ApplicationContainer sinkApp = sinkHelper.Install (serverNode);
  sinkApp.Start (Seconds (2.0));
  sinkApp.Stop (Seconds (100.0));

  // Create the OnOff applications to send UDP to the server
  OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());

  clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
  clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
//normally wouldn't need a loop here but the server IP address is different
  //on each p2p subnet
  ApplicationContainer clientApps;
  for(uint32_t j=0; j<clientNodes.GetN (); ++j)
    {
      AddressValue remoteAddress (InetSocketAddress (i.GetAddress (0), port));
      clientHelper.SetAttribute ("Remote", remoteAddress);
      clientApps.Add (clientHelper.Install (clientNodes.Get (j)));
    }
  clientApps.Start (Seconds (3.0));
  clientApps.Stop (Seconds (100.0));

  //configure tracing
  AsciiTraceHelper ascii;
  wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("udp-single-hop.tr"));

Amrit Kaur

unread,
May 10, 2019, 8:45:15 PM5/10/19
to ns-3-users
Hi balador

I tried your code but it shows issue can you please tell me what it is..


Build failed
 -> task in 'UDP' failed (exit status 1): 
{task 140215048723152: cxx UDP.cc -> UDP.cc.5.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-I.', '-I../..', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_LIBXML2=1', '../../scratch/UDP.cc', '-c', '-o', '/home/aut/tarball/ns-allinone-3.28/ns-3.28/build/debug/scratch/UDP.cc.5.o']


thanks 
On Thursday, March 1, 2012 at 1:19:08 AM UTC+13, Balador wrote:
Hi

Thank you Tommaso

i modified my code and use examples/tcp/tcp-star-server for assigning
application layer protocols

i can run it but i got a result that i do not know exactly
i saw lots of transmission (zero packet size) from sink to source.


second question : if i change "UdpSocketFactory" instead of
"TcpSocketFactory" to use UDP this example works correctly or i should
modify more?

This is my code :

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cassert>

#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"

NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");

using namespace ns3;

int main (int argc, char *argv[])
{
  std::string phyMode ("DsssRate1Mbps");
  double rss = -80;  // -dBm
  bool verbose = false;

  // Set up some default values for the simulation.
  Config::SetDefault ("ns3::OnOffApplication::PacketSize",
UintegerValue (250));
  Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue
("5kb/s"));

  CommandLine cmd;

  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
  cmd.AddValue ("rss", "received signal strength", rss);
  cmd.AddValue ("verbose", "turn on all WifiNetDevice log components",
verbose);

  cmd.Parse (argc, argv);

  // disable fragmentation for frames below 2200 bytes
  Config::SetDefault
("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue
("2200"));
  // turn off RTS/CTS for frames below 2200 bytes
  Config::SetDefault
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue
("2200"));
  // Fix non-unicast data rate to be the same as that of unicast
  Config::SetDefault
("ns3::WifiRemoteStationManager::NonUnicastMode",
                      StringValue (phyMode));

// Here, we will create 5 nodes.
  NS_LOG_INFO ("Create nodes.");
  NodeContainer serverNode;
  NodeContainer clientNodes;
  serverNode.Create (1);
  clientNodes.Create (4);
  NodeContainer allNodes = NodeContainer (serverNode, clientNodes);

  // The below set of helpers will help us to put together the wifi
NICs we want
  WifiHelper wifi;
  if (verbose)
    {
      wifi.EnableLogComponents ();  // Turn on all Wifi logging
    }
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);


  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
  // This is one parameter that matters when using FixedRssLossModel
  // set it to zero; otherwise, gain will be added
  wifiPhy.Set ("RxGain", DoubleValue (0) );
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
  wifiPhy.SetPcapDataLinkType
  positionAlloc->Add (Vector (5.0, 0.0, 0.0));
  positionAlloc->Add (Vector (-5.0, 0.0, 0.0));
  positionAlloc->Add (Vector (0.0, 5.0, 0.0));
  positionAlloc->Add (Vector (0.0, -5.0, 0.0));
  mobility.SetPositionAllocator (positionAlloc);
  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
  mobility.Install (allNodes);

  InternetStackHelper internet;
  internet.Install (allNodes);

  Ipv4AddressHelper ipv4;
  NS_LOG_INFO ("Assign IP Addresses.");
  ipv4.SetBase ("10.1.1.0", "255.255.255.0");
  Ipv4InterfaceContainer i = ipv4.Assign (devices);

  // Create a packet sink on the star "hub" to receive these packets
  uint16_t port = 50000;
  Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (),
port));
  PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory",
sinkLocalAddress);
  ApplicationContainer sinkApp = sinkHelper.Install (serverNode);
  sinkApp.Start (Seconds (1.0));
  sinkApp.Stop (Seconds (10.0));

  // Create the OnOff applications to send TCP to the server
  OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ());
  clientHelper.SetAttribute ("OnTime", RandomVariableValue
(ConstantVariable (1)));
  clientHelper.SetAttribute ("OffTime", RandomVariableValue
(ConstantVariable (0)));

//normally wouldn't need a loop here but the server IP address is
different
  //on each p2p subnet
  ApplicationContainer clientApps;
  for(uint32_t j=0; j<clientNodes.GetN (); ++j)
    {
      AddressValue remoteAddress (InetSocketAddress (i.GetAddress (0),
port));
      clientHelper.SetAttribute ("Remote", remoteAddress);
      clientApps.Add (clientHelper.Install (clientNodes.Get (j)));
    }
  clientApps.Start (Seconds (1.0));
  clientApps.Stop (Seconds (10.0));

  //configure tracing
  AsciiTraceHelper ascii;
  wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("tcp-single-
hop.tr"));
  wifiPhy.EnablePcapAll ("tcp-single-hop");

  Simulator::Run ();
  Simulator::Destroy ();

  return 0;
}




2.014116 2014116us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
2.014430 2014430us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.015880 2015880us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 501, win
65535, length 0
2.015890 2015890us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.026070 2026070us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1:501, ack 1,
win 65535, length 500
2.026384 2026384us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.027234 2027234us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 501, win
65535, length 0
2.027548 2027548us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.200199 2200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 501:751, ack 1, win 65535, length 250
2.203314 2203314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.206490 2206490us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 501:751, ack
1, win 65535, length 250
2.206804 2206804us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.400199 2400199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 501:751, ack 1, win 65535, length 250
2.403314 2403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.404504 2404504us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 751, win
65535, length 0
2.404514 2404514us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.405808 2405808us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 751, win
65535, length 0
2.405818 2405818us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.409072 2409072us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 501:751, ack
1, win 65535, length 250
2.409386 2409386us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.410656 2410656us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 751, win
65535, length 0
2.410970 2410970us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.411820 2411820us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 751, win
65535, length 0
2.412134 2412134us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
2.600199 2600199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 751:1001, ack 1, win 65535, length 250
2.603314 2603314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.607010 2607010us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 751:1001, ack
1, win 65535, length 250
2.607324 2607324us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.800199 2800199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 751:1001, ack 1, win 65535, length 250
2.803314 2803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
2.806690 2806690us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 751:1001, ack
1, win 65535, length 250
2.807004 2807004us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
2.807934 2807934us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1001, win
65535, length 0
2.807944 2807944us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.809618 2809618us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1001, win
65535, length 0
2.809628 2809628us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
2.810802 2810802us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1001, win
65535, length 0
2.811116 2811116us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.000704 3000704us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.1 (ff:ff:ff:ff:ff:ff) tell 10.1.1.4,
length 28
3.001458 3001458us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
3.001772 3001772us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.004642 3004642us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1001:1251,
ack 1, win 65535, length 250
3.004956 3004956us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.005826 3005826us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
3.006140 3006140us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.006994 3006994us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.4 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
3.007424 3007424us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1001:1251, ack 1, win 65535, length 250
3.010538 3010538us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.011332 3011332us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.4 is-at 00:00:00:00:00:04, length 28
3.011646 3011646us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.012496 3012496us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
3.012810 3012810us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.013880 3013880us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
3.014194 3014194us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.019372 3019372us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1:537, ack 1,
win 65535, length 536
3.019686 3019686us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.020536 3020536us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 537, win
65535, length 0
3.020850 3020850us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.026208 3026208us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 537:1073, ack
1, win 65535, length 536
3.026522 3026522us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.029156 3029156us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1073:1251,
ack 1, win 65535, length 178
3.029470 3029470us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.030320 3030320us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1251, win
65535, length 0
3.030634 3030634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.200199 3200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1001:1251, ack 1, win 65535, length 250
3.203314 3203314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.204164 3204164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1251, win
65535, length 0
3.204174 3204174us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
3.205628 3205628us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1251, win
65535, length 0
3.205942 3205942us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.400199 3400199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1251:1501, ack 1, win 65535, length 250
3.403314 3403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.407230 3407230us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.407544 3407544us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.410594 3410594us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.410908 3410908us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.603000 3603000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.603314 3603314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
3.604344 3604344us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1501, win
65535, length 0
3.604354 3604354us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
3.608068 3608068us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1251:1501,
ack 1, win 65535, length 250
3.608382 3608382us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.609252 3609252us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1501, win
65535, length 0
3.609566 3609566us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.610856 3610856us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1501, win
65535, length 0
3.611170 3611170us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.612320 3612320us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1501, win
65535, length 0
3.612634 3612634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
3.800199 3800199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1501:1751, ack 1, win 65535, length 250
3.803314 3803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
3.806250 3806250us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
3.806564 3806564us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
3.810314 3810314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
3.810628 3810628us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.000704 4000704us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.1 (ff:ff:ff:ff:ff:ff) tell 10.1.1.5,
length 28
4.001458 4001458us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.1 is-at 00:00:00:00:00:01, length 28
4.001772 4001772us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.002642 4002642us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
4.002956 4002956us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -87dB noise
Acknowledgment RA:00:00:00:00:00:05
4.005656 4005656us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.5 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
4.006566 4006566us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1751, win
65535, length 0
4.006576 4006576us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.006950 4006950us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1501:1751, ack 1, win 65535, length 250
4.010064 4010064us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.010994 4010994us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [S], seq 0, win 65535,
length 0
4.011308 4011308us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.012142 4012142us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.5 is-at 00:00:00:00:00:05, length 28
4.012456 4012456us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.013510 4013510us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Request who-has 10.1.1.5 (ff:ff:ff:ff:ff:ff) tell 10.1.1.1,
length 28
4.014264 4014264us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise ARP, Reply 10.1.1.5 is-at 00:00:00:00:00:05, length 28
4.014578 4014578us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.015788 4015788us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1751, win
65535, length 0
4.016102 4016102us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.019232 4019232us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1501:1751,
ack 1, win 65535, length 250
4.019546 4019546us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.020596 4020596us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 1751, win
65535, length 0
4.020606 4020606us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.022120 4022120us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 1751, win
65535, length 0
4.022434 4022434us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.023604 4023604us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
4.023918 4023918us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.024768 4024768us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], ack 1, win 65535,
length 0
4.025082 4025082us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.026032 4026032us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [S.], seq 0, ack 1,
win 65535, length 0
4.026346 4026346us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.027396 4027396us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 1751, win
65535, length 0
4.027710 4027710us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.032948 4032948us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1:537, ack 1,
win 65535, length 536
4.033262 4033262us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.034552 4034552us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 537, win
65535, length 0
4.034866 4034866us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.040104 4040104us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 537:1073, ack
1, win 65535, length 536
4.040418 4040418us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.045736 4045736us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1073:1609,
ack 1, win 65535, length 536
4.046050 4046050us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.046900 4046900us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 1609, win
65535, length 0
4.047214 4047214us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.049380 4049380us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1609:1751,
ack 1, win 65535, length 142
4.049694 4049694us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.200199 4200199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1751:2001, ack 1, win 65535, length 250
4.203609 4203609us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 1751:2001, ack 1, win 65535, length 250
4.206724 4206724us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.209634 4209634us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.209948 4209948us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.213258 4213258us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.213572 4213572us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.214422 4214422us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 2001, win
65535, length 0
4.214736 4214736us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.217606 4217606us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.217920 4217920us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.403000 4403000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 1751:2001,
ack 1, win 65535, length 250
4.403314 4403314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.404164 4404164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 2001, win
65535, length 0
4.404478 4404478us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.407210 4407210us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 2001, win
65535, length 0
4.407220 4407220us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.410434 4410434us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 2001, win
65535, length 0
4.410748 4410748us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.600199 4600199us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.606290 4606290us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.3.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.606604 4606604us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:03
4.609654 4609654us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.609968 4609968us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.613378 4613378us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.4.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.613692 4613692us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:04
4.613962 4613962us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.617076 4617076us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.803000 4803000us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.5.49153 > 10.1.1.1.50000: Flags [.], seq 2001:2251,
ack 1, win 65535, length 250
4.803314 4803314us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:05
4.804164 4804164us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.5.49153: Flags [.], ack 2251, win
65535, length 0
4.804478 4804478us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.805128 4805128us tsft 1.0 Mb/s 2412 MHz 11b IP 10.1.1.2.49153 >
10.1.1.1.50000: Flags [.], seq 2001:2251, ack 1, win 65535, length 250
4.808242 4808242us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:02
4.809432 4809432us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.3.49153: Flags [.], ack 2251, win
65535, length 0
4.809746 4809746us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01
4.810816 4810816us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.2.49153: Flags [.], ack 2251, win
65535, length 0
4.810826 4810826us tsft 1.0 Mb/s 2412 MHz 11b Acknowledgment RA:
00:00:00:00:00:01
4.814178 4814178us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise IP 10.1.1.1.50000 > 10.1.1.4.49153: Flags [.], ack 2251, win
65535, length 0
4.814492 4814492us tsft 1.0 Mb/s 2412 MHz 11b -80dB signal -101dB
noise Acknowledgment RA:00:00:00:00:00:01




On Feb 29, 2:11 am, Tommaso Pecorella <tommy...@gmail.com> wrote:
> Hi,
>
> your code is working, but it does send just ONE packet:
>
>   uint32_t numPackets = 1;
> well, one for each node excluding the sink, but still just 4 overall.
>
> You want to increase it dramatically, or, better, to change to a proper
> application.
>
> Fore example, you might try to add this:
>
>   // Create a packet sink on the star "hub" to receive these packets
>
>   uint16_t port = 50000;
>
>   Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (),
> port));
>
>   PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory", sinkLocalAddress);
>
>   ApplicationContainer sinkApp = sinkHelper.Install (serverNode);
>
>   sinkApp.Start (Seconds (1.0));
>
>   sinkApp.Stop (Seconds (10.0));
>
>   // Create the OnOff applications to send TCP to the server
>
>   OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
>
>   clientHelper.SetAttribute
>
>     ("OnTime", RandomVariableValue (ConstantVariable (1)));
>
>   clientHelper.SetAttribute
>
>     ("OffTime", RandomVariableValue (ConstantVariable (0)));
>
>   //normally wouldn't need a loop here but the server IP address is
> different
>
>   //on each p2p subnet
>
>   ApplicationContainer clientApps;
>
>   for(uint32_t i=0; i<clientNodes.GetN (); ++i)
>
>     {
>
>       AddressValue remoteAddress
>
>         (InetSocketAddress (interfaceAdjacencyList[i].GetAddress (0),
> port));
>
>       clientHelper.SetAttribute ("Remote", remoteAddress);
>
>       clientApps.Add (clientHelper.Install (clientNodes.Get (i)));
>
>     }
>
>   clientApps.Start (Seconds (1.0));
>
Reply all
Reply to author
Forward
0 new messages