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?
--
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.
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
> 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
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
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
> ...
>
> read more »
uint32_t numPackets = 1;
// 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));
> --
> 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.
> 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.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/jY1LMeP4KikJ.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/YUsH3esGiFkJ.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.
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?
--
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.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
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.
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 unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
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));
>