LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-16-2006, 06:20 PM   #1
vivekr
Member
 
Registered: Nov 2005
Location: Coimbatore,India
Distribution: Fedora Core4
Posts: 68

Rep: Reputation: 15
ns2- network simulator problem


Hai,
i was a little confused as to where to place my question..
and i decided my q would be more appropriate here ..

so.. after installing ns2.9... without any errors and a perfect validation now the ns spits the error

Code:
[vivek@localhost ns-2.29]$ ./ns
% ns example1.tcl
warning: using backward compatibility mode
error when calling class OldSim: example1.tcl
% cat example1.tcl
set ns [ new Simulator ]
set nf [ open out.nam w ]
$ns namtrace-all $nf
proc finish { }
{
  global ns nf
  $ns flush-trace
  close $nf
  exec nam out.name &
  exit 0
}
set n0 [ $ns node ]
set n1 [ $ns node ]
$ns duplex-link $n0 $n1 10ms DropTail
$ns at 5.0 "finish"
$ns run
%
I saw a lot of these kind in ns-mailing list with no proper solution.. so i resorted to LQ, my favourite
 
Old 07-22-2006, 01:56 AM   #2
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Rep: Reputation: 15
Unhappy Have u found any soln to this???

Hi Vivekr!!


Even I am stuk due to this error!!

Have u found any solutions ???

I have explained what I have did ---

I have downloaded one of ns2 example1 from the website "ns by example"

when I type this line--
ns example1.tcl (with much curiosity to see an output)

I am getting this following error:

error when calling class OldSim: example1.tcl


But some how I got this info {class OldSim -superclass Simulator}
Do you know how to fix this problem,even I am unable to find any information about this in ns-mailing list...


Thanks a lot!!!

Bango-Ram
 
Old 10-08-2007, 01:01 PM   #3
mrbhush
LQ Newbie
 
Registered: Sep 2007
Location: Chennai,India
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by vivekr View Post
Hai,
i was a little confused as to where to place my question..
and i decided my q would be more appropriate here ..

so.. after installing ns2.9... without any errors and a perfect validation now the ns spits the error

Code:
[vivek@localhost ns-2.29]$ ./ns
% ns example1.tcl
warning: using backward compatibility mode
error when calling class OldSim: example1.tcl
% cat example1.tcl
set ns [ new Simulator ]
set nf [ open out.nam w ]
$ns namtrace-all $nf
proc finish { }
{
  global ns nf
  $ns flush-trace
  close $nf
  exec nam out.name &
  exit 0
}
set n0 [ $ns node ]
set n1 [ $ns node ]
$ns duplex-link $n0 $n1 10ms DropTail
$ns at 5.0 "finish"
$ns run
%
I saw a lot of these kind in ns-mailing list with no proper solution.. so i resorted to LQ, my favourite

Hai Vivek..

After installstion.
i think u need to un the following commands.
First u need to save a tcl program in Bin folder.after that run this command

./ns filename.tcl

then it will create .tr and .nam file automatically in bun folder.
then u need to run

./nam filename.nam (example out.nam).

i think it will solve ur problem........
 
Old 01-29-2009, 10:43 AM   #4
202eng
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Re: error when calling class OldSim: example1.tcl

I had the same error and here's what worked for me.
Enter the command directly at the home prompt, do not first open ns.
Here's what I'm saying:

[USERNAME@localhost ~]$ ns example1.tcl


Good luck
 
Old 03-06-2009, 06:13 AM   #5
shojaru
LQ Newbie
 
Registered: Mar 2009
Distribution: Ubuntu 9.04
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by mrbhush View Post
Hai Vivek..

After installstion.
i think u need to un the following commands.
First u need to save a tcl program in Bin folder.after that run this command

./ns filename.tcl

then it will create .tr and .nam file automatically in bun folder.
then u need to run

./nam filename.nam (example out.nam).

i think it will solve ur problem........

I did follow ur steps. but when I type ./nam out , it says:

"Cannot connect to existing nam instance.Starting a new one...
nam: Unable to open the file "out.nam" "
 
Old 02-16-2011, 12:25 PM   #6
subicutipe
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
helo all,,
I m new to dis,and starting from the scratch.
Can u please tell which version of linux i must install to get best configuration of NS2
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Simulator query bhuvan007 Linux - Networking 1 03-04-2006 01:12 AM
problem with NS2 cain_eve Programming 1 04-17-2005 03:32 PM
how to set path? here a meet the problem with ns2 installation cain_eve Linux - Newbie 12 12-16-2004 05:09 PM
Best Linux?unix free router/network simulator hasan Linux - Software 1 06-29-2004 03:06 AM
Problem with insatlling a Simulator-undefined symbol flock invinciblemk Linux - Software 0 03-23-2004 10:06 AM


All times are GMT -5. The time now is 10:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration