Introduction to NS-3

Part - II

UniS PGSDP Workshop
Konstantinos Katsaros
PhD Student
unis logo ns3 logo


FlowMonitor class

FlowMonitor Measurements

FlowMonitor Example

Create a FlowMonitorHelper object

FlowMonirtorHelper flowmon;

Create a pointer to FlowMonirot class and install probes to all nodes

Ptr<FlowMonitor> monitor = flowmon.InstallAll();

Configure histogram parameters

Monitor->SetAttribute (”DelayBinWidth”, DoubleValue(0.001));
Monitor->SetAttribute (”JitterBinWidth”,DoubleValue (0.001));

Run simulation

Simulator::Run ();

Write results into an XML file

monitor->SerializeToXmlFile (”results.xml”,True,True);

Smart Pointers

Packet Tags


Debugging - 2


NetAnim 3.0

Adding a new Module

./ [options] modulename
Then clean the project, configure and re-build it
%./waf distclean
%./waf configure

Network Simulation Cradle (NSC)

The Network Simulation Cradle (NSC) is a framework which allows real world TCP/IP network stacks to be used inside a network simulator nsc

Distributed Simulation with MPI


GlobalValue::Bind (“SimulatorImplementationType”, StringValue (“ns3::RealTimeSimulatorImpl”));
emu1 emu2