new simulator problem
Hi all i hav problem in NS2. whenever creating an new simulator it shows an error for invalid command name "new". how to solve this problem plz help me
Thanks in advance Nanda |
Welcome to LQ.
A command in ns2 would be 'ns file.tcl' Or what have you got, and which command are you doing ? ? |
New simulator problem
set ns [new Simulator] - in this line throws an error for invalid command "new"
set n0 [$ns node] set n1 [$ns node] $ns duplex-link $n0 $n1 1Mb 2ms DropTail set udp0 [new Agent/UDP] $ns attach-agent $n0 $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 attach-agent $udp0 set null0 [new Agent/Null] $ns attach-agent $n1 $null0 $ns connect $udp0 $null0 $ns at 1.0 “$cbr0 start” $ns run why this happening and what software i need to install for this plz help me thanks.. Nanda |
2 Attachment(s)
Example ( Template )
http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html The 'file.tcl' : Code:
set ns [new Simulator] Please try out some of the examples in ns-2.33/tcl/ex/ and also see how they are written. EDIT : Your code works ? ? .. see attached 'tcl files' Rename to suffix .tcl before use. ..... |
1 Attachment(s)
The file '3file3.tcl : Please push the play button ... and wait .....
..... |
Ns pblm
I hav installed active tcl only, i hav ns2.33 but i dont no how to install that give me an procedure to install ns2.33
Regards..! Nanda |
i hav executed ur coding its not working throws an same error. I think i hav problem in my software, can u guide me how to install d ns 2.33.
Codings r correct but problem in only s/w i didnt installed ns and nam |
The commnand 'ns' will work only, when ns-2.33 +
nam-1.13 are compiled with no errors. Suggest : Install from source to /usr/local/ , in this order : otcl-1.13, tclcl-1.19, ns-2.33, nam-1.13 . cd /home/"user"/tmp tar xvf <application> cd <application> ./configure ....... make .. 'su' (or sudo) make install. The source code for the tcl8.4 + tk8.4 installed on your OS must be unpacked to the folder with otcl and tclcl. Please configure otcl with : './configure --with-tcl=../tcl8.4(.xx)' And tclcl : './configure --with-tcl=../tcl8.4(.xx) --with-tk=../tk8.4(.xx)' The build requirements : It is a little different from Fedora's to various Ubuntu's. Please tell which Linux, name, version, to be used. ..... Ubuntu, Debian : (sudo) apt-get install libx11-dev libxmu-dev \ libxmu-headers libxt-dev tcl8.4-dev tk8.4-dev ..... |
Nam pblm
Hi i hav installed ns 2.29.2 with cygwin environment all my commands r working but if i execute $ ns example1b.tcl it throws an following error:
Sathya@server /usr/local/ns-allinone-2.29.2/ns-allinone-2.29/bin $ ns example1b.tcl Sathya@server /usr/local/ns-allinone-2.29.2/ns-allinone-2.29/bin $ 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 {[string equal [tk windowingsystem] "classic"] || [string equal [tk windowingsystem] "aqua"]} { bind Listbox <MouseWheel> { %W yview scroll [expr {..." Sathya@server /usr/local/ns-allinone-2.29.2/ns-allinone-2.29/bin |
'example1b.tcl' : Where did you find it ?
Please provide location, a link to the code, or please show the code, attached or in code tags. http://www.linuxquestions.org/questi....php?do=bbcode |
1 Attachment(s)
I got the code from here : http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html. coding has correct but problem in nam only it showing an error for nam could not open msg.
Plz help me.. Thanks and Regards..! Nanda |
1 Attachment(s)
Can 'nam' itself be run ?
Please try the command ./nam or nam , depending on the PATH you have set ... and location, cd nam-1/ ? 'nam' will display the attached image .... ..... |
Hi i hav installed ns2 with cygwin environment nam also working fine now thanks for ur kind reply. i need one more help how to transfer file between one computer to another using ns2. if u hav any coding plz attach
Thanks and Regards..! Nanda |
1 Attachment(s)
Hi while running my program it shows an following error:
$ ns tcp.tcl invalid command name "Application/TCPCNT" while executing "Application/TCPCNT create _o65 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Application/TCPCNT" ("for" body line 17) invoked from within "for {set i 0} {$i < $streams} {incr i} { # 3. Create objects for the TCP sender and receiver and specify maximum # window sizes set tcpz($i) [new ..." (file "tcp.tcl" line 37) I want to send the file to another computer if u hav any coding plz attach me..! Thanks and Regards Nanda |
1 Attachment(s)
# 14 : Code bug ?
..... Have a look at this 'tcp.tcl' ( Attached ) : http://www.informatik.uni-mannheim.d...xample/tcp.tcl http://www.informatik.uni-mannheim.d...IP/ns-example/ 'ns 2tcp.tcl.txt' will create the file 'out.nam' in the current directory. 'out.nam' can be used with nam : 'nam' > > File > "Open..." : will display the simulation, please push "Play", and wait for a minute ... ..... |
All times are GMT -5. The time now is 10:22 PM. |