Introduction_to_Wireless_simulations

Introduction_to_Wireless_simulations - Introduction to...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Wireless simulations Shao-Cheng Wang Wireless Simulations Before simulation Generate traffic files: cbrgen.tcl Generate mobility files: setdest & calcdest Simulation simple-wireless.tcl After simulation Trace formats Nam • Marc Greis's tutorial http://www.isi.edu/nsnam/ns/tutorial/index.html Traffic file cbrgen.tcl (~/ns/indep-util/cmu-trace) ns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed] [-mc connections] [-rate rate] Traffic file (cont’d) > ns cbrgen.tcl -type cbr -nn 10 -seed 1.0 -mc 8 -rate 4.0 # 2 connecting to 3 at time 82.557023746220864 set udp_(0) [new Agent/UDP] $ns_ attach-agent $node_(2) $udp_(0) set null_(0) [new Agent/Null] $ns_ attach-agent $node_(3) $null_(0) set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetSize_ 512 $cbr_(0) set interval_ 0.25 $cbr_(0) set random_ 1 $cbr_(0) set maxpkts_ 10000 $cbr_(0) attach-agent $udp_(0) $ns_ connect $udp_(0) $null_(0) $ns_ at 82.557023746220864 "$cbr_(0) start" Mobility file ./setdest [-n num_of_nodes] [-p pausetime] [-s maxspeed] [-t simtime] \ [-x maxx] [-y maxy] > [outdir/movement-file] $node_(0) x,y,z $ns_ at 2.000000000000 "$node_(0) setdest 90.441179033457 44.896095544010 1.373556960010" $ns_ at 899.642 "$god_ set-dist 23 46 2" calcdest Wireless Simulations Before simulation Generate traffic files: cbrgen.tcl Generate mobility files: setdest & calcdest Simulation simple-wireless.tcl After simulation Trace formats Nam • Marc Greis's tutorial http://www.isi.edu/nsnam/ns/tutorial/index.html Wireless simulation set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(ant) Antenna/OmniAntenna ;# Antenna type set val(ll) LL ;# Link layer type set val(ifq) Queue/DropTail/PriQueue ;# Interface queue type set val(ifqlen) 50 ;# max packet in ifq...
View Full Document

{[ snackBarMessage ]}

Page1 / 22

Introduction_to_Wireless_simulations - Introduction to...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online