NS2 LAB: EX1 instruction - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

NS2 LAB: EX1 instruction

Description:

NS2 LAB: EX1 instruction – PowerPoint PPT presentation

Number of Views:149
Avg rating:3.0/5.0
Slides: 10
Provided by: miri7
Category:
Tags: lab | ex1 | instruction | mom | new | ns2 | oldest

less

Transcript and Presenter's Notes

Title: NS2 LAB: EX1 instruction


1
NS-2 LAB EX1 instruction
Miriam Allalouf
  • 2003-2004 - Semester A

2
NS-2 lab Ex1 instruction
  • More Installation inst
  • Ns-2.26 over cygwin
  • Follow Christian instructions (patch install)
  • Attached the file bashrc copy it to be your
    .bashrc file and out your login (instead of
    miriam) in the ns_home variable.
  • Few more ltcygwin installgt tips
  • Use the ltinstallgt option when installing cygwin
    (and not the default)
  • When running the ns2 setup.exe - there are 2
    buttons that have to be chosen   1. File mode
    UNIX/ DOS (additional EndOfLine char for DOS) -
    should choose UNIX (even though installing on PC/
    Win. platform).  2. Install for All Users or
    Just Me - should choose All Users even if a
    single user is using the installation.

3
NS-2 lab Ex1 instruction
  • Exercise 1 Instruction
  • EX1 Computes different types of per-node delays
    propagation, transmission and end-to-end
  • Trace file
  • action time flow-src flow-dst pkt-type
    length-------
  • flow-ID node-from.port node-to.port seq-nr
    pkt-id
  • 'action' can beenqueue (), dequeue (-), drop
    (d), received (r)...
  • r 0.0028 5 0 tcp 1000 ------- 3 5.0 9.0 0 3

4
NS-2 lab Ex1 instruction
  • Exercise 1 Instruction con1
  • Analyzer program gets a trace file and outputs
    the delays
  • The analyzer program written in java get 4
    parameters lttrace filegt ltnodesgt ltlinks
    distancegt ltpropagation delaygt
  • Execute from shell
  • Create classes directory
  • Open archive under classes
  • Type java -classpath classes ns2.DelayAnalyzer
    out.tr ltnodesgt ltlinks distancegt ltpropagation
    delaygt
  • Execute from TCL file
  • exec java -classpath classes
    ns2.DelayAnalyzer out.tr ltnodesgt ltlinks
    distancegt ltpropagation delaygt

5
NS-2 lab Ex1 instruction
  • Exercise 1 Instruction cont. 2
  • Question 1
  • Take tcl example and change parameters
  • Run different scenarios
  • Get results using the analyzer program
  • Question 2
  • Change topology and application (from CBRUDP to
    FTPTCP)
  • Run different scenarios
  • Get results using the analyzer program

6
Basic otcl
NS-2 lab Ex1 instruction
  • Class mom
  • mom instproc greet
  • self instvar age_
  • puts age_ years old mom How are you doing?
  • Class kid -superclass mom
  • kid instproc greet
  • self instvar age_
  • puts age_ years old kid Whats up, dude?
  • set a new mom
  • a set age_ 45
  • set b new kid
  • b set age_ 15
  • a greet
  • b greet
  • 45 years old mom How are you doing?
  • 15 years old kid What's up, dude?

7
NS-2 lab Ex1 instruction
  • FTP
  • Create TCP agent and attach it to the first
    node
  • set tcp new Agent/TCP
  • tcp set packetSize_ packetSize
  • .
  • .
  • .
  • Create FTP application
  • set ftp new Application/FTP
  • ftp attach-agent tcp
  • ns at 0.2 "ftp produce no_packets" or
  • ns at 0.2 "ftp send no_bytes
  • ns at 600.0 "finish"
  • ns run

8
NS-2 lab Ex1 instruction
  • Class Hierarchy C/OTcl class hierarchy
  • Can be reached from the ns home page

9
NS-2 lab Ex1 instruction
  • More Installation inst
  • Ns-2.26 over cygwin
  • Follow Christian instructions (patch install)
  • Attached the file bashrc copy it to be your
    .bashrc file and out your login (instead of
    miriam) in the ns_home variable.
  • Few more ltcygwin installgt tips
  • Use the ltinstallgt option when installing cygwin
    (and not the default)
  • When running the ns2 setup.exe - there are 2
    buttons that have to be chosen   1. File mode
    UNIX/ DOS (additional EndOfLine char for DOS) -
    should choose UNIX (even though installing on PC/
    Win. platform).  2. Install for All Users or
    Just Me - should choose All Users even if a
    single user is using the installation.
Write a Comment
User Comments (0)
About PowerShow.com