LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2009, 08:36 PM   #1
Cataj
LQ Newbie
 
Registered: May 2009
Posts: 12

Rep: Reputation: 0
Cannot create nodes in ns-allinone-2.30 using the 'set n0 [$ns node]' command


As per the ns2 tutorial http://www.isi.edu/nsnam/ns/tutorial/ to set up nodes the command set n0 [$ns node] is used, when I try this command I get an error, I can not also open the files including all the code in tutorials that you can use as a base point. The errors I get are as below for setting up the nodes:

% set ns [new Simulator]
_o11
% set nf [open out.nam w]
file4
% $ns namtrace-all $nf
file4
% proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
% set n0 [$ns node]
class Node: constructor failed: invalid command name "_o4 _o11"
% set n1 [$ns node]
class Node: constructor failed: invalid command name "_o4 _o11"


To display the TCL files the following error occurs:

% ns ns-simple.tcl
error when calling class OldSim: ns-simple.tcl

Any help would be greatly appreciated as I need ns2 for my dissertation urgently and I cannot find any way of resolving the issues.
 
Old 05-29-2009, 07:05 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,514

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Please start here
http://www.isi.edu/nsnam/ns/tutorial/nsscript1.html

And have a look at this thread to see some of the
examples put together into a workable tcl script.
http://www.linuxquestions.org/questi...roblem-726993/
.....
ns-simple.tcl , have a look here
http://nile.wpi.edu/NS/Example/ns-simple.tcl
... open it with 'ns ns-simple.tcl' and click the "Play button" in nam.
http://nile.wpi.edu/NS/simple_ns.html
.....
P.S.: I can't see where you got your file, or what made
you write it in that way ..... a direct link may help.
And please put code into code tags ....
http://www.linuxquestions.org/questi....php?do=bbcode
.....

Last edited by knudfl; 05-29-2009 at 01:51 PM.
 
  


Reply



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
gtk-gnutella - no hosts/nodes except pseudo UDP node. Calum Linux - Software 5 01-24-2008 06:00 AM
Linux cluster - master node can't connect to slave nodes anymore Baerek Linux - Networking 6 03-30-2007 02:02 PM
SSH from master node to compute nodes w/out passwd haiders Linux - Networking 2 09-20-2006 11:50 AM
I can`t create a device node in /dev gcasados Slackware 8 02-21-2005 05:17 AM
How do i create an a/c at all nodes in the cluster dogma Linux - Networking 4 05-19-2003 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration