Introduction to NS-3 Part - 2 Katsaros Konstantinos PhD Student PGSDP Workshop on NS-3 2 April 2012.

Slides:



Advertisements
Similar presentations
,< 資 管 Lee 附錄 A0 IGMP vs Multicast Listener Discovery.
Advertisements

Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Copyright 2010 Cisco Press & Priscilla Oppenheimer.
Improving TCP Performance over Mobile Ad Hoc Networks by Exploiting Cross- Layer Information Awareness Xin Yu Department Of Computer Science New York University,
- walkthrough of classic hidden terminal problem in WiFi-
Internet Protocol (IP)
Part IV: Multilayer Switching
FLIP : Flexible Interconnection Protocol Ignacio Solis Katia Obraczka.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
ICMP & ICMPv6 Referenced on RFC’s 792 and 2463 respectively. Frank Azevedo.
Copyright node This presentation is a subset of the one presented by:
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
1 Summer Report Reporter : Yi-Cheng Lin Data: 2008/09/02.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Internet Command Message Protocol (ICMP) CS-431 Dick Steflik.
QualNet 2014/05/ 尉遲仲涵. Outline Directory Structure QualNet Basic Message & Event QualNet simulation architecture Protocol Model Programming.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
Using ns-3 emulation to experiment with Wireless Mesh Network Routing: Lessons learned José Núñez-Martínez Research Engineer Centre Tecnologic de Telecomunicacions.
NdnSIM Tutorial.
Chapter 4: Managing LAN Traffic
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Oppenheimer.
Introduction to NS2 -Network Simulator- -Prepared by Changyong Jung.
LWIP TCP/IP Stack 김백규.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
CCNA 2 Week 8 TCP/IP Suite Error Control Messages.
IP Forwarding.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
10/8/2015CST Computer Networks1 IP Routing CST 415.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Wireless Software R&D Group, IITP RAS Kirill Andreev, Aleksey Kovalenko, Dmitriy Lakontsev Realization of IEEE802.11s draft standard in NS-3.3 Institute.
Dr. John P. Abraham Professor UTPA
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Networks and Protocols CE Week 7b. Routing an Overview.
Error and Control An IP datagram travels from node to node on the way to its destination Each router operates autonomously Failures or problems may occur.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions.
1 Requirements for Internet Routers (Gateways) and Hosts Relates to Lab 3. (Supplement) Covers the compliance requirements of Internet routers and hosts.
1 Microsoft Windows 2000 Network Infrastructure Administration Chapter 4 Monitoring Network Activity.
Cisco 2 - Routers Perrine. J Page 112/19/2015 Chapter 8 TCP/IP Error Message Some of the conditions that must be met in order for host to host communication.
Protocol Layering Chapter 11.
1 CSE 5346 Spring Network Simulator Project.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
LonWorks Introduction Hwayoung Chae.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
1 Layer 3: Routing & Addressing Honolulu Community College Cisco Academy Training Center Semester 1 Version
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
Introduction to Networks
Introduction to TCP/IP networking
Multicast Listener Discovery
Instructor Materials Chapter 5: Ethernet
Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Copyright 2010 Cisco Press & Priscilla Oppenheimer.
Layered Architectures
Chapter 6: Network Layer
Packet Switch Architectures
Ns-3 Training Session 4: Monday 3:30pm ns-3 Annual Meeting May 2014.
Ns-3 Tutorial Xin Li.
ns-3 Training Visualization ns-3 Annual Meeting June 2016
Ns-3 Training Debugging support ns-3 training, June 2016.
ns-3 training Tom Henderson ns-3 annual meeting 2019
Ns-3 Training ns-3 Objects ns-3 training, June 2016.
Packet Switch Architectures
Presentation transcript:

Introduction to NS-3 Part - 2 Katsaros Konstantinos PhD Student PGSDP Workshop on NS-3 2 April 2012

Overview  FlowMonitor  Smart Pointers  Packet Tags  Debugging  Visualization  Creating a new Module  Advanced Simulation with NS-3  NSC (Network Simulator Cradle)  MPI (Message Passing Interface)  EMU (Emulation) Konstantinos Katsaros 2

Flow Monitor A common problem was identified –“how to easily extract flow metrics from arbitrary simulations?” Existing solutions do not solve this problem effectively The Flow Monitor solves the problem –Requires significant less programming time than NS-3 callback based tracing –A lot more efficient than ascii tracing More data output methods (e.g. database and binary file) More options to control level of detail stored in memory Monitor multicast/broadcast flows Konstantinos Katsaros 3

Flow Monitor Measurements timeFirstTxPacket, timeLastTxPacket begin and end times of the flow from the point of view of the receiver timeFirstRxPacket, timeLastRxPacket begin and end times of the flow from the point of view of the receiver delaySum, jitterSum sum of delay and jitter values txBytes, txPackets number of transmitted bytes and packets rxBytes, rxPackets number of received bytes and packets lostPackets number of definitely lost packets timesForwarded the number of times a packet has been reportedly forwarded, summed for all packets in the flow delayHistogram, jitterHistogram, packetSizeHistogram Histogram versions for the delay, jitter, and packet sizes, respectively packetsDropped, bytesDropped discriminates the losses by a reason code –DROP NO ROUTE no IPv4 route found for a packet –DROP TTL EXPIRE a packet was dropped due to an IPv4 TTL field decremented and reaching zero –DROP BAD CHECKSUM a packet had a bad IPv4 header checksum and had to be dropped Konstantinos Katsaros 4

Flow Monitor Example Create a FlowMonitorHelper object FlowMonirtorHelper flowmon; Create a pointer to FlowMonirot class and install probes to all nodes Ptr 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); Konstantinos Katsaros 5

Smart Pointer NS3 uses reference-counting smart pointers at its APIs to limit memory leaks –Or “pass by value” or “pass by reference to const” where appropriate A “smart pointer” behaves like a normal pointer (syntax) but does not lose memory when reference count goes to zero Use them like built-in pointers: Ptr p = CreateObject (); p->method (); Konstantinos Katsaros 6

Packet Tags Small chunks of information Any number of tags can be attached a packet Tags are keyed by the a structure type itself E.g.: Ptr p; MyTag tag; p->AddTag (tag); p->PeekTag (tag); New tag types are defined similarly to header types Tags can be used to: –Attach context information to a packet –Example: NetDevice attaches destination MAC address when queueing, retrieves it when dequeuing for transmission –Convey additional information across layers Konstantinos Katsaros 7

Debugging (1) Assertions: NS_ASSERT (expression); –Aborts the program if expression evaluates to false –Includes source file name and line number Unconditional Breakpoints: NS_BREAKPOINT (); –Forces an unconditional breakpoint, compiled in Debug Logging (not to be confused with tracing!) –Purpose Used to trace code execution logic For debugging, not to extract results! –Properties NS_LOG* macros work with C++ IO streams E.g.: NS_LOG_UNCOND (”I have received ” GetSize () << ” bytes”); NS_LOG macros evaluate to nothing in optimized builds When debugging is done, logging does not get in the way of execution performance Konstantinos Katsaros 8

Debugging (2) Logging levels: –NS_LOG_ERROR (...): serious error messages only –NS_LOG_WARN (...): warning messages –NS_LOG_DEBUG (...): rare ad-hoc debug messages –NS_LOG_INFO (...): informational messages (eg. banners) –NS_LOG_FUNCTION (...):function tracing –NS_LOG_PARAM (...): parameters to functions –NS_LOG_LOGIC (...): control flow tracing within functions Logging ”components” –Logging messages organized by components –Usually one component is one.cc source file –NS_LOG_COMPONENT_DEFINE ("OlsrAgent"); Displaying log messages. Two ways: –Programatically: LogComponentEnable("OlsrAgent", LOG_LEVEL_ALL); –From the environment: NS_LOG="OlsrAgent"./my-program Konstantinos Katsaros 9

Visualization Not integrated (directly) with ns-3 Ns-3 creates “animation” file, visualizers use this as input and create the animation. –netanim, pyviz, and nam for ns-3 Konstantinos Katsaros 10

NetAnim 3.0 Features Animate wired-links and wireless- links based simulations. LTE-packets cannot be animated, but topology will be shown Complete redesign using the QGraphics framework Packet statistics with filter Node position statistics with node trajectory (path of a mobile node) plotting Improved window re-sizing and zooming Konstantinos Katsaros 11

Adding New Module In order to create a new module in the NS3, just run the create-module.py script that will create the basic structure of the module (examples, helper, test, model and the appropriate wscript ). As of ns-3.13 there is no need to add the module in ns3 wscript, it is done automatically. Usage:./create-module.py [options] modulename Then clean the project, configure and re-build it %./waf distclean %./waf configure %./waf Konstantinos Katsaros 12

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

Distributed Simulation with MPI  MPI: Message Passing Interface  Library (and protocol) for distributed applications  MPI simulator (as of ns-3.8) System Ids  Nodes in the simulation assigned different System Ids  Nodes with different System Ids run on different cluster machines  Nodes on different machines may communication using p2p links only Konstantinos Katsaros 14 Node 1 SystemId 1 Node 2 SystemId 1 Node 3 SystemId 2 Node 5 SystemId 2 Node 4 SystemId 2 Point-to-point Link (simulation and real world) Node 0 SystemId 1

Emulation Support moving between simulation and testbeds or live systems A real-time scheduler, and support for two modes of emulation –GlobalValue::Bind (“SimulatorImplementationType”, StringValue (“ns3::RealTimeSimulatorImpl”)); Konstantinos Katsaros 15

Acknowledgements  Special thanks to:  Mathieu Lacage  Tom Henderson  Gustavo Carneiro For borrowing parts of their slides Konstantinos Katsaros 16