Contatct: Li Yuan
Home Overview Source Code Installation Sample Scripts

 

Run the Simulator

You have two ways to run the simulator:

  1. Set your own parameters in the command line and run
  2. % ns main.tcl [ command-line options ] (see below)

  3. Use a sample tcl script provided in the source code package
  4. % ns run.tcl -bw bandwidth -fto FTO

    You need only provide two options: -bw and -fto.

    The output will be located in data/$bandwidth-$FTO

Command-line options:

-n
num of client-server pairs (default 100)
-bw
bottleneck link bandwidth, input format is XMb, X is the value (default 1.5Mb)
-dl
bottleneck link delay, input format is Xms, X is the value (default 100ms)
-t
simulation length (default 500)
-s
average download size (in Bytes,default 50000)
-ab
turn on/off ABORT (true/false)
-fto
set FTO (in seconds, default 10)
-q
bottleneck link queue type (default DropTail)
-udp
enable UDP traffic if set 'true' (default false)
-nudp
num of UDP connections (default 1)
-rate
if UDP enabled, set traffic rate (in bps, default 1000000)
-ftp
enable FTP traffic if set 'true' (default false)
-nftp
num of FTP connections (default 1)
-trace
enable .nam .tr trace if set 'true' (default false)
-seed
random number generation seed value (default 1)
-sr
user arrival rate (default 0.2)
-stop
simulation stop methods: 0 by time (default); 1 by #downloads; 2 by #sessions
-dn
num of downloads needed to finish before simulation stops (default 1000)
-ss
num of sessions needed to finish before simulation stops (default 50)
-ot
observing completion rate starting time (default 0)
-ow
observing completion rate window (default 50)
-msr
using real measurement data if set 'true' (default false)
-check
check on/off status of each connection if set 'true' (default false)