LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NS2 v2.26 installation on Ubuntu 11.10 (https://www.linuxquestions.org/questions/linux-newbie-8/ns2-v2-26-installation-on-ubuntu-11-10-a-934738/)

knudfl 05-07-2012 01:35 PM

# 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.

.

visego 05-07-2012 02:23 PM

Thanks, Thanks and Thanks knudfl.

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

Regards,

Vicente

knudfl 05-07-2012 02:45 PM

#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.

visego 05-08-2012 07:05 AM

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

knudfl 05-08-2012 07:50 AM

# 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/

.

visego 05-12-2012 04:02 AM

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,

knudfl 05-14-2012 06:24 AM

# 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

.

arica 05-15-2012 01:49 AM

#36..u run the protocol by...ns and #37 u run it by./ns-zmac....what is the difference???

knudfl 05-21-2012 04:32 PM

# 38

The binary "ns-zmac" is a backup copy of the 'ns' from the "ns-2.26-ZMAC" build.

guo 07-16-2012 08:21 PM

Quote:

Originally Posted by knudfl (Post 4672327)
#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

knudfl 07-17-2012 02:39 AM

# 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.

.

guo 07-17-2012 06:04 AM

Quote:

Originally Posted by knudfl (Post 4730268)
# 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 .

knudfl 07-17-2012 03:59 PM

# 42 : Please read your own post # 40.

'cp -a ' : Means that the Makefile.in is replaced

guo 07-22-2012 01:31 AM

Quote:

Originally Posted by knudfl (Post 4730980)
# 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.

knudfl 07-22-2012 04:04 AM

# 44
Quote:

but the out.tr of zmac is different
Different from what ? ?


All times are GMT -5. The time now is 06:56 PM.