Introduction to Network Simulator NS-2 Part II

Slides:



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

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.
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
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.
A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols By Josh Broch, David A. Maltz, David B. Johnson, Yih- Chun Hu, Jorjeta.
Network Simulator 2 Tejas Vasavada.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2003) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
Yinfei Pan SUNY Binghamton Computer Science
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Submitters: Stella Pantofel Michael Halperin Igor Berman
Jump to first page NS Tutorial: mobile and wireless network simulation Ya Xu USC/ISI September 10th, 1999.
Better Behaved, Better Performing Multimedia Networking Jae Chung and Mark Claypool Computer Science Department Worcester Polytechnic Institute Proceedings.
EECS122 - UCB1 Measurements and Modeling Table of Contents 1. Measurements Measurements 2. Modeling and its Shortcomings Modeling and its Shortcomings.
Ns Simulation of IEEE SC546 Project (Fall 2002) SOO IL KIM JISUN YOON
Routing in Mobile Ad-Hoc Networks An M.Tech. Project by Srinath Perur Guide: Prof. Sridhar Iyer.
Ad Hoc Wireless Routing COS 461: Computer Networks
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Defining the IP Packet Delivery Process INTRO v2.0—4-1.
1 Intermediate report on Performance Analysis of Zigbee Wireless Personal Area Networks By, Vaddina Prakash Rao Under.
Network Simulator 2(NS2) Yingyue Xu 8/25/2015. Overview: The Network simulator (NS): discrete event simulator for networks. supports wired, wireless,
Performance Validation of Mobile IP Wireless Networks Syed Shahzad Ali Muhammad Saqib Ilyas Advisor: Dr. Ravi Pendse.
Wireless Networking and Systems CSE 590 ns2 tutorial.
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.
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.
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.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Role and Mechanism of Queue Internet Engineering.
Network Protocols A network protocol defines the structure of messages sent over the network We will only talk about the Internet Network protocols need.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Dynamic Source Routing (DSR) Sandeep Gupta M.Tech - WCC.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
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.
Background of Wireless Communication Student Presentations and Projects Wireless Communication Technology Wireless Networking and Mobile IP Wireless Local.
Quality evaluation of MPEG4 video transmission over GPRS networks.. Presented by: Abdullah M. Rana Multimedia Communication.
DRP: An Efficient Directional Routing Protocol for Mobile Ad Hoc Networks Hrishikesh Gossain Mesh Networks Product Group, Motorola Tarun Joshi, Dharma.
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.
Understanding IPv6 Slide: 1 Lesson 12 IPv6 Mobility.
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.
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.
The Creation of NS2 Simulated Environment ( 1 ) LI Chengbo
Use of Mobility models in ns-2 Karthik Dantu Shyam Kapadia.
Linux Operations and Administration Chapter Eight Network Communications.
July 7, 2003 Building a Wireless LAN traffic test case in ns2 Radio Science Laboratory Department of Electrical and Computer Engineering The University.
Ad Hoc On-Demand Distance Vector Routing (AODV) ietf
Improving Fault Tolerance in AODV Matthew J. Miller Jungmin So.
J. Liebeher (modified by M. Veeraraghavan) 1 Introduction Complexity of networking: An example Layered communications The TCP/IP protocol suite.
FAMU-FSU COLLEGE OF ENGINEERING Department of Electrical and Computer Engineering Students: Hung Khong – Derek Vollmer Instructor: Dr Ming Yu Computer.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Performance Comparison of Ad Hoc Network Routing Protocols Presented by Venkata Suresh Tamminiedi Computer Science Department Georgia State University.
Chapter 19 Network Layer Protocols
A quick intro to networking
Chapter 16 Mobile Networking in ns
Mobicom ‘99 Per Johansson, Tony Larsson, Nicklas Hedman
Introduction to ns-2: “The” Network Simulator
A comparison of Ad-Hoc Routing Protocols
Process-to-Process Delivery:
46 to 1500 bytes TYPE CODE CHECKSUM IDENTIFIER SEQUENCE NUMBER OPTIONAL DATA ICMP Echo message.
TexPoint fonts used in EMF.
A Routing Protocol for WLAN Mesh
Process-to-Process Delivery: UDP, TCP
32 bit destination IP address
Presentation transcript:

Introduction to Network Simulator NS-2 Part II King Fahd University of Petroleum and Minerals Computer Engineering Department Introduction to Network Simulator NS-2 Part II Wireless Mobile Ad hoc Networks COE 549 Anas Alroubaiey

Outlines Wireless TCL script How to build wireless scenarios Mobility and traffic (setdest & cbrgen.tcl) DSR trace file Using AWK for calculating Routing overhead PDR( Packet Delivery Ratio)

Wireless TCL Script (1/3) Mobile node parameters Channel type    (Channel/WirelessChannel) Propagation model    (Propagation/TwoRayGround) Interface type    (Phy/WirelessPhy) MAC layer protocol    (Mac/802_11) Routing protocol    (DSR) Interface Queue type    (CMUPriQueue - for DSR) Interface Queue Length    (50) Antenna type    (Antenna/OmniAntenna) LL type    (LL) Read chapter 16 in ns-documentation Use wireless.tcl example in tcl\ex folder

Wireless TCL Script (2/3) # unity gain, omni-directional antennas # set up the antennas to be centered in the node and 1.5 meters above it Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 1.5 Antenna/OmniAntenna set Gt_ 1.0 Antenna/OmniAntenna set Gr_ 1.0

Wireless TCL Script(3/3) How to reduce the trace output file size set AgentTrace              ON set RouterTrace             ON set MacTrace                  ON Generating data traffic and mobility scenarios set val(cp) "../mobility/scene/cbr-3-test" set val(sc) "../mobility/scene/scen-3-test"

Wireless Scenario (Mobility) Provide initial (X,Y, for now Z=0) co-ordinates for mobile nodes $node_(0) set X_ 5.0 $node_(0) set Y_ 2.0 $node_(0) set Z_ 0.0   $node_(1) set X_ 390.0 $node_(1) set Y_ 385.0 $node_(1) set Z_ 0.0 Now produce some simple node movements # Node_(1) starts to move towards node_(0) $ns_ at 50.0 "$node_(1) setdest 25.0 20.0 0.0" $ns_ at 10.0 "$node_(0) setdest 20.0 18.0 0.0" # Node_(1) then starts to move away from node_(0) $ns_ at 100.0 "$node_(1) setdest 490.0 480.0 0.0"

Wireless scenario ( Traffic) # Setup traffic flow between nodes # TCP connections between node_(0) and node_(1) set tcp [new Agent/TCP] $tcp set class_ 2 set sink [new Agent/TCPSink] $ns_ attach-agent $node_(0) $tcp $ns_ attach-agent $node_(1) $sink $ns_ connect $tcp $sink set ftp [new Application/FTP] $ftp attach-agent $tcp $ns_ at 10.0 "$ftp start"

Setdet A script has been provided which generates these movements automatically in a separate file To generate this, use the setdest script present in ns/indep-utils/cmu-scen-gen/ directory. Examples: setdest -v 1 -n 20 -p 2.0 -M 10.0 -t 200 -x 500 -y 500 > scen-20_v1.tcl setdest -v 2 -n 20 -s 1 -m 1 -M 10.0 -t 200 -P 1 -p 2.0 -x 500 -y 500 > scen- 20_v2.tcl

Cbrgen.tcl Generates traffic automatically in a separate file script present in ns/indep-utils/cmu-scen-gen/ directory ns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed] [-mc connections][-rate rate] >output.tcl Example: ns cbrgen.tcl –type cbr –nn 50 –seed 1 –mc 10 –rate 4 > cbr- 50-10-4

A Typical DSR trace format (1/3) s 606.210364161 _39_ RTR  --- 1306 DSR 44 [13a a 27 800] ------- [39:255 8:255 255 8] 2 [0 0] [0 0 0 0->0] [1 1 8 39->10] s: means send 606.210364161: time stamp _39_:  node id RTR: means router message 1306: uid of this packet DSR: DSR agent 44: size in the common header hdr_cmn() [13a a 27 800] MAC detail:  13a: means the expected transmission time ( note that packet size is large, 44 bytes, 314second?)                                a: means the receiving node: 10                               27: means the sending node is 39                               800:  IP header: 0x0800, (ETHERTYPE_ARP is 0x0806)

DSR Trace Format (2/3) [39:255 8:255 255 8] IP detail: src address: IP 39 means 0.0.0.39                          port 255                          dst address: IP 8 means 0.0.0.8                          port 255                          TTL: 255                           Next-hop: 8 TTL (time to live ) you can use it to know the number of hops

DSR Trace Format (3/3) 2 [0 0] [0 0 0 0->0] [1 1 8 39->10] DSR detail: 2:  num_addrs() [0 0] route-request option, this is not a route request, the second 0 is labeled for sequence number [0 0 0 0->0]  route-reply option: [ " route-reply?" "Rreq seqno" "reply length" "dst of src  route", "src of the src route"] [1 1 8 39->10], 1: shows this is a route error                           1: number of route errors                           8: tp notify node 8.                            39->10: link 39-10 is broken 

Calculating Routing Overhead & PDR sum of routing packets / sum of data packets PDR = Packet Delivery Ratio PDR = sum of packets sent/ sum of successfully received packets How to extract the number of Routing packets $cat out.tr |grep "^s.*MAC.*DSR" | wc –l Data packets $cat out.tr |grep "^s.*MAC.*cbr" | wc –l

Routing Overhead (AWK code) BEGIN {dsrpktno = 0; dsrbyte = 0; cbrpktno = 0; cbrbyte = 0; } { $1~/s/ && /DSR/ && /MAC/  { dsrpktno ++ ;  dsrbyte+=$8 ;} $1~/s/ && /cbr/ && /MAC/ { cbrpktno ++ ;  cbrbyte+=$8; } }  END { print ( dsrpktno/cbrpktno, dsrbyte /cbrbyte) }

PDR (AWK code) BEGIN {Scbr=0; Rcbr=0; } { $1~/s/ && /cbr/ && /AGT/  { Scbr ++ ;} $1~/r/ && /cbr/ && /AGT/ { Rcbr++ ;} }  END { print ( “PDR=“,Scbr/Rcbr) }

References http://www.winlab.rutgers.edu/%7Ezhibinwu/html/dsr_trace_anlysis.html http://www.winlab.rutgers.edu/~zhibinwu/html/network_simulator_2.html http://www.isi.edu/nsnam/ns/ns-documentation.html