[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] MNS V2.0 - Help Me Please
Hi,
I am a novice to both MPLS and NS-2, i just installed
the MNS V2.0 on my Linux system, i was trying to run
thro some examples so that i can get a grasp of MNS, i
am attaching the example code and the error that i got
along with this mail. Any help is appriciated.
############## ex1.tcl code ################
#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-1.0a10/nam out.nam &
exit 0
}
# Insert your own code for topology creation
# and agent definitions, etc. here
# Node Defenition
set Node0 [$ns node]
set LSR1 [$ns mpls-node]
set LSR2 [$ns mpls-node]
set LSR3 [$ns mpls-node]
set Node4 [$ns node]
# Define links between these nodes
$ns duplex-link $Node0 $LSR1 2Mb 10ms CBQ
$ns duplex-link $LSR1 $LSR2 1Mb 10ms CBQ
$ns duplex-link $LSR2 $LSR3 1Mb 10ms CBQ
$ns duplex-link $LSR3 $Node4 1Mb 10ms CBQ
# Creating Ldp Agent on all the mpls nodes
# setup-er-lsp{FEC ER(Explicit Route)
LSPID}
$ns at 0.1 "$LSR1 setup-er-lsp 3 1_2_3 1000"
$ns at 0.1 "$LSR1 setup-er-lsp 3 1_2_3 1100"
# setup-cr-lsp{FEC ER LSPID Bandwidth BufferSize
PacketSize Setup-prio HoldingPrio
#ns at 0.1 "$LSR1 setup-cr-lsp 3 1_2_3 1200 350K 400
200 7 3"
$ns at 1.0 "$SBT start"
$ns at 1.0 "$HBT start"
$ns at 1.0 "$RT1 start"
$ns at 10.0 "$LSR1 setup-cr-lsp 3 1_2_3 1300 450K 400
200 7 3"
$ns at 11.0 "$RT2 start"
$ns at 30.0 "$RT2 stop"
$ns at 31.0 "$LSR1 release-lsp-using-release 1300"
$ns at 40.0 "$SBT stop"
$ns at 40.0 "$HBT stop"
$ns at 40.0 "$RT1 stop"
#Call the finish procedure after 5 seconds simulation
time
$ns at 41.0 "finish"
#Run the simulation
$ns run
##########################End of code#############
##################The error that i got is ########
[Shyam@b348n ns-2.1b8a]$ ./ns myexample/mpls/ex1.tcl
can't read "SBT": no such variable
while executing
"$ns at 1.0 "$SBT start""
(file "myexample/mpls/ex1.tcl" line 48)
[Shyam@b348n ns-2.1b8a]$
###############END of ERROR #######################
Thanks in advance
Shyam
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com