MOBILE IP SOMULATION IN NS2 Presenter: 吳寶緣. Outlines  Overview  Hierarchical Address Format  Hierarchical Address Format-ex  MoblieIP Demo  Additional.

Slides:



Advertisements
Similar presentations
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI June 18, 1999.
Advertisements

How (not) to Simulate Wireless Networks with ns Brad Karp University College London ns Workshop MSR Cambridge 9 th December, 2005.
Wireless world in NS Padma Haldar USC/ISI.
1 NS Fundamentals (contd..) Padma Haldar USC/ISI.
Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-
Brief Intro to ns2: The most widely used Network Simulator COMP5416 Advanced Network Technologies Based on: Marc Greis's
NS Tutorial (For CMPE 252 A) By Duy Nguyen 10/25/2012.
Network Simulator (NS) Prof. Nelson L. S. da Fonseca State University of Campinas, Brazil.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
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.
Network Simulator 2 Tejas Vasavada.
1 Network Simulator (NS-2). 2 講義 Network Simulator (NS2) Part 1: 下載 Part 2: 安裝與測試 Part 3: 劇本 Part 4: 數據.
Performance Comparison of Routing Protocols for Ad Hoc Networks PATTERN ENDIF Ferrara.
IEEE OpComm 2006, Berlin, Germany 18. September 2006 A Study of On-Off Attack Models for Wireless Ad Hoc Networks L. Felipe Perrone Dept. of Computer Science.
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
Landmark Routing for Large Ad Hoc Wireless Networks Globecom 2000 San Francisco, Nov 30, 2000 Mario Gerla, Xiaoyan Hong and Gary Pei Computer Science Department.
Yinfei Pan SUNY Binghamton Computer Science
Component-Based Routing for Mobile Ad Hoc Networks Chunyue Liu, Tarek Saadawi & Myung Lee CUNY, City College.
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI September 10th, 1999.
1 2nd European ns-2 Workshop Polly Huang ETH Zurich April 18 & 19, 2001.
Ns Simulation of IEEE SC546 Project (Fall 2002) SOO IL KIM JISUN YOON
Introduction to Network Simulator NS-2 Part II
Simulators for Sensor Networks Sagnik Bhattacharya 9/12/2001.
Ad Hoc Wireless Routing COS 461: Computer Networks
Network Simulator 2(NS2) Yingyue Xu 8/25/2015. Overview: The Network simulator (NS): discrete event simulator for networks. supports wired, wireless,
QualNet 2014/05/ 尉遲仲涵. Outline Directory Structure QualNet Basic Message & Event QualNet simulation architecture Protocol Model Programming.
Wireless Networking and Systems CSE 590 ns2 tutorial.
Introduction to ns-2 Noun Choi Oct. 11, Outline Background ns-2 Internals Short demo Troubleshooting Reference links Q & A.
1 Introduction to Ns-2 Zhibin WU WINLAB, ECE Dept. Rutgers U.
1 / 10 Mobile Networking in ns Speaker : Mark Yang
Introduction to Mobility & Network Simulator 2 (NS-2)
NS2 - Wireless Network Ming-Feng Yang. 2 2 Outline Basic wireless model Extensions wireless model Example - Ad hoc network Example – WLAN Example – Mobile.
Define options(1/2) #channel type set val(chan) Channel/WirelessChannel # radio-propagation model set val(prop) Propagation/TwoRayGround # network interface.
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Internet Computing KUT Youn-Hee Han
Dynamic Source Routing (DSR) Sandeep Gupta M.Tech - WCC.
Network Simulator ns-2. 2 Agenda Introduction Interface Tcl and OTcl TclCL Simulator Wired network Wireless network Program Assignment.
Chapter 15 The Addressing Structure in NS. The Default Address Format 32 lower bits for port-id, 1 higher bit for mcast and the rest 32 higher bits for.
Quality evaluation of MPEG4 video transmission over GPRS networks.. Presented by: Abdullah M. Rana Multimedia Communication.
S Master’s thesis seminar 8th August 2006 QUALITY OF SERVICE AWARE ROUTING PROTOCOLS IN MOBILE AD HOC NETWORKS Thesis Author: Shan Gong Supervisor:Sven-Gustav.
1 Network Simulation and Testing Polly Huang EE NTU
1 NS Fundamentals. USC INFORMATION SCIENCES INSTITUTE 2 OTcl and C++: The Duality C++ OTcl Pure C++ objects Pure OTcl objects C++/OTcl split objects ns.
1 Introduction to NS-2 r Tutorial overview of NS m Create basic NS simulation r Walk-through a simple example m Model specification m Execution and trace.
Group Management in Mobile Ad Hoc Networks Revathi Ranganathan Preeti Venkateswaran.
Network Simulator Tutorial Wireless Networks. Acknowledgements Material is taken from the presentations by Jim Kurose, University of Massachusetts, Amherst.
CDA6530: Performance Models of Computers and Networks Chapter 10: Introduction to Network Simulator (NS2) TexPoint fonts used in EMF. Read the TexPoint.
The Creation of NS2 Simulated Environment ( 1 ) LI Chengbo
Use of Mobility models in ns-2 Karthik Dantu Shyam Kapadia.
July 7, 2003 Building a Wireless LAN traffic test case in ns2 Radio Science Laboratory Department of Electrical and Computer Engineering The University.
NS-2 Shahin Shayandeh December 2004 Session 1. Ns-2, the Network Simulator  A discrete event simulator Simple model  Focused on modeling network protocols.
Network Simulator with Mobile IP 2003 Huang – Yu Liu.
PERFORMANCE EVALUATION OF COMMON POWER ROUTING FOR AD-HOC NETWORK Zhan Liang Supervisor: Prof. Sven-Gustav Häggman Instructor: Researcher Boris Makarevitch.
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
Performance Comparison of Ad Hoc Network Routing Protocols Presented by Venkata Suresh Tamminiedi Computer Science Department Georgia State University.
1 Network Simulator 2 Install Chao-Ying Chiu
Basics of NS-2 Training in TCL script
Analysis the performance of vehicles ad hoc network simulation based
AODV-OLSR Scalable Ad hoc Routing
Chapter 16 Mobile Networking in ns
NS : The Network Simulator
Mobicom ‘99 Per Johansson, Tony Larsson, Nicklas Hedman
Introduction to ns-2: “The” Network Simulator
Planned Activities on Computer Networks for Sunday Academy
Ad hoc Routing Protocols
Distributed Routing Protocol in Wireless Network Simulation
Introduction to ns-2 Noun Choi Oct. 11, 2007.
TexPoint fonts used in EMF.
A Study of On-Off Attack Models for Wireless Ad Hoc Networks
Presentation transcript:

MOBILE IP SOMULATION IN NS2 Presenter: 吳寶緣

Outlines  Overview  Hierarchical Address Format  Hierarchical Address Format-ex  MoblieIP Demo  Additional Number of Node feature  Additional Movement of Node feature  Problems & Solutions

Overview  Multicast Address Format  Of the higher bits, 1 bit is assigned for multicast.  Address Space 32 bits for node id and 32 bits for port id, also  ~ns/tcl/lib/ns-address.tcl

Hierarchical Address Format  Default levels, 3 levels – (10, 11, 11) bits  (9, 11, 11) bits for multicast $ns set-address-format hierarchical  Specific hierarchical setting  For example: $ns set-address-format hierarchical  Splits into 2 levels, first level and second level are 8 and 15 bits, respectively

Hierarchical Address Format-ex  -  set ns [new Simulator]  $ns set-address-format hierarchical  $ns node-config -addressType hierarchical  -  AddParams set domain_num_ 2  AddParams set cluster_num_ 2 1  AddParams set nodes_num_ W(0) W(1) BS(0) node_(1) node_(0) node_(2) domain 0 domain 1 cluster 0 cluster 1 cluster 0 0,0,0 0,1,0 1,0,0 1,0,1 1,0,2 1,0,3

CHAPTER 16 MOBILE AND WIRELESS NETWORK SIMULATION

Outlines  Extend NS to support mobile and wireless application: Internal Implementation  Use NS to simulate wireless network  Feature summary

Abstract the real mobile world for simulation  Node  Packets  Wireless channel and channel access  Forwarding and routing  Radio propagation model  Trace/Visualization  Event scheduler to make everything running

Network Components inside a mobilenode  Link Layer  ARP  Interface Queue  Mac Layer: IEEE  Network Interface  Radio Propagation Model  Friss-space attenuation(1/ ) at near distance  Two ray Ground (1/ ) at far distance

Implementing mobile node by Extending “standard” NS node Classifier: Forwarding Agent: Protocol Entity Node Entry Node ARP Radio Propagation Model MobileNode LL MAC PHY LL CHANNEL LL MAC LL:Link layer object IFQ:Interface queue MAC:Mac object PHY PHY:Net interface Routing

Mobilenode Object Implemented in C++  The mobility features  node movement  periodic position updates  maintaining topology boundary  etc implemented in Otcl  MobileNode itself  Classifiers  Dmux  LL  Mac  Channel  etc

Outlines  Extend NS to support mobile and wireless application: Internal implementation  Use NS to simulate wireless network  Feature summary

A mobile node abstraction  Location  coordinates (x,y,z)  Movement  speed,direction, starting/ending location,time...  Forwarding  Network stack for channel access  IEEE

Creating Node movements  Start position:  $node set X_  $node set Y_  $node set Z_  Future destinations:  $ns at $time $node setdest  Ex: ns at 3.0 "$node (0) setdest  the third dimension (Z) is not used.

Creating Node movements  random movement  $mobilenode start  Set topology  set topo [new Topography]  $topo load_flatgrid $opt(x) $opt(y) opt(x) and opt(y) are the boundaries used in simulation

Network Components in a mobilenode  MobileNode method add-interface() in ~ns/tcl/lib/ns-mobilenode.tcl

MAC layer protocols  MAC protocol  See ~ns/mac-802_11.{cc,h} for implementation details.  Preamble based TDMA protocol  See ~ ~ns/mac-tdma.{cc,h}  ns supports a single hop, preamble-based TDMA MAC protocol  multi-hop environment are not considered  TDMA frame contains preamble data transmission slots  avoid unnecessary power consumption set_node_sleep().

Routing Agents  DSDV  messages are exchanged between neighbouring mobilenodes  ~ns/dsdv directory and ~ns/tcl/mobility/dsdv.tc  DSR  checks every data packet for source-route information. X-Routing queries  ~ns/tcl/mobility/dsr.tcl  TORA  ns/tora directory and ns/tcl/mobility/tora.tcl  AODV  ns/aodv and ns/tcl/lib/ns-lib.tcl

A simple wireless simulation(1)  Scenario  containing 3 mobile nodes  moving within 670mX670m flat topology  using DSDV ad hoc routing protocol  Random Waypoint mobility model  TCP and CBR traffic  See:  ns-2/tcl/ex/wireless-demo-csci694.tcl

A simple wireless simulation(2) set ns_ [new Simulator] ; create a ns simulator instance #Define Global Variables set topo [new Topography] ; create a topology and $topo load_flatgrid ; define it in 670x670 area

A simple wireless simulation (3) #Define standard ns/nam trace set tracefd [open 694demo.tr w] $ns_ trace-all $tracefd set namtrace [open 694demo.nam w] $ns_ namtrace-all-wireless $namtrace

A simple wireless simulation (4) #Create “God” set god_ [create-god 3] God is used to store an array of the shortest number of hops required to reach from one node to an other. For example: $ns_ at “$god_ setdist 2 3 1”

A simple wireless simulation (5) #Define how a mobile node should be created $ns_ node-config -adhocRouting DSDV\ -llType LL \ -macType Mac/802_11\ -ifqLen 50 \ -ifqType Queue/DropTail/PriQueue \ -antType Antenna/OmniAntenna \ -propType Propagation/TwoRayGround \ -phyType Phy/WirelessPhy \ -channelType Channel/WirelessChannel \ -topoInstance $topo -agentTrace ON \ -routerTrace OFF \ -macTrace OFF

A simple wireless simulation (6) #Create a mobile node and attach it to the channel set node [$ns_ node] $node random-motion 0 ;# disable random motion – Use “for loop” to create 3 nodes: for {set i < 0} {$i<3} {incr i} { set node_($i) [$ns_ node] }

A simple wireless example(7) #Define traffic model source traffic-scenario-files #Define node movement model source movement-scenario-files

A simple wireless example(8) #Define node initial position in nam for {set i 0} {$i < 3 } { incr i} { $ns_ initial_node_position $node_($i) 20 } #Tell ns/nam the simulation stop time $ns_ at “$ns_ nam-end-wireless ” $ns_ at “$ns_ halt” #Start your simulation $ns_ run

Wireless Scenario Generator(1)  Mobile Movement Generator./setdest -n -p pausetime -s -t -x -y See an example  Random movement $mobilenode start Source: See ns-2/indep-utils/cmu-scen-gen/setdest/

Wireless Scenario Generator(2)  Generating traffic pattern files  CBR traffic ns cbrgen.tcl [-type cbf|tcp] [-nn nodes] [- seed seed] [-mc connections] [-rate rate]  TCP traffic ns tcpgen.tcl [-nn nodes] [-seed seed] See an example Source: See ns-2/indep-utils/cmu-scen-gen/

Sensor Node extension  Node is energy-aware  Define node by adding new options: $ns_ node-config -energyModel EnergyModel -initialEnergy txPower0.6 -rxPower0.2

Demo  Wireless-demo-csci694.tcl  MobleIP.tcl

Outlines  Extend NS to support mobile and wireless application: Internal implementation  Use NS to simulate wireless network  Feature summary

Feature summary  Creating Wireless Node  Mac Layer:IEEE ,TDMA  Address Resolution Protocol (ARP)  Ad hoc routing protocols: DSDV, DSR,TORA, AODV  Radio Propagation Model  Friss-space attenuation at near distances  Two ray ground at far distances  Antenna: an omni-directional antenna having unity gain  Scenario generator for traffic and node movement

THE END

Appendix A: Movement file $node_(2) set Z_ $node_(2) set Y_ $node_(2) set X_ $node_(1) set Z_ $node_(1) set Y_ $node_(1) set X_ $node_(0) set Z_ $node_(0) set Y_ $node_(0) set X_ $ns_ at "$node_(2) setdest " $ns_ at "$node_(1) setdest " $ns_ at "$node_(0) setdest " Movement scenario generator cd ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest./setdest -n 3 -p 2.0 -s t 300 -x 670 -y 670 > pattern-file Num-of-nodesPause-timeMax-speedSim-timeTopo-boundary

Appendix B: Traffic Scenario set udp_(0) [new Agent/UDP] $ns_ attach-agent $node_(0) $udp_(0) set null_(0) [new Agent/Null] $ns_ attach-agent $node_(2) $null_(0) set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetSize_ 512 $cbr_(0) set interval_ 4.0 $cbr_(0) set random_ 1 $cbr_(0) set maxpkts_ $cbr_(0) attach-agent $udp_(0) $ns_ connect $udp_(0) $null_(0) $ns_ at "$cbr_(0) start" …….  Traffic scenario generator ns cbrgen.tcl -type tcp -nn 25 -seed 0.0 -mc 8 > pattern-file ns cbrgen.tcl -type cbr -nn 10 -seed 1.0 -mc 8 -rate 4.0 > pattern-file CBR-or-TCPNum-of-nodesRandom-seedMax-connectionCBR-rate