LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2012, 01:35 PM   #31
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641

# 30

? Is this a new install of an ns-allinone-2.26 ? ?
→ → The DRAND install cannot be used for ZMAC.

Are you quite sure that you are using the "zmac Makefile.in" ?

'grep -n logging zmac-Makefile.in.txt' shows this :
"267 : pushback/logging-data-struct.o \"

... There should be no words like "pushback/logging-data-stcp"
in any of the files in ns-2.26.

.
 
Old 05-07-2012, 02:23 PM   #32
visego
LQ Newbie
 
Registered: May 2012
Posts: 13

Rep: Reputation: Disabled
Thanks, Thanks and Thanks knudfl.

Have you worked with Z-MAC, DRAND or SMAC??

Regards,

Vicente
 
Old 05-07-2012, 02:45 PM   #33
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#32
Quote:
Have you worked with Z-MAC, DRAND or SMAC ? ?
No. Only the two hours, when I worked with two ns-2.26 builds today.
So now it's your turn to do some hard work .. again .

You know, it's like this ... a week to learn how to build ns2.
And three? months to learn how to use it.
 
Old 05-08-2012, 07:05 AM   #34
visego
LQ Newbie
 
Registered: May 2012
Posts: 13

Rep: Reputation: Disabled
Hi again knudfl

Have you ever installed any program for debugging in NS2?

I am trying install Eclipse and gdb but I don't get that this programs work.

Thanks
 
Old 05-08-2012, 07:50 AM   #35
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 34
Quote:
Have you ever installed any program for debugging in NS2 ?
No.

Google .. debugging ns2 ..
Debugging Tips, ns2 * http://www.isi.edu/nsnam/ns/ns-debugging.html
* http://nsnam.isi.edu/nsnam/index.php/Debugging_ns-2
* http://tagus.inesc-id.pt/~pestrela/n...debugging.html
* http://tagus.inesc-id.pt/~pestrela/ns2/
etc. etc.

LQ * http://www.linuxquestions.org/questi...gfault-814105/

.
 
Old 05-12-2012, 04:02 AM   #36
visego
LQ Newbie
 
Registered: May 2012
Posts: 13

Rep: Reputation: Disabled
Hi again,

I have done a lot of experiments with DRAND and it works perfectly.

And I installed ZMAC correctly but when I want use this protocol following the instruction in http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm don't work correctly.

My order is this:

ns simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

And the error is the next:


Setting slot size to 0.001124
num_nodes is set 84
values-file lookup failed

(_o20 cmd line 1)
invoked from within
"_o20 cmd values-file salida.tr"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o20" line 2)
(SplitObject unknown line 2)
invoked from within
"$mac_($i) values-file $valuefile"
("for" body line 6)
invoked from within
"for {set i 0} {$i < $numNodes } {incr i} {
set node_($i) [$ns_ node $i]
$node_($i) random-motion 0 ;# disable random motion
$god_ new_node $nod..."
(file "multiHopTopoGen.tcl" line 1)
invoked from within
"source.orig multiHopTopoGen.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
(procedure "source" line 12)
invoked from within
"source "multiHopTopoGen.tcl""
(file "simZMAC.tcl" line 99)

I hope that you can help me again,

Thanks in advance

Vicente,
 
Old 05-14-2012, 06:24 AM   #37
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 36

Testing with the "ns-2.26-ZMAC" :

cd ns-allinone-2.26/ns-2.26/zmacTcl/
./ns-zmac simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

The reply is
Code:
Setting slot size to 0.001124
num_nodes is set 84
.. and two trace files are created : out.tr , salida.tr

.

Last edited by knudfl; 05-14-2012 at 06:45 AM.
 
Old 05-15-2012, 01:49 AM   #38
arica
Member
 
Registered: May 2012
Posts: 50

Rep: Reputation: Disabled
#36..u run the protocol by...ns and #37 u run it by./ns-zmac....what is the difference???
 
Old 05-21-2012, 04:32 PM   #39
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 38

The binary "ns-zmac" is a backup copy of the 'ns' from the "ns-2.26-ZMAC" build.
 
Old 07-16-2012, 08:21 PM   #40
guo
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
#25, #27.

http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm :
>>> Before using Z-MAC, some setup is required. For a given topology,
Z-MAC requires each node to know its TDMA slot. This is achieved using DRAND.

Looks like it could be an advantage to have two (more?) installs of ns-2.26.
( Make a backup of the binary 'ns' as 'ns-orig', if you are going to reuse the ns-2.26.)
NS-2.26 is first used with DRAND. If you then afterwords patch the same
install with ZMAC, you will not be able to go back and do more DRAND work.

A) The DRAND ns-2.26.
http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf drandNS2.tar.gz
Then copy the new files ns-packet.tcl packet.h mac-802_11.cc cmu-trace.cc
to their destinations.
And the new Makefile.in : cp -a drand-Makefile.in.txt Makefile.in
cd ../ && export CC=gcc34 CXX=g++34 && ./install
And the "DRAND ns" binary is created.
Suggest : Make a backup : cd ns-2.26/ && cp ns ns-drand


B) The ZMAC ns-2.26
http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf zmac.tar.gz
cp zmac/* mac/
http://www4.ncsu.edu/~rhee/export/zm...mobilenode.tcl
>>> cp -a ns-mobilenode.tcl tcl/lib/
And the new Makefile.in : cp -a zmac-Makefile.in.txt Makefile.in
Delete the Makefile, and run 'make clean', if this is an ns-2.26 reuse.
cd ../ && export CC=gcc34 CXX=g++34 && ./install
Result : The "ZMAC ns" binary.
A backup : cd ns-2.26/ && cp ns ns-zmac

...
Please tell me what's the purpose of the attachment
 
Old 07-17-2012, 02:39 AM   #41
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 40

The attached files are zmac-Makefile.in.txt, drand-Makefile.in.txt.
A Makefile.in is used by configure to create "Makefile".
That's also what ./install is doing : 1) Running ./configure
in the applications, 2) creating Makefile's, 3) running 'make'.

The purpose of attaching "Makefile.in" : Then you don't have to write it yourself.

.
 
Old 07-17-2012, 06:04 AM   #42
guo
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 40

The attached files are zmac-Makefile.in.txt, drand-Makefile.in.txt.
A Makefile.in is used by configure to create "Makefile".
That's also what ./install is doing : 1) Running ./configure
in the applications, 2) creating Makefile's, 3) running 'make'.

The purpose of attaching "Makefile.in" : Then you don't have to write it yourself.

.
I am not so clever to understand it .and I can see makefile.in in ns-allinone-2.26/ns-2.26 and I think there is only one makefile in ns2.26 .please help me and I am puzzled by the zmac addition process ,by the way I installed ns2.26 in windowsxp+cygwin.It is very kind of you ,thank you .
 
Old 07-17-2012, 03:59 PM   #43
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 42 : Please read your own post # 40.

'cp -a ' : Means that the Makefile.in is replaced
 
Old 07-22-2012, 01:31 AM   #44
guo
LQ Newbie
 
Registered: Jul 2012
Posts: 10

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by knudfl View Post
# 42 : Please read your own post # 40.

'cp -a ' : Means that the Makefile.in is replaced
Thank you very much, knudfl. I have installed zmac and Drand in ns2.26 successfully, but I don’t know what should I do next? To analysis out.tr or salida.tr? I have simulated s-mac ,and I used AWK language to analysis the out.tr and plotted all kinds of curves,but the out.tr of zmac is different and I do not know what should I do next, please give me a instruction, best wishes to you.
 
Old 07-22-2012, 04:04 AM   #45
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 44
Quote:
but the out.tr of zmac is different
Different from what ? ?
 
  


Reply

Tags
ns-2.26, ns2, ns226, zmac



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.34 installation help in Ubuntu 10.10 xptional Ubuntu 46 04-02-2018 01:42 PM
Problems in Installation of NS2.27 on Ubuntu 9.10 Scofield Linux - General 7 03-15-2013 03:47 AM
installation of ns2.1b5 on ubuntu? shanky Linux - Software 3 03-12-2012 11:46 PM
ns2.29 installation in ubuntu bolmeteus Ubuntu 4 02-08-2011 01:46 PM

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

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