DMET 602: Networks and Media Lab

Slides:



Advertisements
Similar presentations
Network Simulator and problems in installing. Introduction Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems.
Advertisements

Introduction to nam Tim Buchheim 21 November 2002 ns tutorial - fall 2002.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2004) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
Wireless Communication : LAB 3
NS-2 (network simulator) NS by example παρουσίαση Κων/νος Τρούλος.
NS2-TCP Internet Computing KUT ( Youn-Hee Han It is licensed under a Creative Commons Attribution.
Introduction to Network Simulator NS-2 Part I
Network Simulation One tool to simulation network protocols for the Internet is the network simulator (NS) The simulation environment needs to be set-
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 Shahin Shayandeh December 2004 Session 2. Ns programming  Create the event scheduler  Turn on tracing  Create network  Setup routing  Insert.
Brief Intro to ns2: The most widely used Network Simulator COMP5416 Advanced Network Technologies Based on: Marc Greis's
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.
NS-2 網路模擬器介紹與使用 吳賢明國立中興大學 計算機及資訊網路中心中華民國九十三年十月二十七日.
5-Jul-141 S.Pushpalatha, Associate Professor, PSNACET.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
Dongsoo S. Kim 1.
Winter 2008 Evaluation Tools1 Brief Overview of Networking Evaluation Methods and Tools.
NS TUTORIAL Padma Haldar USC/ISI 09/04/02.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2003) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
CprE 543x – ns-2 Tutorial Zak Abichar, Dept of Electrical and Computer Engineering Iowa State University Ames,
Computer Networks NS. Features F Event driven simulator –developed at UC Berkeley F Network Topologies –nodes (connectivity), links (bandwidth, delay)
1 Ns Tutorial Alhussein A. Abouzeid Elect. Eng. Dept./U. of Washington Parts of this educational presentation use examples available.
Day 3 Outline Multicast example (from Day 2) Wireless Misc. utilities
15-744: Computer Networking L-3 The network simulator ns-2 Slides loosely based on a tutorial by Polly Huang, ETH Zurich.
1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)
Submitters: Stella Pantofel Michael Halperin Igor Berman
1 Network Simulator (NS-2) Tutorial These slides can be downloaded from:
Wireless Sensor Network for Tracking the Traffic in INTERNET Network Routers Supervisor: Mark Shifrin Students: Yuriy Kipnis Nir Bar-Or Networked Software.
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
Network Simulator 2(NS2) Yingyue Xu 8/25/2015. Overview: The Network simulator (NS): discrete event simulator for networks. supports wired, wireless,
Network Simulator (NS2) 1 Tutorial on Network Simulator (NS2) Hemant Kumar Rath Infonet Lab, Dept of Electrical Engineering IIT Bombay, Mumbai
Wireless Networking and Systems CSE 590 ns2 tutorial.
10b_ns: CSci551 SP2002 Friday © 2002 John Heidemann1 NS Tutorial, Class 10 CSci551: Computer Networks SP2002 Friday Section John Heidemann.
Introduction to NS2 -Network Simulator- -Prepared by Changyong Jung.
1 Introduction to Ns-2 Zhibin WU WINLAB, ECE Dept. Rutgers U.
NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links.
JIA-HUI HUANG INSTITUTE OF COMPUTER SCIENCE AND INFORMATION ENGINEERING NATIONAL TAIPEI UNIVERSITY OF TECHNOLOGY Network Simulator – NS-2 1.
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
TNK092: Network Simulation - Nätverkssimulering Lecture 3: TCP Vangelis Angelakis.
NetFlow Very useful for traffic analysis Very useful for traffic analysis Standard sampler: Standard sampler: –Cisco Netflow –Juniper Traffic Sampling.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Internet Computing KUT Youn-Hee Han
NS-2 Tutorial. Motivation What’s NS-2 Network simulator –Discrete event simulator It covers multiple layers –Application layer, transport layer, network.
1 ns-2 Tutorial Haobo Yu, Nader Salehi USC/ISI
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.
Ns-2 Tutorial (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Jianping Wang, 2002 cs757 1.
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.
Lab 2, Network Simulator ns2 Shiv Kalyanaraman Yong Xia (TA) Satish Raghunath Sept 4,
Network Simulator Tutorial Wireless Networks. Acknowledgements Material is taken from the presentations by Jim Kurose, University of Massachusetts, Amherst.
University of Texas at Arlington CSE 5346/4346 High Performance Networks 1 NS-2 Tutorial Choe, Hyun Jung (Stella) Spring 2008 Spring 2008 High Performance.
The Creation of NS2 Simulated Environment ( 1 ) LI Chengbo
TNK092: Network Simulation - Nätverkssimulering Lecture #1: Course basics and a first taste of NS2 Vangelis Angelakis Ph.D.
NS-2 Shahin Shayandeh December 2004 Session 1. Ns-2, the Network Simulator  A discrete event simulator Simple model  Focused on modeling network protocols.
Lab 2, Network Simulator ns2
© Algirdas Pakstas CS3026N Network Analysis, Design and Simulation 1 CT3020: Network Planning and Simulation Week 6b Prof.DrTech. Algirdas Pakštas.
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
NS-2 Simulator 최 종 훈 Contents  About NS  Installation  Based on Linux  Based on Windows  Architecture  Using NS-2  Example  References.
ECE 6610 Sandeep Kakumanu GNAN research Lab
(Modified from Polly Huang’s and last year’s original)
Network Simulator Tutorial
Basics of NS-2 Training in TCL script
Mobicom ‘99 Per Johansson, Tony Larsson, Nicklas Hedman
Choe, Hyun Jung (Stella)
Introduction to ns-2: “The” Network Simulator
Ns Tutorial: Case Studies
Ns By Kulveer Singh.
Karthik Sadasivam Banuprasad Samudrala
Presentation transcript:

DMET 602: Networks and Media Lab Amr El Mougy Yasmeen Essam Mohamed Karam

Exp 8: NS2

What is a Simulation? “It is the imitation of the operation of a real-world process or system over time. The act of simulating something first requires that a model be developed; this model represents the key characteristics or behaviors/functions of the selected physical or abstract system or process. The model represents the system itself, whereas the simulation represents the operation of the system over time.” Wikipedia Highly valuable tool for research and analysis

What is NS2 Object-oriented, discrete event-driven network simulator Written in C++ and OTcl Separates control path from data path implementations By VINT: Virtual InterNet Testbed

Goals of NS2 Support networking research and education Protocol design, traffic studies, etc Protocol comparison Provide a collaborative environment Freely distributed, open source Share code, protocols, models, etc Allow easy comparison of similar protocols Increase confidence in results More people look at models in more situations Experts develop models Multiple levels of detail in one simulator

Functionalities of NS2 Wired world Wireless Routing DV, LS, PIM-SM Transportation: TCP and UDP Traffic sources: web, ftp, telnet, cbr, stochastic Queuing disciplines: drop-tail, RED, FQ, SFQ, DRR QoS: IntServ and Diffserv Emulation Wireless Ad hoc routing and mobile IP Sensor networks, vehicular networks Tracing, visualization, various utilities

NS Components NS, the simulator itself Nam, the network animator Visualize ns (or other) output Nam editor: GUI interface to generate ns scripts Pre-processing: Traffic and topology generators Post-processing: Simple trace analysis, often in Awk, Perl, or Tcl

NS Models Traffic models and applications: Transport protocols: Web, FTP, telnet, constant-bit rate, real audio Transport protocols: unicast: TCP (Reno, Vegas, etc.), UDP Multicast: SRM Routing and queueing: Wired routing, ad hoc rtg and directed diffusion queueing protocols: RED, drop-tail, etc Physical media: Wired (point-to-point, LANs), wireless (multiple propagation models), satellite

Discrete Event Simulator Model world as events Simulator has list of events Process: take next one, run it, until done Each event happens in an instant of virtual (simulated) time, but takes an arbitrary amount of real time simple queuing model: Consider two nodes on an Ethernet: t=1, A enqueues pkt on LAN t=1.01, LAN dequeues pkt and triggers B A B

C++ and oTCL Sepatarion “data” / control separation C++ for “data”: per packet processing, core of ns fast to run, detailed, complete control OTcl for control: Simulation scenario configurations Periodic or triggered action Manipulating existing C++ objects fast to write and change running vs. writing speed Learning and debugging (two languages)

NS Programming Create the event scheduler Turn on tracing Create network Setup routing Insert errors Create transport connection Create traffic Transmit application-level data

Creating an Event Scheduler Create event scheduler set ns [new Simulator] Schedule events $ns at <time> <event> <event>: any legitimate ns/tcl commands $ns at 5.0 “finish” Start scheduler $ns run Example: simple.tcl set ns [new Simulator] $ns at 1 “puts \“Hello World!\”” $ns at 1.5 “exit” $ns run bash-shell$ ns simple.tcl Hello World! bash-shell$ Transport Layer

Tracing set nf [open out.nam w] $ns trace-all $nf $ns namtrace-all $nf Insert immediately after scheduler! Trace packets on all links set nf [open out.nam w] $ns trace-all $nf $ns namtrace-all $nf

Tracing

Creating a Simple Network Nodes set n0 [$ns node] set n1 [$ns node] Links and queuing $ns duplex-link $n0 $n1 1Mb 10ms RED $ns duplex-link $n0 $n1 <bandwidth> <delay> <queue_type> <queue_type>: DropTail, RED, etc. n0 n1 Transport Layer

Queuing Methods Drop Tail: When the buffer is full drop any newly arriving packets Has global TCP congestion problem  all nodes stop and start at the same time Random Early Detection (RED): Starts dropping before the buffer is full. The more data sent by a node, the higher the dropping probability Stochastic Fairness Queuing: Supports QoS by supporting multiple queues. Packets are taken in a round robin fashion

Creating a Larger Topology for {set i 0} {$i < 7} {incr i} { set n($i) [$ns node] } $ns duplex-link $n($i) $n([expr($i+1)%7]) 1Mb 10ms RED

Network Dynamics Link failures Hooks in routing module to reflect routing changes $ns rtmodel-at <time> up|down $n0 $n1 For example: $ns rtmodel-at 1.0 down $n0 $n1 $ns rtmodel-at 2.0 up $n0 $n1

Creating a UDP Link set udp [new Agent/UDP] set null [new Agent/Null] $ns attach-agent $n0 $udp $ns attach-agent $n1 $null $ns connect $udp $null

Creating Traffic on top of UDP cbr null Constant Bit Rate set cbr [new Application/Traffic/CBR] $cbr set packetSize_ 500 $cbr set interval_ 0.005 $cbr attach-agent $udp

Creating a TCP Connection set tcp [new Agent/TCP] set tcpsink [new Agent/TCPSink] $ns attach-agent $n0 $tcp $ns attach-agent $n1 $tcpsink $ns connect $tcp $tcpsink n1 n0 tcp sink

Creating Traffic on top of TCP ftp sink FTP set ftp [new Application/FTP] $ftp attach-agent $tcp Telnet set telnet [new Application/Telnet] $telnet attach-agent $tcp

Inserting Packet Loss Creating Error Module Inserting Error Module set loss_module [new ErrorModel] $loss_module set rate_ 0.01 $loss_module unit pkt $loss_module ranvar [new RandomVariable/Uniform] $loss_module drop-target [new Agent/Null] Inserting Error Module $ns lossmodel $loss_module $n0 $n1

Post-Processing Procedure Add a 'finish' procedure that closes the trace file and starts nam. proc finish {} { global ns nf $ns flush-trace close $nf exec nam out.nam & exit 0 }

Network Animator

Network Visualization: Nodes and Links Color $node color red Shape (can’t be changed after sim starts) $node shape box (circle, box, hexagon) Label (single string) $ns at 1.1 “$n0 label \”web cache 0\”” Links $ns duplex-link-op $n0 $n1 color "green" Label $ns duplex-link-op $n0 $n1 label “backbone"

Topology Example Manual” layout: specify everything $ns duplex-link-op $n(0) $n(1) orient right $ns duplex-link-op $n(1) $n(2) orient right $ns duplex-link-op $n(2) $n(3) orient right $ns duplex-link-op $n(3) $n(4) orient 60deg If anything missing  automatic layout

Simulation Example