LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-15-2012, 03:04 PM   #46
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598

# 42
A way to find out, how to do the simulation ... start with these commands:
cd ns-allinone-2.26/ns-2.26/drandTcl/
( Or whereever you have the drandTcl/ folder )
./ns-drand simple-wireless.tcl 2 wirelessOpt.tcl
And / or : ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl
( 'ns-drand' is a backup copy of ns from the DRAND patched ns-2.26 )
Code:
[knudfl@localhost drandTcl]$ ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl 
num_nodes is set 3
warning: no class variable Agent/DRAND::randomSeed_
	see tcl-object.tcl in tclcl for info about this warning.

Starting Simulation...
*******************************************************
OneHopNodeID(Hello) : 2 1 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
0 OneHopCount(Hello) : 2
0 TwoHopCount(Hello) : 0
*******************************************************
*******************************************************
OneHopNodeID(Hello) : 2 0 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
1 OneHopCount(Hello) : 2
1 TwoHopCount(Hello) : 0
*******************************************************
*******************************************************
OneHopNodeID(Hello) : 0 1 255 255 255 255 255 255 255 255
TwoHopNodeID(Hello) : 255 255 255 255 255 255 255 255 255 255
2 OneHopCount(Hello) : 2
2 TwoHopCount(Hello) : 0
*******************************************************
0 SLOTINFO 0
0 1HOPNBRINFO 2 1
0 2HOPNBRINFO
MESSAGE sID 0 mCt 4 rReq 1 rGra 0 mTime 0.409841 oneHopCount 2
MESSAGE sID 0 reqCt 2 graCt 0 rejCt 2 relCt 0 twoCt 0
MESSAGE sID 0 Round 0 maxC 0 twoHopMaxC 0 slotNum 0 roundDelay 0.409841 grantDelay 0.206357
2 SLOTINFO 1
2 1HOPNBRINFO 0 1
2 2HOPNBRINFO
MESSAGE sID 2 mCt 6 rReq 0 rGra 0 mTime 0.422742 oneHopCount 2
MESSAGE sID 2 reqCt 2 graCt 1 rejCt 1 relCt 1 twoCt 1
MESSAGE sID 2 Round 1 maxC 0 twoHopMaxC 0 slotNum 1 roundDelay 0.005010 grantDelay 0.003471
1 SLOTINFO 2
1 1HOPNBRINFO 2 0
1 2HOPNBRINFO
MESSAGE sID 1 mCt 8 rReq 0 rGra 0 mTime 0.440861 oneHopCount 2
MESSAGE sID 1 reqCt 2 graCt 2 rejCt 1 relCt 1 twoCt 2
MESSAGE sID 1 Round 2 maxC 0 twoHopMaxC 0 slotNum 2 roundDelay 0.010743 grantDelay 0.006579

An empty file simple.tr is created, but now you have somthing, that you can work on.

.

Last edited by knudfl; 05-15-2012 at 03:08 PM.
 
1 members found this post helpful.
Old 05-15-2012, 04:30 PM   #47
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
A better result with more nodes : A trace file with content.
$ ./ns-drand simple-wireless.tcl 12 wirelessOpt.tcl
$ ./ns-drand simple-wireless.tcl 20 wirelessOpt.tcl
.. So with more nodes you can get a result to analyze.

.

Last edited by knudfl; 05-15-2012 at 04:56 PM.
 
1 members found this post helpful.
Old 05-15-2012, 10:32 PM   #48
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
thanks @knudfl....but i am getting this..
....
..
root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# ./ns-drand simple-wireless.tcl 3 wirelessOpt.tcl
bash: ./ns-drand: No such file or directory
 
Old 05-15-2012, 11:00 PM   #49
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
and if with ns...

root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# ns simple-wireless.tcl 3 wirelessOpt.tcl
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"
 
Old 05-15-2012, 11:05 PM   #50
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
after insatlling and then ./validate...its showing...
...........................................
Running test wireless1:
../../ns test-suite-WLtutorial.tcl wireless1 QUIET
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless1.test test-output-WLtutorial/wireless1
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Running test wireless2:
../../ns test-suite-WLtutorial.tcl wireless2 QUIET
num_nodes is set 4
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)

invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless2.test test-output-WLtutorial/wireless2
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Running test wireless3:
../../ns test-suite-WLtutorial.tcl wireless3 QUIET
num_nodes is set 3
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"
Test output differs from reference output
Diagnose with: diff test-output-WLtutorial/wireless3.test test-output-WLtutorial/wireless3
Or see URL "http://www.isi.edu/nsnam/ns/ns-problems.html".
Some test failed.
validate overall report: some tests failed:
./test-all-wireless-gridkeeper ./test-all-wireless-lan-newnode ./test-all-wireless-lan-tora ./test-all-wireless-lan-aodv ./test-all-wireless-diffusion ./test-all-energy ./test-all-wireless-shadowing ./test-all-WLtutorial

to re-run a specific test, cd tcl/test; ../../ns test-all-TEST-NAME
 
Old 05-15-2012, 11:13 PM   #51
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
# 48
See post #46 : 'ns-drand' is a backup copy of ns from the DRAND patched ns-2.26.

Just make a copy of the right 'ns' to /usr/local/ns-allinone-2.26/ns-2.26/drandTcl/
... then you can use ./ns simple-wireless.tcl 12 wirelessOpt.tcl

Note 1.
The reason for a special name for each version of 'ns' is for recognition.
When you have different versions of ns, the most easy way to avoid them
from getting mixed up, is to give the executables new names.
And one period ( . or ./ ) means 'the current directory'.
So when you see a ./ns, it means that is must be in the working directory,
in this case drandTcl/
( ns-something can also be a symlink to ns-allinone-2.26/ns-2.26/ns )

Note 2.
Do not use a low figure like 3 for the number of nodes.
2..3 : No result in "simple.tr". 12..20 or whatever : A usable "simple.tr" file.

.

Last edited by knudfl; 05-15-2012 at 11:18 PM.
 
Old 05-15-2012, 11:50 PM   #52
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
# 49

Looks like an ns-2.26 modified for ZMAC ?
 
Old 05-16-2012, 12:10 AM   #53
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
again getting..
...
...
...
root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26/drandTcl# ./ns-drand simple-wireless.tcl 12 wirelessOpt.tcl
num_nodes is set 12
ns: Mac/802_11 set ether_hdr_len_: can't read "ether_hdr_len_": no such variable
(Object set line 1)
invoked from within
"Mac/802_11 set ether_hdr_len_"....
,,,
#52...may be yes....because...for the....http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm .......ns installation instructions had already been followed..moving to DRAND ....
so this is the source of this error????


would i again build DRAND only in???
trying..

Last edited by arica; 05-16-2012 at 01:03 AM.
 
Old 05-16-2012, 12:25 AM   #54
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
thank yoy very much.....both z-mac and DRand done!!!!!!!!!!!:-),,,after so much hard work....and yess @knudfl not without your help....
 
Old 05-16-2012, 12:43 AM   #55
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
# 53 :

Please edit the link : The link copy takes you to nowhere.



.

Last edited by knudfl; 05-16-2012 at 12:45 AM.
 
Old 05-16-2012, 01:04 AM   #56
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
again building drand only gives...
============================================================
* Build ns-2.26
============================================================
cd: 399: can't cd to ./ns-2.26
./install: 400: ./configure: not found
Ns configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.

..
..
needed help!!1
 
Old 05-16-2012, 01:19 AM   #57
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
again tried and get the..

..
..
root@priyanka-Aspire-5745:/usr/local/ns-allinone-2.26/ns-2.26 /drandTcl# ./ns-drand simple-wireless.tcl 15 wirelessOpt.tcl
num_nodes is set 15
warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/DRAND::randomSeed_

see tcl-object.tcl in tclcl for info about this warning.

Starting Simulation...
(null) - invalid packet type (undefined).
...and empty simple.tr.....
help!!!
 
Old 05-16-2012, 02:39 AM   #58
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
Don't know what's happening.

The instruction are quite clear. DRAND Ubuntu 10.10 summary :
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 ( cp -a <file> <destination> ) 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=gcc41 CXX=g++41 && ./install

Alternatively use a binary "ns-drand" :
ns-drand-226_usr_local.i686.tar.gz ( 1.1 MB ).
( Usable when a /usr/local/ns-allinone-2.26/ is present.)
https://docs.google.com/open?id=0B7S...lMxbG4tY2VPc1U

.

Last edited by knudfl; 05-16-2012 at 03:38 AM.
 
Old 05-16-2012, 02:46 AM   #59
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,378

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
# 50

... And my DRAND "validate" in Ubuntu 10.10 , 32bits OS.
Code:
validate overall report: some tests failed:
     ./test-all-red ./test-all-pi
This is an expected OK result.

.

Last edited by knudfl; 05-16-2012 at 02:49 AM.
 
Old 05-16-2012, 03:23 AM   #60
arica
Member
 
Registered: May 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
thanks @knudfl...yess your file works....:-)...thanks
 
  


Reply

Tags
drand, g++41-compat, ns2, zmac


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
NS2 S-MAC Sleep Time Query ulyssues.fam Linux - Newbie 1 11-24-2012 04:18 PM
NS2 S-MAC Protocol Sleep Time Query ulyssues.fam Linux - Newbie 0 04-14-2012 09:01 AM
ns2.29.3 installation on fedora 15 , nam installation problem Narges Linux - Networking 5 10-31-2011 11:09 AM
Need help in NS2 installation maneshmotts Ubuntu 5 09-10-2011 05:47 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration