Sunteți pe pagina 1din 21

Part I: NS NS2 2 Basics

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Simulation of Computer Networks

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Outline
Computer Networks Network Simulation E Example l Summary y

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Computer Networks
Computer + Networking

Networking

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Computer Networks
Generally Generally, there are so many tasks Layering Concept: Separate functionality
OSI Model
Application Presentation Session Transport Network Data Link Transport Network Data Link
5

- TCP/IP Model
Application

Physical Physical Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Outline
Computer Networks Network Simulation E Example l Summary y

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

A Study of Computer Networks


Suppose you devise a great protocol. protocol How do you show that its great? Study approaches:
Experiment: Put all routers together and let people use them Mathematic model: Model routers using a graph theory Simulation: Use programming (e.g., C++ or NS2) to represent routers
Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

A Study of Computer Networks


Pros Experiment E p r m nt Realistic a st c Cons E p ns / Expensive/ Sometime not possible N d to Need t make k assumptions

Mathematic M th ti Insight I i ht Model Si l ti Simulation

Easy E (Cheap) (Ch ) Not N t much h insight, i i ht Used for verification sometimes need to make assumption
8

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Simulation: Overview
Platform: Hardware, Hardware Software, Software or Hybrid Developer: Commercial or In-house Source code: Open or close P Paradigm: di m: Time-dependent/non-timeTim d p nd nt/n n tim dependent; Time-driven/Event-driven
Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Simulation: Overview
Dimension of simulation performance
Execution speed Scalability Fid lit Fidelity Cost

Physical y Layer: y
Simulate channel models, BER, PER, etc. Matlab, LabView, ADS, SPD

Network Layer
Free: NS2, GloMoSim Commercial: Opnet, QualNet
Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

10

Time-Dependent Simulation
Most commonly-used Simulation proceeds chronologically. Two T main i types:
1. Time-Driven Simulation 2. Event-Driven Simulation

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

11

Time-Driven Simulation
Observe the system at a fixed interval. Event occurs within an interval is assumed to occur at the end of the interval Suppose an interval = seconds. Then the simulation proceeds as follows:

a,b,c,d are events a is assume to occurred at t= 2 b,c are assume to occurred at t=( 5 )

The simulation finishes at a pre-specified pre specified time. time


Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

12

Event-Driven Simulation
Observe every event.

Each event provide a reference to the next event (e.g., using pointer)

Next_event

c
Next_event

Next_event

Simulation finishes

At a pre-specified time When Wh there th is i no more event t


13

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

Outline
Computer Networks Network Simulation E Example l Summary y

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

14

Example: Queuing System

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

15

Example: Queuing System

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

16

Example: Queuing System

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

17

Example: Queuing System

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

18

Outline
Computer Networks Network Simulation E Example l Summary y

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

19

Summary
Computer Networks = Computer + Networking A Study of Computer Networks
Experimental Mathematical Model Simulation

Time-Dependent Simulation
Time-Driven Simulation Event-Driven Simulation

Example: A queuing system


Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

20

Additional Reading
W W. T. T Kasch, Kasch J. J R. R Ward, Ward and J. J Andrusenko, Wireless Network Modeling and Simulation Tools for Designers g and Developers, IEEE Communication Magazine, vol. 47, no. 3, pp. 120-127, Mar. 2009, 2009

Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008.

21

S-ar putea să vă placă și