Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2004) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.

Slides:



Advertisements
Similar presentations
INTRODUCTION TO SIMULATION WITH OMNET++ José Daniel García Sánchez ARCOS Group – University Carlos III of Madrid.
Advertisements

Vacha Dave, University of Texas at Austin 1 Network Simulator Tutorial Advanced Computer Networks (CS378)
Network Simulator and problems in installing. Introduction Problems in installing Wired networks modified example2.tcl commands in OTcl usual problems.
Network Simulator (NS-2)
1 NS-2 Tutorial COMP R2 University of Manitoba March 4, 2009.
NS2 Tutorial – Part II Internet Computing KUT Youn-Hee Han.
1 Multicast in ns-2 報告者 : 陳沐恩. 2 Multicast 簡介 3 Multicast Routing set ns [new Simulator] $ns multicast Or set ns [new Simulator – multicast on] set mproto.
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.
Wireless and Mobile Computing Simulations Lecture 27.
Introduction to Network Simulator NS-2 Part I
1 ns-2 Tutorial, part 2 Dave Anderson, Xiaowei Yang (Modified from Polly Huang’s slides)
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-
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.
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.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
1 TCP Vegas: New Techniques for Congestion Detection and Avoidance Lawrence S. Brakmo Sean W. O’Malley Larry L. Peterson Department of Computer Science.
Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2003) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences.
EECS 122 Communications Networks Department of Electrical Engineering and Computer Sciences University of California Berkeley Slides: K. Fall, K. Lai,
Computer Networks NS. Features F Event driven simulator –developed at UC Berkeley F Network Topologies –nodes (connectivity), links (bandwidth, delay)
1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)
17/10/2003TCP performance over ad-hoc mobile networks. 1 LCCN – summer 2003 Uri Silbershtein Roi Dayagi Nir Hasson.
Submitters: Stella Pantofel Michael Halperin Igor Berman
Color Aware Switch algorithm implementation The Computer Communication Lab (236340) Spring 2008.
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 (NS2) 1 Tutorial on Network Simulator (NS2) Hemant Kumar Rath Infonet Lab, Dept of Electrical Engineering IIT Bombay, Mumbai
1 Ns Tutorial: Case Studies John Heidemann (USC/ISI) Polly Huang (ETH Zurich) March 14, 2002.
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.
Redes Inalámbricas Máster Ingeniería de Computadores 2008/2009 Tema 7.- CASTADIVA PROJECT Performance Evaluation of a MANET architecture.
Introduction to NS2 -Network Simulator- -Prepared by Changyong Jung.
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.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Internet Computing KUT Youn-Hee Han
Interconnect simulation. Different levels for Evaluating an architecture Numerical models – Mathematic formulations to obtain performance characteristics.
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 Simulation Motivation: r learn fundamentals of evaluating network performance via simulation Overview: r fundamentals of discrete event simulation.
Network Simulator Tutorial Wireless Networks. Acknowledgements Material is taken from the presentations by Jim Kurose, University of Massachusetts, Amherst.
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 
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.
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.
Lab 2, Network Simulator ns2
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
VINT: Status and Plans Deborah Estrin: Project overview Steve McCanne: ns architecture John Heidemann: scaling, visualization Audience: Comments and questions.
ECE 6610 Sandeep Kakumanu GNAN research Lab
DMET 602: Networks and Media Lab
(Modified from Polly Huang’s and last year’s original)
Simulators for Sensor Networks
Choe, Hyun Jung (Stella)
Introduction to ns-2: “The” Network Simulator
Introduction to NS Srinath Perur.
Ns Tutorial: Case Studies
Karthik Sadasivam Banuprasad Samudrala
Computer Science Division
Presentation transcript:

Katz, Stoica F04 EECS 122 Introduction to Computer Networks (Fall 2004) Network simulator 2 (ns-2) Department of Electrical Engineering and Computer Sciences University of California Berkeley Slides: K. Fall, J. Heidemann, P. Huang, K. Lai, A. Parekh, I. Stoica, S. Shenker, J. Walrand

Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Simulator ns2 Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Berkeley, CA

Katz, Stoica F04 3 Outline  Goals  Discrete event simulation  Basic ns-2  Examples  Project requirements

Katz, Stoica F04 4 What is ns-2?  Discrete event simulator  Models network protocols -Wired, wireless, satellite -TCP, UDP, multicast, unicast -Web, telnet, ftp -Ad-hoc routing, sensor networks -Infrastructure: stats, tracing, error models, etc.  Multiple levels of detail in one simulator

Katz, Stoica F04 5 Why simulate?  Can examine protocol in controlled environment  Repeatable experiments  Alternatives: -Experimentation: operational details, but: limited scale, limited flexibility -Analysis: can provide deeper understanding, but: ignores implementation details

Katz, Stoica F04 6 ns-2 components  ns: the Network Simulation engine -executes tcl scripts containing simulation setup and events  nam: the Network AniMator -visualize ns output tcl script (specification of experiment) ns-2 trace file (output) nam

Katz, Stoica F04 7 Discrete event simulation  model world as events -maintain queue of events, ordered by time -maintain [virtual time] -repeat: extract event at head, set [virtual time]=event’s time process it if processing generates another event, add it to queue  each event takes predefined amount of virtual time, arbitrary amount of real time -having a slow CPU makes simulation run slower (in real time), but doesn’t change result

Katz, Stoica F04 8 Discrete event example TIMEEVENT A.1sS decides to send pkt to D S starts sending pkt delayvalue transmission0.005s propagation0.01s DS S D B.1.005sS finishes transmitting pkt to D C.1.01sD begins to recv pkt D.1.015sD recvs entire pkt and delivers to application B. D. C. A. Event queue

Katz, Stoica F04 9 oTcl overview  programming language used for setting up simulation environment -object oriented -interpreted (slow)  Used for -Setting up topology -Placing agents -Injecting events -Configuring tracing Examples:  variables -set x 10 -puts “x is $x”  expressions -set y [pow x 2] -set y [expr x+x*3]  control -if ($x>0) { return $x } else { return [expr -$x] } -while ($x >0) { puts $x set x [eval x+1] }

Katz, Stoica F04 10 Basic ns-2  Create scheduler -set ns [new Simulator]  Create node -set [$ns node] -example: set n0 [$ns node]  Create link -$ns -example: $ns duplex-link $n0 $n1 10Mb 100ms DropTail  Schedule event -$ns at -example: $ns at 10.0 “$ftp start”  Start scheduler -$ns run

Katz, Stoica F04 11 Example n0n1 ftp tcp #Create a simulator object set ns [new Simulator] #Create three nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] #Create link between the nodes $ns duplex-link $n0 $n1 4Mb 10ms DropTail $ns duplex-link $n2 $n1 1Mb 10ms DropTail $ns queue-limit $n1 $n2 10 #Create a TCP agent and attach it to node n0 set tcp0 [new Agent/TCP] $ns attach-agent $n0 $tcp0 #Create a TCP sink agent and attach it to node n2 set sink [new Agent/TCPSink] $ns attach-agent $n2 $sink #Connect both agents $ns connect $tcp0 $sink # create an FTP source set ftp [new Application/FTP] $ftp set maxpkts_ 1000 $ftp attach-agent $tcp0 #Inject starting events $ns at 0.0 "$ftp start" $ns at 10.0 "$ftp stop" $ns at 10.1 "finish" #Run the simulation $ns run tcp-sink n2

Katz, Stoica F04 12 nam visualization demo  Now I show a an instance of nam running the example on the previous slide… tcl script (specification of experiment) ns-2 trace file (output) nam We just saw this…Now I will show you this…

Katz, Stoica F04 13 Analysis

Katz, Stoica F04 14 Project 2: ns2 -- overview  Goal: learn how to simulate networks with ns-2, understand how different TCP behaves  Task 1 -Familiarize with ns-2 -Write basic scripts to define network topologies, to specify transport agents, to log traces, to parse trace, and to mine the trace data to understand how the transport protocol behaves  Task 2 -Reverse engineering -Given a blackbox TCP implementation, you figure what the blackbox is. -Understand how different TCP behaves under packet losses. -Refer to the reference papers in the last slide.

Katz, Stoica F04 15 Project 2: ns2 -- requirements  Project details: -Project 2 web page  You MUST: 1.use the version of ns2 supplied on the instructional machines 2.be familiar with the simulation results and the contents of your report, be prepared to answer questions  Project due 11:59PM, October 28.

Katz, Stoica F04 16 Reference Papers  [1] K. Fall and S. Floyd. Simulation-based Comparisons of Tahoe, Reno, and SACK TCP. Computer Communication Review, (We strongly recommend to read this paper for project 2.)  [2] L. Brakmo, S. O'Malley, and L. Peterson. TCP Vegas: New Techniques for Congestion Detection and Avoidance. Proc. of SIGCOMM, (This paper explains TCP Vegas. If you feel the textbook does not cover enough about TCP vegas, please read this paper.)  [3] V. Jacobson and M. J. Karels. Congestion Avoidance and Control. Proc. of SIGCOMM, (This is the seminal paper in TCP congestion control.)  [4] D. Chiu and R. Jain. Analysis of the Increase and Decrease Algorithms for Congestion Avoidance in Computer Networks. Computer Networks and ISDN Systems, (If you want to know how AIMD achieves efficiency and fairness more in detail, please read this one.)