LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-30-2013, 02:34 AM   #1
thasneemjaleel
LQ Newbie
 
Registered: Jan 2013
Posts: 1

Rep: Reputation: Disabled
Ns2 programmig


im new to ns2 pgming.i would like to get some basic ideas regarding the compilations and executuion of ns2 programs.when i tried to compile i got the following messages from the terminal

invalid command name "new"
while executing
"new Simulator"
invoked from within
"set ns [new Simulator]"


what is the reason for these messages.
 
Old 01-30-2013, 02:54 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

Rep: Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284
Welcome to LQ.

Which version of of ns2 is used, like ns-allinone-2.34 ?
And : Are some of the basic tcl files working OK ?
http://www.isi.edu/nsnam/ns/tutorial/ >>>
http://www.isi.edu/nsnam/ns/tutorial.../example1a.tcl
http://www.isi.edu/nsnam/ns/tutorial.../example1b.tcl
http://www.isi.edu/nsnam/ns/tutorial...s/example2.tcl
http://www.isi.edu/nsnam/ns/tutorial...s/example3.tcl

Example template
Code:
# start with these lines :

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
}

#######################
#
#    Write all other commands here.
#
#######################

# end with :

$ns at 5.0 "finish"
$ns run
"How to use a file.tcl", the command is : $ ns example.tcl

-

Last edited by knudfl; 01-30-2013 at 02:59 AM.
 
Old 02-01-2013, 01:05 AM   #3
thirumagal27
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Rep: Reputation: Disabled
hi
Does ns2 simulator support Location Aided Routing(LAR) protocol?
 
Old 02-01-2013, 03:24 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,683

Rep: Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284Reputation: 3284
Post # 3 : Does ns2 simulator support Location Aided Routing (LAR) protocol ?

Probably. Google shows 4 million hits. Please read some of the information
https://www.google.com/webhp?hl=all#...1e5bf733a4b650

"Scolar" http://scholar.google.com/scholar?q=...ed=0CC0QgQMwAA

-
 
  


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
want to install ns2.29.3 along with mannasim patch for ns2.29 jeevanpinto Linux - Software 4 10-02-2013 12:09 AM
how to install both ns2.28 and ns2.34 versions on ubuntu 10.04? popoaung Linux - Software 3 06-10-2013 04:52 PM
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM

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

All times are GMT -5. The time now is 02:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration