introduction to ns 3
play

Introduction to NS-3 Konstantinos Katsaros k.katsaros @ - PowerPoint PPT Presentation

Introduction to NS-3 Konstantinos Katsaros k.katsaros @ surrey.ac.uk Centre for Communications System Research University of Surrey System Level Simulations - Technical Club Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement


  1. Introduction to NS-3 Konstantinos Katsaros k.katsaros @ surrey.ac.uk Centre for Communications System Research University of Surrey System Level Simulations - Technical Club

  2. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement Outline Introduction 1 NS-3 Modules 2 LTE Module 3 WiFi Example 4 K. Katsaros Introduction to NS-3 04/07/13 2 / 33

  3. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Introduction ns-3 is written in C++, with bindings available for Python simulation programs are C++ executables or Python programs ∼ 300,000 lines of mostly C++ (estimate based on cloc source code analysis) ns-3 is a GNU GPLv2-licensed project ns-3 is mainly supported for Linux, OS X, and FreeBSD ns-3 is not backwards-compatible with ns-2 K. Katsaros Introduction to NS-3 04/07/13 3 / 33

  4. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Where to get it Where do I get ns-3? - http://www.nsnam.org Where do I get today’s code? Download the latest release: - wget http://www.nsnam.org/releases/ns-allinone-3.17.tar.bz2 - tar xjf ns-allinone-3.17.tar.bz2 Clone the latest development code 1 : - hg clone http://code.nsnam.org/ns-3-allinone 1 Mercurial is used as source code control tool K. Katsaros Introduction to NS-3 04/07/13 4 / 33

  5. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Current Modules in main NS-3 tree Network: Node, Sockets, Queues, Packet, etc Core: Smart Pointers, Callbacks, Event, Scheduler, Logging, Tracing, etc K. Katsaros Introduction to NS-3 04/07/13 5 / 33

  6. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Module Organization model/ ← contains source code for main part of module helper/ ← contains code for helper classes examples/ tests/ bindings/ ← files related to python doc/ wscript ← the “Makefile" equivalent K. Katsaros Introduction to NS-3 04/07/13 6 / 33

  7. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Helper API The ns-3 “helper API" provides a set of classes and methods that make common operations easier than using the low-level API Consists of: - container objects - helper classes The helper API is implemented using the low-level API Users are encouraged to contribute or propose improvements to the ns-3 helper API K. Katsaros Introduction to NS-3 04/07/13 7 / 33

  8. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Building NS-3 Waf is a Python-based framework for configuring, compiling and installing applications. It is a replacement for other tools such as Autotools, CMake or Ant http://code.google.com/p/waf/ For those familiar with autotools: configure → ./waf configure make → ./waf build K. Katsaros Introduction to NS-3 04/07/13 8 / 33

  9. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Discrete-event simulations Simulation time moves in discrete jumps from event to event C++ functions schedule events to occur at specific simulation times A simulation scheduler orders the event execution Simulator::Run() gets it all started Simulation stops at specific time or when events end K. Katsaros Introduction to NS-3 04/07/13 9 / 33

  10. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Time in NS-3 Time is stored as a large integer in ns-3 - Avoid floating point discrepancies across platforms Special Time classes are provided to manipulate time (such as standard operators) Default time resolution is nanoseconds, but can be set to other resolutions Time objects can be set by floating-point values and can export floating-point: double timeDouble = t.GetSeconds(); K. Katsaros Introduction to NS-3 04/07/13 10 / 33

  11. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 NS-3 API Most of the ns-3 API is documented with Doxygen ( http://www.doxygen.org/ ) K. Katsaros Introduction to NS-3 04/07/13 11 / 33

  12. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Scalability Distributed simulation in ns-3 allows a user to run a single simulation in parallel on multiple processors By assigning a different rank to nodes and connecting these nodes with point-to-point links, simulator boundaries are created Simulator boundaries divide Logical Processes (LPs), and each LP can be executed by a different processor Distributed simulation in ns-3 offers solid performance gains in time of execution for large topologies Simulation on a HPC cluster at the U.S. Mobile Network Modeling Institute (2011) 2 - 176 cores, 3 TB of memory - 360,448,000 simulated nodes - 413,704.52 packet receive events per second [wall-clock] 2 K. Renard et al, “A Performance and Scalability Evaluation of the NS-3 Distributed Scheduler. Proceedings of WNS3 2012 K. Katsaros Introduction to NS-3 04/07/13 12 / 33

  13. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Attribute System Problem : Researchers want to identify all of the values affecting the results of their simulations and configure them easily ns-3 solution : Each ns-3 object has a set of attributes: - A name, help text - A type - An initial value Control all simulation parameters for static objects Dump and read them all in configuration files Visualize them in a GUI Makes it easy to verify the parameters of a simulation List of all attributes in the API: http://www.nsnam.org/docs/release/3.17/doxygen/group___ attribute_list.html K. Katsaros Introduction to NS-3 04/07/13 13 / 33

  14. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Tracing System Simulator provides a set of pre-configured trace sources - Users may edit the core to add their own Users provide trace sinks and attach to the trace source -Simulator core provides a few examples for common cases Multiple trace sources can connect to a trace sink List of all trace sources in the API: http://www.nsnam.org/docs/release/3.17/doxygen/group_ __trace_source_list.html K. Katsaros Introduction to NS-3 04/07/13 14 / 33

  15. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 FlowMonitor Network monitoring framework found in src/flow-monitor/ Goals: - detect all flows passing through network - stores metrics for analysis such as throughput, duration, delays, packet sizes, packet loss ratios Currently works ONLY on IPv4 packets. K. Katsaros Introduction to NS-3 04/07/13 15 / 33

  16. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 NetAnim Animate packets over wired-links and wireless- links - limited support for LTE traces Packet timeline with regex filter on packet meta-data. Node position statistics with node trajectory plotting (path of a mobile node). Print brief packet meta-data on packets K. Katsaros Introduction to NS-3 04/07/13 16 / 33

  17. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 LTE module - Design FemtoForum LTE MAC Scheduler API Radio signal model granularity: Resource Block - Symbol-level model not affordable - Simplified Channel PHY model Realistic Data Plane Protocol stack model - Realistic RLC, PDCP, S1-U, X2-U - Allow proper interaction with IP networking - Allow end-to-end QoE evaluations Hybrid Control Plane model: - Realistic RRC model - Simplified S1-C, X2-C and S11 models Simplified EPC - One MME and one SGW - SGW and PGW in the same node (no S5/S8 interface) Focus on connected mode - RRC connected, EMM Registered, ECM connected K. Katsaros Introduction to NS-3 04/07/13 17 / 33

  18. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Model Overview K. Katsaros Introduction to NS-3 04/07/13 18 / 33

  19. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 Propagation Models Buildings model - Add buildings to network topology Path loss model - Okumura Hata (outdoor) - ITU-R P1411 LOS & NLOS (outdoor) - ITU-R P1238 (indoor) - External & internal wall losses - Log-normal shadowing - Pathloss logic chooses correct model depending on node position Fast fading model - Trace-based - Freq. and time dependent Antenna models - Isotropic - Sectorial (cosine & parabolic shape) K. Katsaros Introduction to NS-3 04/07/13 19 / 33

  20. Introduction NS-3 Modules LTE Module WiFi Example Acknoledgement FakeTitle1 PHY model Only FDD is modelled Freq domain granularity: RB Time domain granularity: 1 TTI, further divided into - DL: ctrl, data - UL: ctrl+data, SRS Gaussian Interference model CQI feedback Signal processing not modelled accurately → use error model SISO propagation model MIMO modeled as SINR gain over SISO - different gains for different TX modes Supports different freqs and bandwidths per eNB - leveraging on the ns-3 Spectrum module K. Katsaros Introduction to NS-3 04/07/13 20 / 33

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend