Use of Mobility models in ns-2 - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Use of Mobility models in ns-2

Description:

... generation. User ... Similarly TCP traffic can be generated. Pre-generated Scenarios ~ns/ns-2.1b8a ... Mobility model and traffic pattern files are input to ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 9
Provided by: karth
Category:

less

Transcript and Presenter's Notes

Title: Use of Mobility models in ns-2


1
Use of Mobility models in ns-2
  • Karthik Dantu
  • Shyam Kapadia

2
Random Waypoint
  • setdest n ltnum nodesgt p ltpause timegt s ltspeedgt
    t ltTimegt x ltxgt y ltygt
  • Parameters
  • Number of nodes (N)
  • Pause Time (P)
  • Max speed (S)
  • Simulation Time (T)
  • Max X (X)
  • Max Y(Y)
  • Eg ./setdest -n 10 -p 4 -s 5 -t 10 -x 500 -y 500
    gt scen-10-4-500

3
Traffic generation
  • User cbrgen.tcl
  • Syntax ns cbrgen.tcl -type cbrtcp -nn nodes
    seed seed -mc connections -rate rate
  • Eg ns cbrgen.tcl -type cbr -nn 3 -seed 43578 -mc
    2 -rate 10.0 gt cbr-3-2-10
  • Similarly TCP traffic can be generated

4
Pre-generated Scenarios
  • ns/ns-2.1b8a/tcl/mobility/scene
  • Scen-1500x300-60-0-20-2
  • Area 1500x300
  • Nodes 60
  • Pause time 0.0
  • Max speed 20.00
  • Time 900s
  • Other files
  • Scen-670X670-50-600-20-0, Scen-670X670-50-600-20-1
    , Scen-670X670-50-600-20-2

5
Pre-generated traffic patterns
  • ns/ns-2.1b8a/tcl/mobility/scene
  • cbr-50-10-4-512
  • Nodes 50
  • Max. Connections 10
  • Seed 95813843.243
  • Send Interval 4.0
  • Other Examples
  • cbr-10-1-10-20, cbr-50-20-4-512, cbr-3-test

6
Usage in ns scripts
  • Mobility model and traffic pattern files are
    input to the ns script
  • Eg .. From wireless-test.tcl
  • set opt(cp) "../mobility/scene/cbr-3-test"
  • set opt(sc) "../mobility/scene/scen-3-test
  • Source opt(cp)
  • Source opt(sc)

7
Viewing traces
  • Trace file Needs to be parsed
  • Use awk or perl script at
  • http//nile.wpi.edu/NS/Example/column
  • r 160.093884945 _9_ RTR --- 1 tcp 1492 a2 4 6
    800 ------- 655 360 167779840 31 167779840
    1 0 2 0
  • Eg cat out.tr grep RTR awk print 2 gt
    rtr-time.tr
  • Gives trace of times of RTR packets.
  • Revised Trace Format
  • s -t 0.267662078 -Hs 0 -Hd -1 -Ni 0 -Nx 5.00 -Ny
    2.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0
    -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id -1.255 -It
    message -Il 32 -If 0 -Ii 0 -Iv 32
  • - detailed explanation in NS Manual Chapter 16

8
Visualization
  • Using nam
  • Enable tracing
  • ns_ namtrace-all-wireless ltnamtracegt ltxgt ltygt
  • mobilenode namattach ltnamtracefdgt
  • ns_ node-config - agentTrace ON
  • - routerTrace ON
  • - macTrace ON
Write a Comment
User Comments (0)
About PowerShow.com