Simulation of Computer Networks Holger Fler Lehrstuhl fr Praktische - - PowerPoint PPT Presentation

simulation of computer networks
SMART_READER_LITE
LIVE PREVIEW

Simulation of Computer Networks Holger Fler Lehrstuhl fr Praktische - - PowerPoint PPT Presentation

Simulation of Computer Networks Holger Fler Lehrstuhl fr Praktische Informatik IV, University of Mannheim Holger Fler Simulation of Computer Networks Universitt Mannheim, WS 2005/2005 Vorbemerkungen Lehrstuhl fr Praktische


slide-1
SLIDE 1

Simulation of Computer Networks

Holger Füßler Universität Mannheim, WS 2005/2005

Simulation of Computer Networks

Holger Füßler Lehrstuhl für Praktische Informatik IV, University of Mannheim

slide-2
SLIDE 2

Holger Füßler - 2 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Vorbemerkungen

» Lehrstuhl für Praktische Informatik IV

– http://www.informatik.uni-mannheim.de/pi4 – Rechnernetze und Multimedia-Technik

» Seit August 2001

– Bis Ende 2003 Projekt FleetNet – Bis Sept 2005 Projekt Network on Wheels – Seit 01.10. Landes-Stelle

» Gegenwärtige Arbeitsgebiete:

– Wireless ad hoc networks, insbesondere: vehicular ad hoc networks

slide-3
SLIDE 3

Holger Füßler - 3 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Simulation von Rechnernetzen

» Vertieft Vorlesungen ‘Rechnernetze’ » Widmet sich den Fragen:

– Wie kann ich Protokolle ausprobieren? – Wie kann ich verschiedene Netzkonfigurationen quantitativ vergleichen (ohne die Netze zu bauen)?

» Soll Hilfestellung für Studien-/Diplomarbeiten

– In vielen Arbeiten wird simuliert.

slide-4
SLIDE 4

Holger Füßler - 4 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Prüfungsregelung

» 3 ECTS Punkte » mündliche oder schriftliche Prüfung (je nach Nachfrage)

slide-5
SLIDE 5

Holger Füßler - 5 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Sprechzeiten, Vorlesungsfolien

» Holger Füßler (Sprechstunde nach Vereinbarung)

– Am besten per e-mail Termin vereinbaren – (fuessler@informatik.uni-mannheim.de)

» Die Vorlesungsfolien finden sich unter

– http://www.informatik.uni-mannheim.de/pi4/lectures/ws0506/netsim/ – geschützter Bereich – User: studi – pwd: charlemagne

slide-6
SLIDE 6

Holger Füßler - 6 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Some lectures are like this …

Collected theories and results for basic concepts e.g. Algorithmics Application 1 Application 2 Application 3 Application n

slide-7
SLIDE 7

Holger Füßler - 7 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

NetSim is like this …

Goal: Simulation of Computer Networks Algorithmics Probability theory Statistics Tools … requires broad knowledge

  • n various fields
slide-8
SLIDE 8

Holger Füßler - 8 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Prerequisites/Literature

» Basics (Grundstudium) in CS / Math / Statistics » Networking: Rechnernetze » Averill M. Law, W. David Kelton: “Simulation Modeling and

Analysis”, McGraw-Hill, 3rd edition, 2000.

» Sheldon M. Ross: “Simulation”, 2nd edition, Academic Press, 1997. » Stochastics, statistics: Anderson et al: “Schätzen und Testen” » Computer networks: Andrew S. Tanenbaum: “Computer Networks” » Pointers to original work is given on a ‘per lecture basis’.

slide-9
SLIDE 9

Simulation of Computer Networks

Holger Füßler Universität Mannheim, WS 2005/2005

Start of NetSim

slide-10
SLIDE 10

Holger Füßler - 10 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Overview of first lecture

» Part I: An ‘abstract’ view to simulations (top-down)

– Simulation as one strategy to study a system – The big picture

» Part II: A ‘concrete’ simulation example (bottom-up) » Part III: Course overview

– Elements needed for simulation of computer networks

slide-11
SLIDE 11

Holger Füßler - 11 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

I Ways to study a system

System Experiment with the actual system Experiment with a model

  • f the system

Physical model Mathematical model Analytical solution Simulation Source [LK2000] System: an organized integrated whole made up of diverse but interrelated and interdependent parts

  • The planetary system
  • The Internet
  • A personal computer

Model: a miniature representation of something (‘Miniature’: in the sense

  • f ‘approximation’), .e.g.,

Planetary system – planetarium Personal computer – Turing machine

slide-12
SLIDE 12

Holger Füßler - 12 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

I Simulation: advantages

» Experiment with the actual system: too expensive, sometimes

impossible (e.g., system does not exist yet)

– Simulation is relatively inexpensive – Simulation works for concepts and ideas

» Experiment with a physical model: still expensive, needs a lot of

work, some things cannot be ‚miniaturized‘ (e.g., radio propagation characteristics)

– Simulation is cost-effective – Simulation allows for various degrees of accuracy

» Analytical treatment: most times models are too complex

– Simulation allows for observation of the models behavior over time

slide-13
SLIDE 13

Holger Füßler - 13 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

I Example: vehicular ad hoc networks

System Experiment with the actual system Experiment with a model

  • f the system

Physical model Mathematical model Analytical solution Simulation Models:

  • Movement pattern
  • Communication protocols
  • Data traffic
  • and their interactions
slide-14
SLIDE 14

Holger Füßler - 14 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

I The nature of simulation

» Systems, system state, and system state

changes

– We define the state of a system to be that collection of variables necessary to describe a system at a particular time, relative to the

  • bjectives of the study

– In dynamic systems, the state of the systems changes over time – Usually, the local behavior of the system is known but the ‚evolution‘ of the system on a global scale is unknown.

» Simulation

– Step 1: build a (virtual) model w.r.t. system states and their corresponding state transitions – Step 2: execute the model, i.e., the transition rules, and observe the output

X, Y, Z

Execute state transitions according to model Observe

  • ver time
slide-15
SLIDE 15

Holger Füßler - 15 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

I Classification of models and simulation types

Mathematical model Static Dynamic Continuous Discrete Deterministic Stochastic

→ Our focus: discrete event simulation

Relevant class for computer networks

Continuous or ‘instantaneous’ Changes? w.r.t. transitions w.r.t. changes over time

slide-16
SLIDE 16

Holger Füßler - 16 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Classical introductory example: M/M/1 queue

Router [Server] Queue Departing packet Arriving packet

»

Queuing systems as delay models

»

Arrival process: ‘M’ for ‘memoryless’ (thus, exponentially distributed inter-arrival times)

»

Service process: ‘M’ for ‘memoryless’ (thus, exponentially distributed service times)

»

Number of queuing stations: 1 β=1.0 s for inter-arrival times β=0.5 s for service times

slide-17
SLIDE 17

Holger Füßler - 17 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

» Events:

– Packet arrivals – Departure: depends on arrival, delay, and service time

» Next-event time advance mechanism:

– Simulation clock advances to next event

  • State of system is updated
  • Knowledge of the times of occurrence of future events is updated
  • Go to next event

– Thus, periods of inactivity are ‚skipped‘.

II Introductory example: next-event time advance

Time Arrivals Departures a1 a2 a3 a5 a4 a6 d1 d2 d3 d4 d5 d6

slide-18
SLIDE 18

Holger Füßler - 18 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Statistics for performance measures:

» Average packet delay in queue:

– Assume n packets are sent – Denote the delay of packet i by Di

II Introductory example: performance measures

Estimator or ‘statistic’

slide-19
SLIDE 19

Holger Füßler - 19 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: performance measures

» Time-average number of packets in queue

– Let Q(t) denote the number of packets in the queue at time t – Let T(n) denote the total simulation time for n packets.

Q(t) 1 2 3 t

slide-20
SLIDE 20

Holger Füßler - 20 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: performance measures

» Router/Server utilization

– Let B(t) be one if the server is busy at time t and zero otherwise.

B(t) 1

slide-21
SLIDE 21

Holger Füßler - 21 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 0 System Computer representation A: 0.4 D: 1 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t)

?

slide-22
SLIDE 22

Holger Füßler - 22 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 0.4 System Computer representation 1 0.4 1 0.4 A: 1.6 D: 2.4 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t) 0.4

slide-23
SLIDE 23

Holger Füßler - 23 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 1.6 System Computer representation 1 1 1.6 1.6 1 1.2 1.6 A: 2.1 D: 2.4 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t) 0.4 1.6

slide-24
SLIDE 24

Holger Füßler - 24 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 2.1 System Computer representation 1 2 1.6 2.1 2.1 1 0.5 1.7 2.1 A: 3.8 D: 2.4 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t) 0.4 1.6 2.1

slide-25
SLIDE 25

Holger Füßler - 25 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 2.4 System Computer representation 1 1 2.1 2.4 2 0.8 1.1 2.0 2.4 A: 3.8 D: 3.1 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t) 1.6 2.1

slide-26
SLIDE 26

Holger Füßler - 26 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: execute model

Initialization Time = 3.1 System Computer representation 1 3.1 3 1.8 1.8 2.7 3.1 A: 3.8 D: 3.3 System state Event management Statistical counters Clock Event list Server status Number in queue Times

  • f

arrival Time

  • f last

event Number Total delay Area under Q(t) Area Under B(t) 2.1 … see [LK2000] for continuation of this example

slide-27
SLIDE 27

Holger Füßler - 27 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: event logic

» Depending on the event type, a specific event handler is called that

performs the appropriate state transition

» A state transition also includes generation of new events

Time Arrivals Departures a1 a

2

a

3

a

5

a

4

a

6

d1 d

2

d

3

d

4

d

5

d

6

… State transistions

slide-28
SLIDE 28

Holger Füßler - 28 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

II Introductory example: output

» n=1000 » Average delay in queue: 0.43 s » Time-averaged number in queue: 0.418 » Server utilization: 0.46

[Taken from LK2000]

» Play with parameters in NetSim Lab 3!

slide-29
SLIDE 29

Holger Füßler - 29 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Computer networks: what is modeled and simulated?

» What is the ‘right’ level of detail? » Usually, the following elements

are modeled:

– Topology of the network, or mobility of the nodes – Communication protocols as well as applications – Data traffic

Actual System Model Abstraction Comparison of real-world observations and simulaton output data

slide-30
SLIDE 30

Holger Füßler - 30 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Simulation of computer networks: level of detail

Application Presentation Session Transport End host One or more nodes within the network Network Data link Physical Network Data link Physical Network Data link Physical Application Presentation Session Transport End host Network Data link Physical

Detailed modeling High-level modeling High-level modeling

slide-31
SLIDE 31

Holger Füßler - 31 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Trade off: accuracy vs computational costs

» Packet-level simulation

– No bit-level simulation as in digital communications

» Session-level simulation and aggregated flows

– Coarser modeling than packet-level simulation – In movement pattern generation the difference goes by the name of microscopic vs macroscopic modeling (particles vs fluids)

» Internet-scale: for example, modelling of stub networks and

autonomous systems (AS) as a ‚single node‘.

» Modeling depends on what has to be analyzed and how much

computational costs one can afford.

slide-32
SLIDE 32

Holger Füßler - 32 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Elements required for simulation of computer networks

»

Modeling

– Stochastic elements (generic, i.e., required for discrete event simulations of any system) – System states and logic (computer network-centric) – Statistics (generic, i.e., required for discrete event simulations of any system)

»

Simulation organization

– Event and time management, event handlers

»

Output analysis

– Statistics

»

Tools

– For specifying scenarios – For running simulation – For analyzing simulation output

slide-33
SLIDE 33

Holger Füßler - 33 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Course overview

Random Number Generators, Generating discrete and continuous random variates Generating topologies, movement pattern, link characteristics, data traffic patterns Lists, heaps, calendar queues Example: network simulator NS-2 nodes, links (point-to-point), agents, packets, connectors, classifiers, queues, packet scheduling, link delays, LAN MAC error modeling, transport protocols, application agent, … Output data analysis Statistics, Tools, Visualization Modeling stochastic elements Algorithmics of discrete event simulation Modeling system state and logic for computer networks simulation Output analysis

slide-34
SLIDE 34

Holger Füßler - 34 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

III Outlook

slide-35
SLIDE 35

Holger Füßler - 35 Universität Mannheim, WS 2005/2006

Simulation of Computer Networks

Summary / Educational Goal

» Simulation: abstract view

– Systems, models, system state, state transitions – Classification of simulation types

  • Static vs dynamic
  • Continuous vs discrete
  • Deterministic vs stochastic

» Simulation: concrete view

– Example: M/M/1 queue – Execution ‘by hand’

» Elements needed for discrete event simulation

– State variables – Event management – Statistics/Counters – Generation of events – Transistion rules