LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Closed Thread
 
Search this Thread
Old 01-17-2006, 07:57 AM   #1
vivekr
Member
 
Registered: Nov 2005
Location: Coimbatore,India
Distribution: Fedora Core4
Posts: 68

Rep: Reputation: 15
Problem with ns2


I am extremely sorry for posting this in more than one section but since this is urgent and am looking for quick response I had no other go than to opt for this section too.

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 01-18-2006, 01:32 AM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Have you tried running the example scripts in the ns2 tutorial. http://www.isi.edu/nsnam/ns/tutorial/index.html

Also, where did you install ns from - did you dowload it from the above website, or somewhere else.

It appears that you have a newer version of ns than the script was written for.

Aside from that, I can't help other than to say that ns error messages are very unhelpful from my experience...

--Ian
 
Old 01-18-2006, 05:15 PM   #3
vivekr
Member
 
Registered: Nov 2005
Location: Coimbatore,India
Distribution: Fedora Core4
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for ur response..
And actually a small error has crept in and I managed to rectify it..
It seems when ns command is used inside the prompt the file will not be executed as a single interrelated file. It operates on each and every line independently. So thats the problem. Thanks to IBell again
 
Old 07-22-2006, 02:07 AM   #4
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Rep: Reputation: 15
Can u add some more info abt this rectification!!

Though its very simple, to add some more clarity to vivekr message...

warning: using backward compatibility mode
error when calling class OldSim: example1.tcl

This warning will occur if you are trying to execute the example1.tcl from %ns prompt..

[root@localhost ns-2.29]# ns example1b.tcl

I have saved the example1.tcl at ns-2.29 direc..and use ns to run the script..

Hope this information will help beginners ...

Last edited by bangoram; 07-22-2006 at 04:52 AM.
 
Old 07-22-2006, 06:48 AM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

"Urgent" is no excuse.
 
  


Closed Thread


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
ns2- network simulator problem vivekr Linux - Networking 5 02-16-2011 12:25 PM
Research with ns2 hafiz Linux - Networking 0 12-09-2005 01:38 AM
Ns2 ConfusedMonkey Linux - Software 3 10-05-2005 11:32 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


All times are GMT -5. The time now is 05:13 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