Introduction to Mobility & Network Simulator 2 (NS-2)

Slides:



Advertisements
Similar presentations
4/5/20151 Mobile Ad hoc Networks COE 549 Mobility Models II Group Mobility Tarek Sheltami KFUPM CCSE COE
Advertisements

An Introduction to NS-2 * Gayatri Swamynathan CS 276 TA *some slides are from a presentation by Haobo Yu & Nader Salehi, USC/ISI.
Ns-2 Tutorial Exercise (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Adopted from Nicolas’s slides Jianping Wang,
Ns-2 tutorial Karthik Sadasivam Banuprasad Samudrala CSCI 5931 Network Security Instructor : Dr. T. Andrew Yang.
Network Simulator (NS) Prof. Nelson L. S. da Fonseca State University of Campinas, Brazil.
How to Add a New Protocol in NS2 Xu Leiming CSCW Lab. at CS Dept., Tsinghua Univ. June 1, 2001.
5-Jul-141 S.Pushpalatha, Associate Professor, PSNACET.
Improving TCP Performance over Mobile Ad Hoc Networks by Exploiting Cross- Layer Information Awareness Xin Yu Department Of Computer Science New York University,
Generated Waypoint Efficiency: The efficiency considered here is defined as follows: As can be seen from the graph, for the obstruction radius values (200,
SLAW: A Mobility Model for Human Walks Lee et al..
Introduction to Wireless simulations Shao-Cheng Wang.
Simulation of GPRS MS-BS Interface Using ns-Network Simulator Dual Degree Presentation by Richa Jain (96D07007) Department of Electrical Engineering, Indian.
MANETs Routing Dr. Raad S. Al-Qassas Department of Computer Science PSUT
Mobile Ad hoc Networks COE 549 Mobility Models I
1 Perfect Simulation and Stationarity of a Class of Mobility Models Jean-Yves Le Boudec (EPFL) Milan Vojnovic (Microsoft Research Cambridge)
Network Simulator 2 Tejas Vasavada.
An Analysis of the Optimum Node Density for Ad hoc Mobile Networks Elizabeth M. Royer, P. Michael Melliar-Smith and Louise E. Moser Presented by Aki Happonen.
1 Network Simulator (NS-2). 2 講義 Network Simulator (NS2) Part 1: 下載 Part 2: 安裝與測試 Part 3: 劇本 Part 4: 數據.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Mobile Ad Hoc Networks Mobility (II) 11th Week
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Mobile Ad Hoc Networks Mobility (III) 12th Week
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
WSN Simulation Template for OMNeT++
Yinfei Pan SUNY Binghamton Computer Science
EECS122 - UCB1 Project 3: ns Simulation of Application-Level Routing Improve the application performance by user-level / application-level routing. Understand.
General Ripple Mobility Model Chun-Hung Chen Dept. of CSIE National Taipei University of Technology.
Mobility Models in Mobile Ad Hoc Networks Chun-Hung Chen 2005 Mar 8 th Dept. of Computer Science and Information Engineering National Taipei University.
17/10/2003TCP performance over ad-hoc mobile networks. 1 LCCN – summer 2003 Uri Silbershtein Roi Dayagi Nir Hasson.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Impact of Different Mobility Models on Connectivity Probability of a Wireless Ad Hoc Network Tatiana K. Madsen, Frank H.P. Fitzek, Ramjee Prasad [tatiana.
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI September 10th, 1999.
Wireless Sensor Network for Tracking the Traffic in INTERNET Network Routers Supervisor: Mark Shifrin Students: Yuriy Kipnis Nir Bar-Or Networked Software.
Ns Simulation of IEEE SC546 Project (Fall 2002) SOO IL KIM JISUN YOON
Simulators for Sensor Networks Sagnik Bhattacharya 9/12/2001.
Introduction to ns-2 Noun Choi Oct. 11, Outline Background ns-2 Internals Short demo Troubleshooting Reference links Q & A.
NetSim ZigBee Simulation Code Walkthrough in 10 steps
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
1 Introduction to Ns-2 Zhibin WU WINLAB, ECE Dept. Rutgers U.
1 / 10 Mobile Networking in ns Speaker : Mark Yang
NS2 - Wireless Network Ming-Feng Yang. 2 2 Outline Basic wireless model Extensions wireless model Example - Ad hoc network Example – WLAN Example – Mobile.
Routing Protocol Evaluation David Holmer
Define options(1/2) #channel type set val(chan) Channel/WirelessChannel # radio-propagation model set val(prop) Propagation/TwoRayGround # network interface.
MOBILE IP SOMULATION IN NS2 Presenter: 吳寶緣. Outlines  Overview  Hierarchical Address Format  Hierarchical Address Format-ex  MoblieIP Demo  Additional.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.
Quality evaluation of MPEG4 video transmission over GPRS networks.. Presented by: Abdullah M. Rana Multimedia Communication.
Network Simulator 2. Introduction Open source network simulator NS uses two languages: C++ and OTcl  C++ is fast to run but slower to change Kernel 
CDA6530: Performance Models of Computers and Networks Chapter 10: Introduction to Network Simulator (NS2) TexPoint fonts used in EMF. Read the TexPoint.
An Energy Efficient MAC Protocol for Wireless LANs, E.-S. Jung and N.H. Vaidya, INFOCOM 2002, June 2002 吳豐州.
© 2008 Frans Ekman Mobility Models for Mobile Ad Hoc Network Simulations Frans Ekman Supervisor: Jörg Ott Instructor: Jouni Karvo.
Use of Mobility models in ns-2 Karthik Dantu Shyam Kapadia.
Mobility Models for Wireless Ad Hoc Network Research EECS 600 Advanced Network Research, Spring 2005 Instructor: Shudong Jin March 28, 2005.
Chapter 14 : Modeling Mobility Andreas Berl. 2 Motivation  Wireless network simulations often involve movements of entities  Examples  Users are roaming.
IP-BASED MOBILITY FOR WIRELESS LANS WITH THE NETWORK SIMULATOR NS Frank Christahl, Andreas Huber, Matthias Rosenschon University of Applied Sciences Giessen-Friedberg.
Network Simulator with Mobile IP 2003 Huang – Yu Liu.
A Standard Measure of Mobility for Evaluating Mobile Ad Hoc Network Performance By Joseph Charboneau Karthik Raman.
Using Ant Agents to Combine Reactive and Proactive strategies for Routing in Mobile Ad Hoc Networks Fredrick Ducatelle, Gianni di caro, and Luca Maria.
1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Christian Schindelhauer Algorithms for Radio Networks Winter Term 2005/2006.
Copyright © 2002 OPNET Technologies, Inc. 1 Random Waypoint Mobility Model Empirical Analysis of the Mobility Factor for the Random Waypoint Model 1542.
I owa S tate U niversity Laboratory for Advanced Networks (LAN) Coverage and Connectivity Control of Wireless Sensor Networks under Mobility Qiang QiuAhmed.
Performance Comparison of Ad Hoc Network Routing Protocols Presented by Venkata Suresh Tamminiedi Computer Science Department Georgia State University.
VADD: Vehicle-Assisted Data Delivery in Vehicular Ad Hoc Networks Zhao, J.; Cao, G. IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, 鄭宇辰
GeoTORA: A Protocol for Geocasting in Mobile Ad Hoc Networks
Basics of NS-2 Training in TCL script
Analysis the performance of vehicles ad hoc network simulation based
Mesh-based Geocast Routing Protocols in an Ad Hoc Network
What is Mobile Network? Why is it called Ad Hoc?
Planned Activities on Computer Networks for Sunday Academy
Karthik Sadasivam Banuprasad Samudrala
Network Performance modelling and simulation
TexPoint fonts used in EMF.
Presentation transcript:

Introduction to Mobility & Network Simulator 2 (NS-2) Mahmood Hasanlou m_hasanlou@ce.sharif.edu Department of Computer Engineering Sharif University of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Random Walk Mobility Model Since many entities in nature move in extremely unpredictable ways, the Random Walk Mobility Model was developed to mimic this erratic movement In this mobility model, an MN moves from its current location to a new location by randomly choosing a direction and speed in which to travel The new speed and direction are both chosen from pre-defined ranges, [speedmin; speedmax] and [0;2p] respectively Sharif university of Technology

Random Walk Mobility Model Each movement in the Random Walk Mobility Model occurs in either a constant time interval t or a constant distance traveled d, at the end of which a new direction and speed are calculated If an MN which moves according to this model reaches a simulation boundary, it “bounces” off the simulation border with an angle determined by the incoming direction The MN then continues along this new path Sharif university of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Random Waypoint Mobility Model (RWPM) The Random Waypoint Mobility Model includes pause times between changes in direction and/or speed An MN begins by staying in one location for a certain period of time (i.e., a pause time) Once this time expires, the MN chooses a random destination in the simulation area and a speed that is uniformly distributed between [minspeed, maxspeed] Sharif university of Technology

Random Waypoint Mobility Model (RWPM) The MN then travels toward the newly chosen destination at the selected speed Upon arrival, the MN pauses for a specified time period before starting the process again We note that the movement pattern of an MN using the Random Waypoint Mobility Model is similar to the Random Walk Mobility Model if pause time is zero and [minspeed, maxspeed] = [speedmin, speedmax] Sharif university of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Network Simulator (NS) ns is an object oriented simulator, written in C++, with an OTcl interpreter as a frontend The simulator supports a class hierarchy in C++ (also called the compiled hierarchy in this document), and a similar class hierarchy within the OTcl interpreter (also called the interpreted hierarchy in this document) The two hierarchies are closely related to each other; from the user’s perspective, there is a one-to-one correspondence between a class in the interpreted hierarchy and one in the compiled hierarchy The root of this hierarchy is the class TclObject Sharif university of Technology

Network Simulator (NS) Users create new simulator objects through the interpreter; these objects are instantiated within the interpreter, and are closely mirrored by a corresponding object in the compiled hierarchy The interpreted class hierarchy is automatically established through methods defined in the class TclClass user instantiated objects are mirrored through methods defined in the class TclObject Sharif university of Technology

Sharif university of Technology Why two languages? ns uses two languages because simulator has two different kinds of things it needs to do On one hand, detailed simulations of protocols requires a systems programming language which can efficiently manipulate bytes, packet headers, and implement algorithms that run over large data sets For these tasks run-time speed is important and turn-aroundtime (run simulation, find bug, fix bug, recompile, re-run) is less important Sharif university of Technology

Sharif university of Technology Why two languages? On the other hand, a large part of network research involves slightly varying parameters or configurations, or quickly exploring a number of scenarios In these cases, iteration time (change the model and re-run) is more important Since configuration runs once (at the beginning of the simulation), run-time of this part of the task is less important Sharif university of Technology

Sharif university of Technology Why two languages? ns meets both of these needs with two languages, C++ and OTcl C++ is fast to run but slower to change, making it suitable for detailed protocol implementation OTcl runs much slower but can be changed very quickly (and interactively), making it ideal for simulation configuration Sharif university of Technology

Which language for what? Having two languages raises the question of which language should be used for what purpose Our basic advice is to use OTcl: for configuration, setup, and “one-time” stuff if you can do what you want by manipulating existing C++ objects and use C++: if you are doing anything that requires processing each packet of a flow if you have to change the behavior of an existing C++ class in ways that weren’t anticipated Sharif university of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Mobile Networking in ns The functions and procedures described in this subsection can be found in ~ns/mobilenode.{cc,h}, ~ns/tcl/lib/ns-mobilenode.tcl, ~ns/tcl/mobility/dsdv.tcl, ~ns/tcl/mobility/dsr.tcl, ~ns/tcl/mobility/tora.tcl Example scripts can be found in ~ns/tcl/ex/wireless-test.tcl and ~ns/tcl/ex/wireless.tcl Sharif university of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Sharif university of Technology Simulation Scenario We start by presenting simple script that run single TCP connection over 3-nodes over an area of size 500m over 400m The location process is as follow : The initial locations of nodes 0, 1 and 2 are respectively (5,5), (490,285) and (150,240) At time 10, node 0 starts moving towards point (250,250) at a speed of 3m/s At time 15, node 1 starts moving towards point (45,285) at a speed of 5m/s At time 20, node 0 starts moving towards point (480,300) at a speed of 5m/s Node 2 is still throughout the simulation The simulation lasts 150s. At time 10 a TCP connection is initiated between node 0 and node 1 Sharif university of Technology

Sharif university of Technology Writing the TCL script We begin by specifying some basic parameters for the simulation : set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) Mac/802_11 set val(ifq) Queue/DropTail/PriQueue set val(ll) LL set val(ant) Antenna/OmniAntenna set val(ifqlen) 50 ;# max packet in ifq set val(x) 800;# X dimension of the topography set val(y) 800;# Y dimension of the topography set val(nn) 30 ;# number of nodes set val(rp) DSDV set val(stop) 150 ;# simulation time These parameters are used in configuring of the nodes Sharif university of Technology

Configures of a mobile node $ns_ node-config -adhocRouting $val(rp) -llType $val(ll) -macType $val(mac) -ifqType $val(ifq) -ifqLen $val(ifqlen) -antType $val(ant) -propType val(prop) -phyType $val(netif) -channelType val(chan) -topoInstance $topo -agentTrace ON -routerTrace ON -macTrace OFF -MovementTrace ON For {set $i 0} {$i < $val(nn)} {incr $i} { set node_($i) [$ns node] } Sharif university of Technology

Initial location and movement of nodes The initial location of node 0 given as follows : $node_(0) set X_ 5.0 $node_(0) set Y_ 5.0 $node_(0) set Z_ 5.0 A linear movement of a node is generated by specifying the time in which it start, the x and y values of the target point and the speed: $ns at 15.0 “$node_(1) setdest 45.0 285.0 5.0” Sharif university of Technology

Sharif university of Technology Ending the simulation We need to create the initial node position for nam using For {set $i 0} {$i < $val(nn)} {incr $i} { $ns initial_node_pos $node_($i) 30 } We tell nodes when the simulation ends with : $ns at $val(stop) “node_($i) reset” Sharif university of Technology

Sharif university of Technology Outline Random Walk Mobility Model Random Waypoint Mobility Model Network Simulator Mobile Networking in ns Simulation Scenario Home Work 2 Sharif university of Technology

Sharif university of Technology Home Work 2 You must look at the mobile node source code and determine which of the mobility models support in it ? You simulate a scenario and obtain it’s result with mobility model that exist Then you must change that mobility model to another You simulate your scenario again with this new mobility model and compare the result of this by previous results Scenario is the same scenario of the HW1 Sharif university of Technology

Sharif university of Technology Refrence A collaboration between researchers at UC Berkeley, LBL, USC/ISI, and Xerox PARC, “The NS Manual”, 2005 Lecture Notes 2003-2004 Univ. de Los andes, Merida, Venezuela, and ESSI, “NS simulator for beginners” Tracy Camp, Jeff Boleng, Vanessa Davies, “A Survey of Mobility Models for Ad Hoc Network Research” , 2002 Sharif university of Technology