Network simulator - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Network simulator

Description:

Four schedulers available (linked list, heap, calendar queue and 'real-time' ... type : CtrMcast, DM, ST, BST. Trace and Monitoring Support ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 26
Provided by: brynjar
Category:
Tags: bst | network | simulator

less

Transcript and Presenter's Notes

Title: Network simulator


1
Network simulator
  • Lunsjkollokvium 29.10.99
  • Poul Heegaard
  • Brynjar Viken

2
Overview
  • Otcl/C.
  • Example script.
  • Discrete Event Scheduler.
  • Network Topology.
  • Queue Management and Packet Scheduling.
  • Transport agents.
  • Applications.
  • Packet Format.
  • Routing.
  • DEMO

3
otcl and C
  • Object oriented simulator written in C.
  • Otcl interpreter as a frontend.

C
otcl
Otcl class hierarchy
C class hierarchy
From users view a one-to-one correspondence.
4
Example Script
  • set ns new Simulator
  • set n0 ns node

set ftp new Application/FTP ftp attach-agent
tcp
set n1 ns node
ns connect tcp sink
ns duplex-link n0 n1 1.5Mb 10ms DropTail
ns at 0.2 "ftp start" ns at 1.2 exit" ns run
Set sink new Agent/TCPSink ns attach-agent
n1 sink
set tcp new Agent/TCP ns attach-agent n0 tcp
5
Event Scheduler
  • Create scheduler
  • set ns new Simulator
  • Four schedulers available (linked list, heap,
    calendar queue and real-time.)
  • Objects derived from Event packets and
    at-events.
  • Schedule event
  • ns at lttimegt lteventgt
  • lteventgt any legitimate ns/tcl commands
  • Start scheduler
  • ns run

6
Creating Topology
  • Nodes
  • set n0 ns node
  • set n1 ns node
  • Links Queuing
  • ns duplex-link n0 n1 ltbandwidthgt ltdelaygt
    ltqueue_typegt
  • Packet scheduling and queue management
  • FIFO queueing, Class Based Queueing (CBQ),
    Weighted Fair Queueing (WFQ), Stochastic Fair
    Queueing (SFQ), Deficit Round-Robin and RED
    buffer management.

7
Network Topology - Node
Unicast Node
8
Network Topology - Link
9
Creating Topology
  • ns Supports a variety of other media
  • Multi-access local area network.
  • Wireless media.
  • Broadcast media.
  • ...

10
Creating Connection UDP
  • UDP
  • set udp new Agent/UDP
  • set null new Agent/NULL
  • ns attach-agent n0 udp
  • ns attach-agent n1 null
  • ns connect udp null

11
Creating Connection TCP
  • TCP
  • set tcp new Agent/TCP
  • set tcpsink new Agent/TCPSink
  • ns attach-agent n0 tcp
  • ns attach-agent n1 tcpsink
  • ns connect tcp tcpsink
  • Support several one-way sending TCP agents and
    sinks. (Tahoe, Reno, NewReno, Sack1, Vegas and
    Fack.)

12
Transport
n0
n1
Port Classifier
Port Classifier
Addr Classifier
Addr Classifier
0
0
agents_
dmux_
dmux_
Link n0-n1
entry_
entry_
classifier_
classifier_
Link n1-n0
13
Creating Traffic Applications
  • FTP
  • set ftp new Application/FTP
  • ftp attach-agent tcp
  • Telnet
  • set telnet new Application/Telnet
  • telnet attach-agent tcp

14
Creating Traffic Applications
  • CBR
  • set src new Application/Traffic/CBR
  • Exponential or Pareto on-off
  • set src new Application/Traffic/Exponential
  • set src new Application/Traffic/Pareto
  • Traffic generation from traces.

15
Application
n0
n1
Port Classifier
Port Classifier
Addr Classifier
Agent/TCP
Addr Classifier
Agent/TCPSink
0
0
agents_
agents_
dmux_
dmux_
Link n0-n1
entry_
entry_
classifier_
classifier_
Link n1-n0
16
Packet Flow
n0
n1
Port Classifier
Port Classifier
Application/FTP
Addr Classifier
Agent/TCP
Addr Classifier
Agent/TCPSink
0
0
Link n0-n1
entry_
entry_
Link n1-n0
17
Packet Format
header
data
18
Computing routes
  • Unicast
  • ns rtproto lttypegt
  • lttypegt Static, Session, DV, cost, multi-path
  • Multicast
  • ns multicast (right after new Simulator)
  • ns mrtproto lttypegt
  • lttypegt CtrMcast, DM, ST, BST

19
Trace and Monitoring Support
  • Traces - record each individual packet as it
    arrives, departs, or is dropped at a link or
    queue.
  • lteventgt lttimegt ltfromgt lttogt ltpktgt ltsizegt--ltflowidgt
    ltsrcgt ltdstgt ltseqnogt ltaseqnogt
  • 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
  • - 1 0 2 cbr 210 ------- 0 0.0 3.1 0 0
  • r 1.00234 0 2 cbr 210 ------- 0 0.0 3.1 0 0
  • Monitors - compute statistics over time intervals
    about arrivals, departures, drops and flows.

20
Class Hierarchy (Partial)
21
Visualization Tools
  • nam-1 (Network AniMator Version 1)
  • Nam is a Tcl/TK based animation tool for viewing
    network simulation traces and real world packet
    traces. It supports topology layout, packet level
    animation, and various data inspection tools.
  • xgraph

22
  • nam-1 (Network AniMator Version 1)

23
Other ns-2 Freatures
  • Mathematical Support
  • Network Dynamics
  • Simulation Scale
  • 460 nodes, 100,000 TCP connections
  • Emulation Interface

24
Online Resources
  • http//netweb.usc.edu/vint
  • http//www-mash.cs.berkeley.edu/ns/
  • Mailing lists
  • ns-users_at_mash.cs.berkeley.edu
  • ns-announce_at_mash.cs.berkeley.edu
  • To subscribe
  • majordomo_at_mash.cs.berkeley.edu

25
Credits
  • UCB
  • Elan Amir, Hari Balakrishnan, Tom Henderson,
    Steven McCanne, Giao Nguyen, Venkat Padmanabhan,
    Teck-Lee Tung
  • USC/ISI
  • Lars Eggert, Deborah Estrin, Padma Haldar, Mark
    Handley, John Heidemann, Ahmed Helmy, Polly
    Huang, Satish Kumar, Reza Rejaie, Puneet Sharma,
    Kannan Varadhan, Vikram Visweswariah, Ya Xu,
    Haobo Yu
  • LBNL
  • Kevin Fall, Sally Floyd
  • Xerox Parc
  • Sandeep Bajaj, Lee Breslau, Scott Shenker
Write a Comment
User Comments (0)
About PowerShow.com