Re: [ns] help needed to rectify error......

2009-05-16 Thread Nikheel Kumar

thanx for coopration i got the error

:)

On Sat, May 16, 2009 at 11:17 AM, Nikheel Kumar iamnikh...@gmail.comwrote:

 *hi all,

 friends this tcl script is very necessary for my thesis please replay ASAP.
 i am using n-2.31 with cygwin Actually i want to simulate short session and
 to measure the distribution of the transmission duration of the number of
 ongoing connections and the throughput in TCP connections. for this i use
 monitoring the number of session. it will be look like following scenario::
 *


 S(1)  
 .   |
 .   |
 .   |
 .
 |---ND(1)
 ...D(NodeNb)
 .   |
 .   |
 .   |
 S(NodeNb)-

 *for this tcl file is as follows:*

 set ns [new Simulator]

 #this file contain transfer time of different connection
 set Out [open Out.ns w]

 #next file will contain the number of connections
 set Conn [open Conn.tr w]

 #open the trace file
 set tf [open out.tr w]
 $ns trace-all $tf

 #we define the 3 files that will be used to trace the queue size,
 #the bandwidth and lasses at the bottleneck.
 set qsize [open queuesize.tr w]
 set qbw [open queuebw.tr w]
 set qlost [open queuelost.tr w]

 #defining the topology
 set N [$ns node]
 set D [$ns node]
 $ns duplex-link $N $D 2Mb 1ms DropTail
 $ns queue-limit $N $D 3000

 #number of sources
 set NodeNb 6

 #number of flows per source node
 set NumberFlows 530

 #Nodes and links
 for { set j 1 } {$j=$NodeNb} {incr j} {
 set S($j) [$ns node]
 $ns duplex-link $S($j) $N 100Mb 1ms DropTail
 $ns queue-limit $S($j) $N 1000
 }

 #TCP sources and destinations
 for {set i 1} {$i=$NodeNb} { incr i } {
 for {set j 1} {$j=$NumberFlows} { incr j } {
 set tcpsrc ($i, $j) [new Agent/TCP/Newreno]
 set tcp_snk ($i, $j) [new Agent/TCPSink]
 $tcpsrc($i, $j) set window_ 2000
 }
 }

 #connections
 for {set i 1} {$i=$NodeNb} { incr i } {
 for {set j 1} {$j=$NumberFlows} { incr j } {
 $ns attach-agent $S($i) $tcpsrc($i, $j)
 $ns attach-agent $D $tcp_snk($i, $j)
 $ns connect $tcpsrc($i, $j) $tcp_snk($i, $j)
 }
 }

 #ftp sources
 for {set i 1} {$i=$NodeNb} { incr i } {
 for {set j 1} {$j=$NumberFlows} { incr j } {
 set ftp($i, $j) [$tcpsrc($i, $j) attach-source FTP]
 }
 }

 #generator for the random size of files
 set rng1 [new RNG]
 $rng1 seed 0
 set rng2 [new RNG]
 $rng2 seed 0

 #random interarrival time of tcp transfers at each source i
 set RV [new RandomVariable/Exponential]
 $RV set avg_ 0.045
 $RV use-rng $rng1

 #random size of files to transmit
 set RV [new RandomVariable/Exponential]
 $RVSize set avg_ 1
 $RVSize set shape_ 1.5
 $RVSize use-rng $rng2

 #we nw define the begining times of transfers and the transfer sizes
 #arrivals of sessions follow a poisson process
 for {set i 1} {$i=$NodeNb} { incr i } {
 set t [$ns now]
 for {set j 1} {$j=$NumberFlows} { incr j } {

 #set the begining time of next transfer from source i
 set t [expr $t + [$RV value]]
 set Conct($i, $j) $t

 #set the size of next transfer from source i
 set Size($i, $j) [expr [$RVSize value]]
 $ns at $Conct($i, $j) $ftp($i, $j) send $Size($i, $j)

 #update the number of flows
 $ns at #Conct($i, $j) countFlows $i 1
 }
 }

 #next is a recursive procedure that checks for each session whether
 #it has ended. the procedure calls itself each 0.1 sec (this is set in
 #the variable time)
 #if a connection has ended then we print in the file $Out
 #* the connection identifiers r i and j
 #* the start and end time of the connection,
 #* the throughput of the session,
 #* the size of the transfer in bytes
 # and we further defines another begining  of transfer after a random times

 proc Test {} {
 global  Conct tcpsrc Size NodeNB NumberFlows ns RV ftp Out tcp_snk
 RVSize
 set time 0.1
 for {set i 1} {$i=$NodeNb} { incr i } {
 for {set j 1} {$j=$NumberFlows} { incr j } {

 #we now check if the transfer is over
 if {[$tcpsrc($i, $j) set ack_]==[$tcpsrc($i, $j) set maxseq_]}
 {
 if {[$tcpsrc($i, $j) set ack_]=0} {

 #if the transfer is over, we print relevent information  in $Out
 puts $Out $i, $j\t$Conct($i, $j)\t[expr [$ns now]]\t\
 [expr ($Size($i, $j))/(1000*([expr [$ns now ]] - $Conct($i,
 $j)))]\t$Size($i, $j)
 countFlows $i 0
 $tcpsrc($i, $j) reset
 $tcp_snk($i, $j) reset
 }
 }
 }
 }
 $ns at [expr [$ns now]+$time] Test
 }
 for {set j 1} {$j=$NodeNb} { incr j } {
 set Cnts($j) 0
 }

 # the following recursive procedure updates the number of connections as a
 function of time.
 # Each

[ns] help needed to rectify error......

2009-05-15 Thread Nikheel Kumar

*hi all,

friends this tcl script is very necessary for my thesis please replay ASAP.
i am using n-2.31 with cygwin Actually i want to simulate short session and
to measure the distribution of the transmission duration of the number of
ongoing connections and the throughput in TCP connections. for this i use
monitoring the number of session. it will be look like following scenario::
*


S(1)  
.   |
.   |
.   |
.
|---ND(1)
...D(NodeNb)
.   |
.   |
.   |
S(NodeNb)-

*for this tcl file is as follows:*

set ns [new Simulator]

#this file contain transfer time of different connection
set Out [open Out.ns w]

#next file will contain the number of connections
set Conn [open Conn.tr w]

#open the trace file
set tf [open out.tr w]
$ns trace-all $tf

#we define the 3 files that will be used to trace the queue size,
#the bandwidth and lasses at the bottleneck.
set qsize [open queuesize.tr w]
set qbw [open queuebw.tr w]
set qlost [open queuelost.tr w]

#defining the topology
set N [$ns node]
set D [$ns node]
$ns duplex-link $N $D 2Mb 1ms DropTail
$ns queue-limit $N $D 3000

#number of sources
set NodeNb 6

#number of flows per source node
set NumberFlows 530

#Nodes and links
for { set j 1 } {$j=$NodeNb} {incr j} {
set S($j) [$ns node]
$ns duplex-link $S($j) $N 100Mb 1ms DropTail
$ns queue-limit $S($j) $N 1000
}

#TCP sources and destinations
for {set i 1} {$i=$NodeNb} { incr i } {
for {set j 1} {$j=$NumberFlows} { incr j } {
set tcpsrc ($i, $j) [new Agent/TCP/Newreno]
set tcp_snk ($i, $j) [new Agent/TCPSink]
$tcpsrc($i, $j) set window_ 2000
}
}

#connections
for {set i 1} {$i=$NodeNb} { incr i } {
for {set j 1} {$j=$NumberFlows} { incr j } {
$ns attach-agent $S($i) $tcpsrc($i, $j)
$ns attach-agent $D $tcp_snk($i, $j)
$ns connect $tcpsrc($i, $j) $tcp_snk($i, $j)
}
}

#ftp sources
for {set i 1} {$i=$NodeNb} { incr i } {
for {set j 1} {$j=$NumberFlows} { incr j } {
set ftp($i, $j) [$tcpsrc($i, $j) attach-source FTP]
}
}

#generator for the random size of files
set rng1 [new RNG]
$rng1 seed 0
set rng2 [new RNG]
$rng2 seed 0

#random interarrival time of tcp transfers at each source i
set RV [new RandomVariable/Exponential]
$RV set avg_ 0.045
$RV use-rng $rng1

#random size of files to transmit
set RV [new RandomVariable/Exponential]
$RVSize set avg_ 1
$RVSize set shape_ 1.5
$RVSize use-rng $rng2

#we nw define the begining times of transfers and the transfer sizes
#arrivals of sessions follow a poisson process
for {set i 1} {$i=$NodeNb} { incr i } {
set t [$ns now]
for {set j 1} {$j=$NumberFlows} { incr j } {

#set the begining time of next transfer from source i
set t [expr $t + [$RV value]]
set Conct($i, $j) $t

#set the size of next transfer from source i
set Size($i, $j) [expr [$RVSize value]]
$ns at $Conct($i, $j) $ftp($i, $j) send $Size($i, $j)

#update the number of flows
$ns at #Conct($i, $j) countFlows $i 1
}
}

#next is a recursive procedure that checks for each session whether
#it has ended. the procedure calls itself each 0.1 sec (this is set in
#the variable time)
#if a connection has ended then we print in the file $Out
#* the connection identifiers r i and j
#* the start and end time of the connection,
#* the throughput of the session,
#* the size of the transfer in bytes
# and we further defines another begining  of transfer after a random times
proc Test {} {
global  Conct tcpsrc Size NodeNB NumberFlows ns RV ftp Out tcp_snk
RVSize
set time 0.1
for {set i 1} {$i=$NodeNb} { incr i } {
for {set j 1} {$j=$NumberFlows} { incr j } {

#we now check if the transfer is over
if {[$tcpsrc($i, $j) set ack_]==[$tcpsrc($i, $j) set maxseq_]} {
if {[$tcpsrc($i, $j) set ack_]=0} {

#if the transfer is over, we print relevent information  in $Out
puts $Out $i, $j\t$Conct($i, $j)\t[expr [$ns now]]\t\
[expr ($Size($i, $j))/(1000*([expr [$ns now ]] - $Conct($i,
$j)))]\t$Size($i, $j)
countFlows $i 0
$tcpsrc($i, $j) reset
$tcp_snk($i, $j) reset
}
}
}
}
$ns at [expr [$ns now]+$time] Test
}
for {set j 1} {$j=$NodeNb} { incr j } {
set Cnts($j) 0
}

# the following recursive procedure updates the number of connections as a
function of time.
# Each 0.2 it prints them in to $Conn. This is done by calling the procedure
with the sign
# parameter equal 3 (in which case the ind parameter does not play a
role). the procedure
# is also called by the Test procedure whenever a connection from source i
ends by 

[ns] help needed

2009-05-12 Thread Nikheel Kumar

*hi friends,

following is the code for TCP connection that shares a noisy bottle link
with a UDP connection.*

set ns [new Simulator]
$ns color 1 Blue
$ns color 2 Red

#open the NAM trace file
set nf [open first_out.nam w]
$ns namtrace-all $nf

#open the trace file
set tf [open first_out.tr w]
set windowVsTime2 [open WindowVsTimeNReno w]
$ns trace-all $tf

#define a 'finish' procedure
proc finish {} {
global ns nf tf
$ns flush-trace
close $nf
close $tf
exec nam first_out.nam 
exit o
}

#creating four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]

$ns at 0.1 $n1 lable \CBR\
$ns at 1.0 $n0 lable \FTP\

#create links between the nodes
$ns duplex-link $n0 $n2 2Mb 10ms DropTail
$ns duplex-link $n1 $n2 2Mb 10ms DropTail
$ns simplex-link $n2 $n3 0.07Mb 20ms DropTail
$ns simplex-link $n3 $n2 0.07Mb 20ms DropTail

#set queue size of link (n2-n3) to 10
$ns queue-limit $n2 $n3 10

#Monitor the queue for link (n2-n3) (for NAM)
$ns simplex-link-op $n2 $n3 queuePos 0.5

#set error model on link n3 to n2
set loss_module [new ErrorModel]
$loss_module set rate_ 0.2
$loss_module ranvar [new RandomVariable/Uniform]
$loss_module drop-target [new Agent/Null]
$ns lossmodel $loss_module $n2 $n3

#setup a tcp connection
set tcp [new Agent/TCP/Newreno]
$ns attach-agent $n0 $tcp
set sink [new Agent/TCPSink/DelAck]
$ns attach-agent $n3 $sink
$ns connect $tcp $sink
$tcp set fid_ 1

#set ftp over tcp connection
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ftp set type_ FTP

#setup a UDP connection
set udp [new Agent/UDP]
$ns attach-agent $n1 $udp
set null [new Agent/Null]
$ns attach-agent $n3 $null
$ns connect $udp $null
$udp set fid_ 2

#setup a CBR over UDP connection
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type_ CBR
$cbr set packet_size_ 1000
$cbr set rate_ 0.01mb
$cbr set random_ false

#schedule events for the CBR anf ftp agents
$ns at 0.1 $cbr start
$ns at 1.0 $ftp start
$ns at 624.0 $ftp stop
$ns at 624.5 $cbr stop

#printing the window size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ now]
set cwnd [$tcpSource set cwnd_]
puts $file $now $cwnd
$ns at [expr $now+$time] plotWindow $tcpSource $file }
$ns at 1.1 plotWindow $tcp $windowVsTime2

#sample the bottleneck queue every 0.1 sec. store the trace in qm.out
set qmon [$ns monitor-queue $n2 $n3 [open qm.out w] 0.1];
[$ns link $n2 $n3] queue-sample-timeout; # [$ns link $n2 $n3] start-tracing

#detach tcp and sink agent (not really necessary)
$ns at 624.5 $ns detach-agent $n0 $tcp ; $ns detach-agent $n3 $sink

$ns at 625.0 finish
$ns run

*during running the above tcl scrit it gives following error:
*
$ns first.tclp
ns: _o13 lable CBR:
(_o13 cmd line 1)
invoked from within
_o13 cmd lable CBR
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o13 line2)
(SpliiObjest unknow line 2)
invoked from within
_o13 lable CBR

*what is this is this error*


[ns] invalid command name MAC_MIB help needed

2009-05-10 Thread Nikheel Kumar

hi all,

please tell me what is invalid command name MAC_MIB error. i tired to search
for this. plz help me.

regards,


[ns] nam problem

2009-05-06 Thread Nikheel Kumar

hello all,

whenever i m running nam it gives following message:

  Cannot connect to the existing nam instance. starting a new one

why this message every time comes.

regards,


[ns] ARODV routing protocol

2009-05-03 Thread Nikheel Kumar

hello friends,

friends in need ARODV routing protocol's tcl script. if u have please mail
me that tcl script.

thanks


[ns] make error

2009-04-30 Thread Nikheel Kumar

hi all

while i am using make in my ns directory(ns-2.31):

$ make clean; make depend; make

it gives the following error

Makefile:74: *** missing seperator (did you mean TAB instead of 8 speaces?)
stopped
Makefile:74: *** missing seperator (did you mean TAB instead of 8 speaces?)
stopped
Makefile:74: *** missing seperator (did you mean TAB instead of 8 speaces?)
stopped

i open Makefile.in file and remove above error but still gives the same
problem. please explain what is this error

regards,


[ns] help needed

2009-04-29 Thread Nikheel Kumar

hello all,

i am working on ns-2.31. i make some changes in 802_11.cc files and save it
as my_802_11.cc now i want to use this file with 802_11.cc in my wireless
simulation for comparing it with the 802_11.cc file. how can i do this?

please help me

regards,


[ns] help needed

2009-04-29 Thread Nikheel Kumar

hello all,

i am working on ns-2.31. i make some changes in 802_11.cc file and save it
as my_802_11.cc and i want to use this both file (802_11.cc  my_802_11.cc)
in my wireless simulation for comparing with each other for knowing
throughput enhancement . how can i do this?

please help me

regards,


[ns] How to add/modify wireless MAC protocol....

2009-04-26 Thread Nikheel Kumar

hi all

dear friends i am an PG student working towards my thesis work i want to do
some modification in wireless MAC protocol can anybody tell me how can i
make this and what are d different files(*.cc, *.h, *.tcl) in which i have
to make changes.

i also want to compare my modified protocol with d existing protocol how can
i do this

please reply ASAP

thanks


[ns] help needed

2009-04-21 Thread Nikheel Kumar

hello all,

friends i m an postgraduate student and want to simulate admission control
algorithm for IEEE 802.11e wireless technology please give suggestion for
this that how can i simulate this scenario. where should i have to make
changes either in .cc file or in tcl script. actually i want to use
ns-aedcf semi package but i don't know how to install it in ns-2.31.
please give suggestion as soon as possible.

thanks

nikhil


[ns] what is invalid command PLevels and how to install semi package

2009-04-17 Thread Nikheel Kumar

*hello friends,

i want to simulate various wireless scenario, i m using semipackage
ns-afedcf i don't know how to install it in ns-2.31.here some lines of tcl
script main.tcl  of package to access different wireless scenario:*


# Set defaults; its important to set defaults before parsing
# command line arguments, so that defaults can be overridden

set modeDCF;# mode for this test DCF/PCF
set pcf_period0;# CFP period for pcf mode
set pcf_duration0;# CFP duration for pcf mode
set endtime15.0;# duration of the simulation
set title_snenario-test;# default title for the
scenario
set idea_mac0;# default cleverness of mac
;# 0 - normal
;# 1 - persistent slotting
;# 0 - PDCF

set val(chan)Channel/WirelessChannel;# Channel Type
set val(prop)Propagation/TwoRayGround;# radio-propagation model
set val(netif)Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll)LL;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen)50;# max packet in ifq
set val(rp)DSDV;#
set val(x)50
set val(y)50

Phy/WirelessPhy set CPThresh_2000
Phy/WirelessPhy set per_0.0
Mac/802_11 set bandwidth_36Mb
PLevels set max_plevels_8
PLevels set plevels_8
MAC_MIB set RTSThreshold_3000
MAC_MIB set ShortRetryLimit_7
MAC_MIB set LongRetryLimit_4
PHY_MIB set MinimumBandwidth_6Mb
PHY_MIB set SlotTime_0.09
PHY_MIB set SIFS_0.16

PHY_MIB set PreambleLength_ 20 ;#20us
PHY_MIB set PLCPHeaderLength_ 4;#4us
PHY_MIB set CCATime_ 3 ;#4us
PHY_MIB set RxTxTurnaroundTime_ 1  ;#1us

PHY_MIB set CWMin_031
PHY_MIB set CWMax_01023
PHY_MIB set CWMin_131
PHY_MIB set CWMax_11023
PHY_MIB set CWMin_215
PHY_MIB set CWMax_231
PHY_MIB set CWMin_37
PHY_MIB set CWMax_315
PHY_MIB set CWMin_40
PHY_MIB set CWMax_40
PHY_MIB set CWMin_50
PHY_MIB set CWMax_50
PHY_MIB set CWMin_60
PHY_MIB set CWMax_60
PHY_MIB set CWMin_70
PHY_MIB set CWMax_70
PHY_MIB set Aifsn_02
PHY_MIB set Aifsn_11
PHY_MIB set Aifsn_21
PHY_MIB set Aifsn_31
PHY_MIB set Aifsn_40
PHY_MIB set Aifsn_50
PHY_MIB set Aifsn_60
PHY_MIB set Aifsn_70
PHY_MIB set BackoffThresh_0 1   ;# 1 enable the
dynamic threshold for priority 0, 0 disable
PHY_MIB set BackoffThresh_1 1   ;# 1 enable the
dynamic threshold for priority 1, 0 disable
PHY_MIB set BackoffThresh_2 1   ;# 1 enable the
dynamic threshold for priority 2, 0 disable
PHY_MIB set BackoffThresh_3 1   ;# 1 enable the
dynamic threshold for priority 3, 0 disable
PHY_MIB set BackoffThresh_4 1   ;# 1 enable the
dynamic threshold for priority 4, 0 disable
PHY_MIB set BackoffThresh_5 1   ;# 1 enable the
dynamic threshold for priority 5, 0 disable
PHY_MIB set BackoffThresh_6 1   ;# 1 enable the
dynamic threshold for priority 6, 0 disable
PHY_MIB set BackoffThresh_7 1   ;# 1 enable the
dynamic threshold for priority 7, 0 disable
#PHY_MOB set CWPFactor_02;# 1 for linear, 2 default (binary
exponential) #

###
# Usage

if {$argc  1} {
puts stderr usage: ns $argv0 scenario \[list of options\]
puts stderroptions:
puts stderr  varName=varValue
puts stderr  vectorName=value0,value1,value2...
puts stderroption example:
puts stderr  num_nodes=15
exit 1;
}


###
# Load up the scenario; allow it to override the above defaults

set scenario [lindex $argv 0]
set num_nodes [lindex $argv 1]
set random_num [lindex $argv 2]

puts % set scenario $scenario
puts Running scenario $scenario
puts num_nodes $num_nodes
source $scenario-scenario.tcl


###
# Parse remaining command line arguments to override any defaults




###
# Setup other vars

puts Creating $num_nodes nodes

# cookie appended to scenario name for filenames that are created
if {[info exists cookie]} {
set 

[ns] what is invalid command PLevels

2009-04-16 Thread Nikheel Kumar

*hello friends,

i want to simulate various wireless scenario, here some lines of tcl script
to access different wireless scenario:*



set modeDCF;# mode for this test DCF/PCF
set pcf_period0;# CFP period for pcf mode
set pcf_duration0;# CFP duration for pcf mode
set endtime15.0;# duration of the simulation
set title_snenario-test;# default title for the
scenario
set idea_mac0;# default cleverness of mac
;# 0 - normal
;# 1 - persistent slotting
;# 0 - PDCF

set val(chan)Channel/WirelessChannel;# Channel Type
set val(prop)Propagation/TwoRayGround;# radio-propagation model
set val(netif)Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll)LL;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen)50;# max packet in ifq
set val(rp)DSDV;#
set val(x)50
set val(y)50

Phy/WirelessPhy set CPThresh_2000
Phy/WirelessPhy set per_0.0
Mac/802_11 set bandwidth_36Mb
PLevels set max_plevels_8
PLevels set plevels_8
MAC_MIB set RTSThreshold_3000
MAC_MIB set ShortRetryLimit_7
MAC_MIB set LongRetryLimit_4
PHY_MIB set MinimumBandwidth_6Mb
PHY_MIB set SlotTime_0.09
PHY_MIB set SIFS_0.16
.
..
..

*i got following error:-*

$ ns main.tcl
invalid command name PLevels
  while executing
PLevels set max_plevels_  8

*what is this error for
plz help me*


[ns] what is invalid command PLevels

2009-04-15 Thread Nikheel Kumar

*hello friends,

here some lines of tcl script to access different wireless scenario:*



set modeDCF;# mode for this test DCF/PCF
set pcf_period0;# CFP period for pcf mode
set pcf_duration0;# CFP duration for pcf mode
set endtime15.0;# duration of the simulation
set title_snenario-test;# default title for the
scenario
set idea_mac0;# default cleverness of mac
;# 0 - normal
;# 1 - persistent slotting
;# 0 - PDCF

set val(chan)Channel/WirelessChannel;# Channel Type
set val(prop)Propagation/TwoRayGround;# radio-propagation model
set val(netif)Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll)LL;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen)50;# max packet in ifq
set val(rp)DSDV;#
set val(x)50
set val(y)50

Phy/WirelessPhy set CPThresh_2000
Phy/WirelessPhy set per_0.0
Mac/802_11 set bandwidth_36Mb
PLevels set max_plevels_8
PLevels set plevels_8
MAC_MIB set RTSThreshold_3000
MAC_MIB set ShortRetryLimit_7
MAC_MIB set LongRetryLimit_4
PHY_MIB set MinimumBandwidth_6Mb
PHY_MIB set SlotTime_0.09
PHY_MIB set SIFS_0.16
.
..
..

*i got following error:-*

$ ns main.tcl
invalid command name PLevels
  while executing
PLevels set max_plevels_  8

*what is this error for
plz help me*


[ns] error while running wireless simulation

2009-04-12 Thread Nikheel Kumar

*hi all,

friends actually i m new one in using ns so facing many problems while
solving error in running tcl file so kindly help me. i m running following
tcl file :*

# wireless3.tcl
# simulation of a wired-cum-wireless topology running with mobileIP
# ==
# Define options
# ==

set opt(chan)   Channel/WirelessChannel;# channel type
set opt(prop)   Propagation/TwoRayGround   ;# radio-propagation model
set opt(netif)  Phy/WirelessPhy;# network interface type
set opt(mac)Mac/802_11 ;# MAC type
set opt(ifq)Queue/DropTail/PriQueue;# interface queue type
set opt(ll) LL ;# link layer type
set opt(ant)Antenna/OmniAntenna;# antenna model
set opt(ifqlen) 50 ;# max packet in ifq
set opt(nn) 1  ;# number of mobilenodes
set opt(adhocRouting)   DSDV   ;# routing protocol

set opt(cp)  ;# cp file not used
set opt(sc)  ;# node movement file.

set opt(x)  670;# x coordinate of topology
set opt(y)  670;# y coordinate of topology
set opt(seed)   0.0;# random seed
set opt(stop)   250;# time to stop simulation

set opt(ftp1-start)  100.0

set num_wired_nodes  2
#set num_bs_nodes   2  ; this is not really used here.

# ==

# check for boundary parameters and random seed
if { $opt(x) == 0 || $opt(y) == 0 } {
  puts No X-Y boundary values given for wireless topology\n
}
if {$opt(seed)  0} {
  puts Seeding Random number generator with $opt(seed)\n
  ns-random $opt(seed)
}

# create simulator instance
set ns_   [new Simulator]

# set up for hierarchical routing
$ns_ node-config -addressType hierarchical

AddrParams set domain_num_ 3   ;# number of domains
lappend cluster_num 2 1 1  ;# number of clusters in each domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 1 1 2 1;# number of nodes in each cluster
AddrParams set nodes_num_ $eilastlevel ;# of each domain

set tracefd  [open wireless3-out.tr w]
set namtrace [open wireless3-out.nam w]
$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)

# Create topography object
set topo   [new Topography]

# define topology
$topo load_flatgrid $opt(x) $opt(y)

# create God
#   2 for HA and FA
create-god [expr $opt(nn) + 2]

#create wired nodes
set temp {0.0.0 0.1.0}   ;# hierarchical addresses
for {set i 0} {$i  $num_wired_nodes} {incr i} {
set W($i) [$ns_ node [lindex $temp $i]]
}

# Configure for ForeignAgent and HomeAgent nodes
$ns_ node-config -mobileIP ON \
 -adhocRouting $opt(adhocRouting) \
 -llType $opt(ll) \
 -macType $opt(mac) \
 -ifqType $opt(ifq) \
 -ifqLen $opt(ifqlen) \
 -antType $opt(ant) \
 -propType $opt(prop) \
 -phyType $opt(netif) \
 -channelType $opt(chan) \
 -topoInstance $topo \
 -wiredRouting ON \
 -agentTrace ON \
 -routerTrace OFF \
 -macTrace OFF

# Create HA and FA
set HA [$ns_ node 1.0.0]
set FA [$ns_ node 2.0.0]
$HA random-motion 0
$FA random-motion 0

# Position (fixed) for base-station nodes (HA  FA).
$HA set X_ 1.
$HA set Y_ 2.
$HA set Z_ 0.

$FA set X_ 650.
$FA set Y_ 600.
$FA set Z_ 0.

# create a mobilenode that would be moving between HA and FA.
# note address of MH indicates its in the same domain as HA.
$ns_ node-config -wiredRouting OFF

set MH [$ns_ node 1.0.1]
set node_(0) $MH
set HAaddress [AddrParams addr2id [$HA node-addr]]
[$MH set regagent_] set home_agent_ $HAaddress

# movement of the MH
$MH set Z_ 0.
$MH set Y_ 2.
$MH set X_ 2.

# MH starts to move towards FA
$ns_ at 100. $MH setdest 640. 610.
20.
# goes back to HA
$ns_ at 200. $MH setdest 2. 2.
20.

# create links between wired and BaseStation nodes
$ns_ duplex-link $W(0) $W(1) 5Mb 2ms DropTail
$ns_ duplex-link $W(1) $HA 5Mb 2ms DropTail
$ns_ duplex-link $W(1) $FA 5Mb 2ms DropTail

$ns_ duplex-link-op $W(0) $W(1) orient down
$ns_ duplex-link-op $W(1) $HA orient left-down
$ns_ duplex-link-op $W(1) $FA orient right-down

# setup TCP connections between a wired node and the MobileHost

set tcp1 [new Agent/TCP]
$tcp1 set class_ 2
set sink1 [new Agent/TCPSink]
$ns_ attach-agent $W(0) $tcp1
$ns_ attach-agent $MH 

[ns] error while making wireless simulation

2009-04-11 Thread Nikheel Kumar

*hi all,

friends there is error while running following tcl file on ns-2.31 in
cygwin:*

# A simple example for wireless simulation
# ==
# Define options
# ==

set val(chan)   Channel/WirelessChannel
set val(prop)   Propagation/TwoRayGround
set val(netif)  Phy/WirelessPhy
set val(mac)Mac/802_11
set val(ifq)Queue/DropTail/PriQueue
set val(ll) LL
set val(ant)Antenna/OmniAntenna
set val(x)  670   ;# X dimension of the topography
set val(y)  670   ;# Y dimension of the topography
set val(ifqlen) 50;# max packet in ifq
set val(seed)   0.0
set val(adhocRouting)   DSR
set val(nn) 3 ;# how many nodes are simulated
set val(cp) ../mobility/scene/cbr-3-test
set val(sc) ../mobility/scene/scen-3-test
set val(stop)   400.0   ;# simulation time

# =
# Main Program
# ==

#
# Initialize Global Variables
#

# create simulator instance

set ns_   [new Simulator]

# setup topography object

set topo[new Topography]

# create trace object for ns and nam

set tracefd [open wireless1-out.tr w]
set namtrace[open wireless1-out.nam w]

$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

# define topology
$topo load_flatgrid $val(x) $val(y)

#
# Create God
#
set god_ [create-god $val(nn)]

#
# define how node should be created
#

#global node setting

$ns_ node-config -adhocRouting $val(adhocRouting) \
 -llType $val(ll) \
 -macType $val(mac) \
 -ifqType $val(ifq) \
 -ifqLen $val(ifqlen) \
 -antType $val(ant) \
 -propType $val(prop) \
 -phyType $val(netif) \
 -channelType $val(chan) \
 -topoInstance $topo \
 -agentTrace ON \
 -routerTrace OFF \
 -macTrace OFF

#
#  Create the specified number of nodes [$val(nn)] and attach them
#  to the channel.

for {set i 0} {$i  $val(nn) } {incr i} {
  set node_($i) [$ns_ node]
  $node_($i) random-motion 0  ;# disable random motion
}


#
# Define node movement model
#
puts Loading connection pattern...
source $val(cp)

#
# Define traffic model
#
puts Loading scenario file...
source $val(sc)

# Define node initial position in nam

for {set i 0} {$i  $val(nn)} {incr i} {

# 20 defines the node size in nam, must adjust it according to your
scenario
# The function must be called after mobility model is defined

$ns_ initial_node_pos $node_($i) 20
}


#
# Tell nodes when the simulation ends
#
for {set i 0} {$i  $val(nn) } {incr i} {
$ns_ at $val(stop).0 $node_($i) reset;
}

$ns_ at  $val(stop).0002 puts \NS EXITING...\ ; $ns_ halt

puts $tracefd M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting)
puts $tracefd M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)
puts $tracefd M 0.0 prop $val(prop) ant $val(ant)

puts Starting Simulation...
$ns_ run


*i got following error:*


$ns wireless1.tcl
num_node is set 3
warning: Please use-channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
couldn't read file ../mobility/scene/cbr-3-test: no such file or directory
while executing
source.orig ../mobility/scene/cbr-3-test
(uplevel body line 1)
invoked from within
uplevel source.orig [list $fileName]
invoked from within
if [$instance_ is_http_url $fileName] {
setbuffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig [list $fileName]
...
(procedure source line 8)
invoked from within
source $val(cp)
(file wireless1.tcl line 121)


*please help me for this as soon as possible*


*thanx*


[ns] nam error urgent help needed

2009-04-10 Thread Nikheel Kumar

*hi all,
**
whenever i m running followin simple tcl file using ns-2.31 on Cygwin:-*

#Create a simulator object
set ns [new Simulator]

#Open the nam trace file
set nf [open out.nam w]

$ns namtrace-all
$nf

#Define a 'finish' procedure
proc finish {} {
  global ns nf
  $ns flush-trace
  #Close the trace file
  close $nf
  #Execute nam on the trace file
  exec nam out.nam 
  exit 0
}

# Insert your own code for topology creation
# and agent definitions, etc. here

#Call the finish procedure after 5 seconds simulation time
$ns at 5.0 finish

#Run the simulation

$ns run

*i got nam error/ message :*

bash-3.2$ nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
bind Listbox MouseWheel {
%W yview scroll [expr {- (%D/120)*4}] units
}
invoked from within
if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} {
bind Listbox MouseWheel {
%W yview scroll [expr {- (%D)}] units
}
bind Li...

how to solve this problem please tell me as soon as possible

thanx in advance


[ns] nam error urgent help needed

2009-04-09 Thread Nikheel Kumar

hi all,

whenever i m running followin simple tcl file:-

#Create a simulator object
set ns [new Simulator]

#Open the nam trace file
set nf [open out.nam w]

$ns namtrace-all
$nf

#Define a 'finish' procedure
proc finish {} {
  global ns nf
  $ns flush-trace
  #Close the trace file
  close $nf
  #Execute nam on the trace file
  exec nam out.nam 
  exit 0
}

# Insert your own code for topology creation
# and agent definitions, etc. here

#Call the finish procedure after 5 seconds simulation time
$ns at 5.0 finish

#Run the simulation

$ns run

i got nam error/ message :

bash-3.2$ nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
bind Listbox MouseWheel {
%W yview scroll [expr {- (%D/120)*4}] units
}
invoked from within
if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} {
bind Listbox MouseWheel {
%W yview scroll [expr {- (%D)}] units
}
bind Li...

how to solve this problem please tell me as soon as possible

thanx in advance


[ns] what is this invalid command MAC_MIB problem

2009-03-27 Thread Nikheel Kumar

invalid command MAC_MIB problem
hi all

i m working towards my thesis. i got a simulation package through google
ns-aedcf.tar.gz related to my work after untar it when i ran cl file
main_AEDCF_EDCF.tcl simulation as par readme file of d package it gives
error

invalid command MAC_MIB

what is this error n why this comes n how this can be resolved.

my ns2 installed properly becoz other simulations are running properly.

plz help me guys

replay ASAP