Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-28-2009, 09:36 PM   #1
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 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]
% set nf [open out.nam w]
% $ns namtrace-all $nf
% 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, 08:05 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,735

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Welcome to LQ.

Please start here

And have a look at this thread to see some of the
examples put together into a workable tcl script.
ns-simple.tcl , have a look here
... open it with 'ns ns-simple.tcl' and click the "Play button" in nam.
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 ....

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


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

All times are GMT -5. The time now is 02:50 PM.

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