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.
|
 |
|
11-22-2013, 04:27 AM
|
#1
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Rep: 
|
ns2.31 CRCN patch problem
Once i patch CRCN and do make in cd ns-allinone-2.31/ns-2.31/ directory it shows the following error:
In function `hdr_wcett::access(Packet const*)':
cmu-trace.cc  .text._ZN9hdr_wcett6accessEPK6Packet[_ZN9hdr_wcett6accessEPK6Packet]+0x7): undefined reference to `hdr_wcett:  ffset_'
collect2: error: ld returned 1 exit status
make: *** [ns] Error 1
what should i do?
|
|
|
11-22-2013, 04:33 AM
|
#2
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
Once i patch CRCN and do make in cd ns-allinone-2.31/ns-2.31/ directory it shows the following error:
In function `hdr_wcett::access(Packet const*)':
cmu-trace.cc  .text._ZN9hdr_wcett6accessEPK6Packet[_ZN9hdr_wcett6accessEPK6Packet]+0x7): undefined reference to `hdr_wcett:  ffset_'
collect2: error: ld returned 1 exit status
make: *** [ns] Error 1
what should i do?
|
|
|
11-22-2013, 01:37 PM
|
#3
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Welcome to LQ.
Please read http://www.linuxquestions.org/questions/tags/crcn/
If you have done the patching correctly :
$ cd ns-allinone-2.31/ && tar xvf crcn-ns2.31.tar.gz
https://drive.google.com/file/d/0B7S...it?usp=sharing
... I guess you are using the wrong compiler.
ns-allinone-2.31 requires gcc/g++ version 4.1.2 .
Or version 3.4.6 if it's a Fedora OS.
Please specify your OS :
1) uname -m <Enter>
2) cat /etc/*release* <Enter>
-
|
|
|
11-24-2013, 02:28 AM
|
#4
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
Thanks for your reply.I am using fedora 17 for ns2.31 and CRCN patch.
As you said.I tried doing and i get :
[lab@localhost ~]$ uname -m
i686
[lab@localhost ~]$ cat/etc/*release*
bash: cat/etc/*release*: No such file or directory
[lab@localhost ~]$
but the question is: i am using CRCN.jar for CRCN GUI .Can both crcn-ns2.31.tar.gz and CRCN.jar be used for CRCN GUI??? am i doing wrong??
|
|
|
11-24-2013, 02:41 AM
|
#5
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
if i say yum install gcc-c++ then it shows the following:
Trying other mirror.
http://mirrors.hustunique.com/rpmfus...ta/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.hustunique.com; Unknown error"
Trying other mirror.
Package gcc-c++-4.7.2-2.fc17.i686 already installed and latest version
Nothing to do
|
|
|
11-24-2013, 08:39 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Post #5 . Please read post #3 : ".. version 3.4.6 if it's a Fedora OS."
I.e. # yum install compat-gcc-34-c++
The install commands are then ..
1) $ cd ns-allinone-2.31/ && tar xvf crcn-ns2.31.tar.gz
2) $ export CC=gcc34 CXX=g++34 && ./install
.... which you would know if you did what's suggested in #3 :
! ! ! read http://www.linuxquestions.org/questions/tags/crcn/
Post #4 : `CRCN.jar' is a GUI application.
"crcn-ns2.31.tar.gz" is simply the CRCN patch repacked for an easier install.
-
|
|
1 members found this post helpful.
|
11-24-2013, 10:43 PM
|
#7
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
when i do as above and ./install i get the following:
* Build Tk8.4.14
============================================================
./install: line 447: ./configure: Permission denied
tk8.3.2 configuration failed! Exiting ...
Tk is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
[lab@localhost ns-allinone-2.31]$
I had tk8.4.14 installed previously.what should i do??
|
|
|
11-25-2013, 03:13 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 7 .
Quote:
./install: line 447: ./configure: Permission denied
|
"Permission denied" means that you probably corrupted ns-allinone-2**
at unpack. Did you do tar xvf ns-allinone-2.31.tar.gz as root ?
Solution : Delete ns-allinone-2.31/ and start from scratch in
/home/leki/(<folder>) , and don't use "su" for any command.
`root' permissions are to be used only for 'make install'.
-
|
|
1 members found this post helpful.
|
11-25-2013, 01:46 PM
|
#9
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
hi..I started from beginning as you said.
My ns and nam seems to work fine but i got following error:
validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-diffusion3 ./test-all-smac ./test-all-smac-multihop ./test-all-manual-routing ./test-all-session ./test-all-links ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-tdma ./test-all-wireless-gridkeeper ./test-all-wireless-diffusion ./test-all-wireless-lan-newnode ./test-all-satellite ./test-all-WLtutorial ./test-all-tagged-trace ./test-all-wpan ./test-all-energy
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.
what should i do??will it lead to any serious problems if i dont correct it???
Last edited by leki; 11-25-2013 at 01:48 PM.
|
|
|
11-25-2013, 01:51 PM
|
#10
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
My CRCN GUI seems to work even but i dont get the throughput graph.Can you help me? Thanks.
And if i run ns test.tcl seperately then it works fine.
I did as below:
[lab@localhost ~]$ java -jar CRCN.jar
Yeah
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl
routing
Multiradio for Routing
jTabbedPane1_stateChanged(ChangeEvent e) called.
java.io.FileNotFoundException: (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at nsui.CFrame.TopoOK_actionPerformed(CFrame.java:2260)
at nsui.CFrame.access$16(CFrame.java:2113)
at nsui.CFrame$23.actionPerformed(CFrame.java:1077)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
OUTPUT>#
OUTPUT># nodes: 10, max conn: 5, send rate: 0.0, seed: 1
OUTPUT>#
OUTPUT>#
OUTPUT># 1 connecting to 2 at time 2.5568388786897245
OUTPUT>#
OUTPUT>set tcp_(0) [$ns_ create-connection TCP $node_(1) TCPSink $node_(2) 0]
OUTPUT>$tcp_(0) set window_ 32
OUTPUT>$tcp_(0) set packetSize_ 512
OUTPUT>set ftp_(0) [$tcp_(0) attach-source FTP]
OUTPUT>$ns_ at 2.5568388786897245 "$ftp_(0) start"
OUTPUT>#
OUTPUT># 4 connecting to 5 at time 56.333118917575632
OUTPUT>#
OUTPUT>set tcp_(1) [$ns_ create-connection TCP $node_(4) TCPSink $node_(5) 0]
OUTPUT>$tcp_(1) set window_ 32
OUTPUT>$tcp_(1) set packetSize_ 512
OUTPUT>set ftp_(1) [$tcp_(1) attach-source FTP]
OUTPUT>$ns_ at 56.333118917575632 "$ftp_(1) start"
OUTPUT>#
OUTPUT># 4 connecting to 6 at time 146.96568928983328
OUTPUT>#
OUTPUT>set tcp_(2) [$ns_ create-connection TCP $node_(4) TCPSink $node_(6) 0]
OUTPUT>$tcp_(2) set window_ 32
OUTPUT>$tcp_(2) set packetSize_ 512
OUTPUT>set ftp_(2) [$tcp_(2) attach-source FTP]
OUTPUT>$ns_ at 146.96568928983328 "$ftp_(2) start"
OUTPUT>#
OUTPUT># 6 connecting to 7 at time 55.634230382570173
OUTPUT>#
OUTPUT>set tcp_(3) [$ns_ create-connection TCP $node_(6) TCPSink $node_(7) 0]
OUTPUT>$tcp_(3) set window_ 32
OUTPUT>$tcp_(3) set packetSize_ 512
OUTPUT>set ftp_(3) [$tcp_(3) attach-source FTP]
OUTPUT>$ns_ at 55.634230382570173 "$ftp_(3) start"
OUTPUT>#
Process exitValue: 0
OUTPUT># 7 connecting to 8 at time 29.546173154165118
OUTPUT>#
OUTPUT>set tcp_(4) [$ns_ create-connection TCP $node_(7) TCPSink $node_(8) 0]
OUTPUT>$tcp_(4) set window_ 32
OUTPUT>$tcp_(4) set packetSize_ 512
OUTPUT>set ftp_(4) [$tcp_(4) attach-source FTP]
OUTPUT>$ns_ at 29.546173154165118 "$ftp_(4) start"
OUTPUT>#
OUTPUT>#Total sources/connections: 4/5
OUTPUT>#
jTabbedPane1_stateChanged(ChangeEvent e) called.
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl is called by ns
Starting Simulation...
NS EXITING...
num_nodes is set 10
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Process exitValue: 0
OUTPUT>1.069432572 0
OUTPUT>2.001122665 44
OUTPUT>3.000101431 27560
OUTPUT>4.000151738 66390
OUTPUT>5.000298462 60670
OUTPUT>6.000300708 58960
OUTPUT>7.000458089 64108
OUTPUT>8.000246863 60692
OUTPUT>9.000653651 60104
OUTPUT>10.000031382 63552
Process exitValue: 0
OUTPUT>11.001154221 61820
OUTPUT>12.003238209 63492
OUTPUT>13.001053478 61204
OUTPUT>14.003086717 63492
OUTPUT>15.003161960 61776
OUTPUT>16.003388370 64064
OUTPUT>17.003198792 61776
OUTPUT>18.000309806 61776
OUTPUT>19.000535950 59532
OUTPUT>20.002916713 61230
OUTPUT>21.000248235 61204
OUTPUT>22.002246223 62964
OUTPUT>23.000258231 61776
OUTPUT>24.000264755 62386
OUTPUT>25.000071013 61776
OUTPUT>26.003648519 60104
OUTPUT>27.001521559 62920
OUTPUT>28.000216560 63492
OUTPUT>29.002180489 59532
OUTPUT>30.000045650 61264
OUTPUT>31.000255439 65252
OUTPUT>32.000195023 60692
OUTPUT>33.000268599 60098
OUTPUT>34.004220290 64124
OUTPUT>35.000138147 62920
OUTPUT>36.000316741 61248
OUTPUT>37.000526293 61264
OUTPUT>38.000311786 62980
OUTPUT>39.000131926 57816
OUTPUT>40.000447023 62374
OUTPUT>41.002943557 62920
OUTPUT>42.004569863 58344
OUTPUT>43.003988073 66352
OUTPUT>44.000118902 63492
OUTPUT>45.000168806 58954
OUTPUT>46.000079230 58382
OUTPUT>47.000222088 60104
OUTPUT>48.000564702 59526
OUTPUT>49.004315118 63518
OUTPUT>50.000000000 57772
|
|
|
11-26-2013, 12:57 AM
|
#11
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
Sir i have installed jdk-1.6.0_31-fcs.i586.rpm.But guess mine is i686.Is the java problem because of that?? should i install jdk-1.6.0_31-fcs.i686.rpm??
|
|
|
11-26-2013, 04:49 PM
|
#12
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
# 11 .
* `i586' only means that the package was compiled to work also with i586.
* i386, i486, i586, i686 packages all work equally OK with i686.
-
|
|
1 members found this post helpful.
|
11-26-2013, 09:28 PM
|
#13
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
GUI throughput display problem
Code:
[lab@localhost ~]$ java -jar CRCN.jar
Yeah
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl
routing
Multiradio for Routing
jTabbedPane1_stateChanged(ChangeEvent e) called.
java.io.FileNotFoundException: (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at nsui.CFrame.TopoOK_actionPerformed(CFrame.java:2260)
at nsui.CFrame.access$16(CFrame.java:2113)
at nsui.CFrame$23.actionPerformed(CFrame.java:1077)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
OUTPUT>#
OUTPUT># nodes: 10, max conn: 5, send rate: 0.0, seed: 1
OUTPUT>#
OUTPUT>#
OUTPUT># 1 connecting to 2 at time 2.5568388786897245
OUTPUT>#
OUTPUT>set tcp_(0) [$ns_ create-connection TCP $node_(1) TCPSink $node_(2) 0]
OUTPUT>$tcp_(0) set window_ 32
OUTPUT>$tcp_(0) set packetSize_ 512
OUTPUT>set ftp_(0) [$tcp_(0) attach-source FTP]
OUTPUT>$ns_ at 2.5568388786897245 "$ftp_(0) start"
OUTPUT>#
OUTPUT># 4 connecting to 5 at time 56.333118917575632
OUTPUT>#
OUTPUT>set tcp_(1) [$ns_ create-connection TCP $node_(4) TCPSink $node_(5) 0]
OUTPUT>$tcp_(1) set window_ 32
OUTPUT>$tcp_(1) set packetSize_ 512
OUTPUT>set ftp_(1) [$tcp_(1) attach-source FTP]
OUTPUT>$ns_ at 56.333118917575632 "$ftp_(1) start"
OUTPUT>#
OUTPUT># 4 connecting to 6 at time 146.96568928983328
OUTPUT>#
OUTPUT>set tcp_(2) [$ns_ create-connection TCP $node_(4) TCPSink $node_(6) 0]
OUTPUT>$tcp_(2) set window_ 32
OUTPUT>$tcp_(2) set packetSize_ 512
OUTPUT>set ftp_(2) [$tcp_(2) attach-source FTP]
OUTPUT>$ns_ at 146.96568928983328 "$ftp_(2) start"
OUTPUT>#
OUTPUT># 6 connecting to 7 at time 55.634230382570173
OUTPUT>#
OUTPUT>set tcp_(3) [$ns_ create-connection TCP $node_(6) TCPSink $node_(7) 0]
OUTPUT>$tcp_(3) set window_ 32
OUTPUT>$tcp_(3) set packetSize_ 512
OUTPUT>set ftp_(3) [$tcp_(3) attach-source FTP]
OUTPUT>$ns_ at 55.634230382570173 "$ftp_(3) start"
OUTPUT>#
Process exitValue: 0
OUTPUT># 7 connecting to 8 at time 29.546173154165118
OUTPUT>#
OUTPUT>set tcp_(4) [$ns_ create-connection TCP $node_(7) TCPSink $node_(8) 0]
OUTPUT>$tcp_(4) set window_ 32
OUTPUT>$tcp_(4) set packetSize_ 512
OUTPUT>set ftp_(4) [$tcp_(4) attach-source FTP]
OUTPUT>$ns_ at 29.546173154165118 "$ftp_(4) start"
OUTPUT>#
OUTPUT>#Total sources/connections: 4/5
OUTPUT>#
jTabbedPane1_stateChanged(ChangeEvent e) called.
/home/lab/ns-allinone-2.31/ns-2.31/test.tcl is called by ns
Starting Simulation...
NS EXITING...
num_nodes is set 10
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Process exitValue: 0
OUTPUT>1.069432572 0
OUTPUT>2.001122665 44
OUTPUT>3.000101431 27560
OUTPUT>4.000151738 66390
OUTPUT>5.000298462 60670
OUTPUT>6.000300708 58960
OUTPUT>7.000458089 64108
OUTPUT>8.000246863 60692
OUTPUT>9.000653651 60104
OUTPUT>10.000031382 63552
Process exitValue: 0
OUTPUT>11.001154221 61820
OUTPUT>12.003238209 63492
OUTPUT>13.001053478 61204
OUTPUT>14.003086717 63492
OUTPUT>15.003161960 61776
OUTPUT>16.003388370 64064
OUTPUT>17.003198792 61776
OUTPUT>18.000309806 61776
OUTPUT>19.000535950 59532
OUTPUT>20.002916713 61230
OUTPUT>21.000248235 61204
OUTPUT>22.002246223 62964
OUTPUT>23.000258231 61776
OUTPUT>24.000264755 62386
OUTPUT>25.000071013 61776
OUTPUT>26.003648519 60104
OUTPUT>27.001521559 62920
OUTPUT>28.000216560 63492
OUTPUT>29.002180489 59532
OUTPUT>30.000045650 61264
OUTPUT>31.000255439 65252
OUTPUT>32.000195023 60692
OUTPUT>33.000268599 60098
OUTPUT>34.004220290 64124
OUTPUT>35.000138147 62920
OUTPUT>36.000316741 61248
OUTPUT>37.000526293 61264
OUTPUT>38.000311786 62980
OUTPUT>39.000131926 57816
OUTPUT>40.000447023 62374
OUTPUT>41.002943557 62920
OUTPUT>42.004569863 58344
OUTPUT>43.003988073 66352
OUTPUT>44.000118902 63492
OUTPUT>45.000168806 58954
OUTPUT>46.000079230 58382
OUTPUT>47.000222088 60104
OUTPUT>48.000564702 59526
OUTPUT>49.004315118 63518
OUTPUT>50.000000000 57772
|
|
|
11-26-2013, 09:31 PM
|
#14
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
Can you help me with this? If i exexcute as ns test.tcl then it runs ok.But i dont know why the problem is in GUI.My test.tcl and random.tcl files are as follows
|
|
|
11-27-2013, 01:21 AM
|
#15
|
LQ Newbie
Registered: Nov 2013
Posts: 24
Original Poster
Rep: 
|
test.tcl
Code:
set val(chan) Channel/WirelessChannel ; #Channel Type
set val(prop) Propagation/TwoRayGround ; #Radio propagation model
set val(netif) Phy/WirelessPhy ; #Network interface type
set val(ant) Antenna/OmniAntenna ; #Antenna model
set val(rp) AODV ;#Routing Protocol
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ifqlen) 50 ;# max packet in ifq
set val(mac) Mac/802_11 ;# MAC type
set val(ll) LL ;# link layer type
set val(nn) 10 ;# number of mobilenodes
set val(ni) 2 ;# number of interfaces
set val(cp) /home/lab/ns-allinone-2.31/ns-2.31/random.tcl ; # topology traffic file
set val(stop) 50 ;# simulation time
# ==================================================================
# Main Program
# ======================================================================
# Initialize Global Variables
set ns_ [new Simulator]
set tracefd [open /home/lab/ns-allinone-2.31/ns-2.31/test.tr w]
$ns_ trace-all $tracefd
# set up topography object
set topo [new Topography]
$topo load_flatgrid 1000 1000
#create nam
set namtrace [open /home/lab/ns-allinone-2.31/ns-2.31/test.nam w]
$ns_ namtrace-all-wireless $namtrace 1000 1000
# Create God
set god_ [create-god $val(nn)]
# configure node
$ns_ node-config -adhocRouting $val(rp) -llType $val(ll) -macType $val(mac) -ifqType $val(ifq) -ifqLen $val(ifqlen) -antType $val(ant) -propType $val(prop) -phyType $val(netif) -topoInstance $topo -agentTrace ON -routerTrace ON -macTrace ON -movementTrace ON
for {set i 0} { $i < $val(ni)} {incr i} {
set chan_($i) [new $val(chan)]
}
#configure for interface and channel
$ns_ node-config -ifNum $val(ni) -channel $chan_(0)
for {set i 0} {$i < $val(ni) } {incr i} {
$ns_ add-channel $i $chan_($i)
}
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) set recordIfall 1
$node_($i) random-motion 0 ;# disable random motion
}
source $val(cp) ; #source topology and traffic file generated by others
# Tell nodes when the simulation ends
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).0 "$node_($i) reset";
}
$ns_ at $val(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt "
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
exec nam /home/lab/ns-allinone-2.31/ns-2.31/test.nam &
exit 0
}
puts "Starting Simulation..."
$ns_ run
Last edited by leki; 11-28-2013 at 05:30 AM.
|
|
|
All times are GMT -5. The time now is 01:38 PM.
|
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
|
|