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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-15-2012, 03:04 PM
|
#46
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 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.
|
05-15-2012, 04:30 PM
|
#47
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
|
05-15-2012, 10:32 PM
|
#48
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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
|
|
|
05-15-2012, 11:00 PM
|
#49
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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_"
|
|
|
05-15-2012, 11:05 PM
|
#50
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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
|
|
|
05-15-2012, 11:13 PM
|
#51
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 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.
|
|
|
05-15-2012, 11:50 PM
|
#52
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 49
Looks like an ns-2.26 modified for ZMAC ?
|
|
|
05-16-2012, 12:10 AM
|
#53
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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.
|
|
|
05-16-2012, 12:25 AM
|
#54
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
thank yoy very much.....both z-mac and DRand done!!!!!!!!!!!:-),,,after so much hard work....and yess @knudfl not without your help....
|
|
|
05-16-2012, 12:43 AM
|
#55
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 53 :
Please edit the link : The link copy takes you to nowhere.
.
Last edited by knudfl; 05-16-2012 at 12:45 AM.
|
|
|
05-16-2012, 01:04 AM
|
#56
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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
|
|
|
05-16-2012, 01:19 AM
|
#57
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
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!!!
|
|
|
05-16-2012, 02:39 AM
|
#58
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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.
|
|
|
05-16-2012, 02:46 AM
|
#59
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 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.
|
|
|
05-16-2012, 03:23 AM
|
#60
|
Member
Registered: May 2012
Posts: 50
Original Poster
Rep: 
|
thanks @knudfl...yess your file works....:-)...thanks
|
|
|
All times are GMT -5. The time now is 01:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|