LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with running tcl script under ns 2.33 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-running-tcl-script-under-ns-2-33-a-843581/)

rochd 02-14-2011 11:32 AM

I'm still stuck in this error please help me
*************
rochd@rochd-laptop:~/ns-allinone-2.33/ns-2.33$ ns simple-mipv6.tcl
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<

Erreur de segmentation
**************

knudfl 02-15-2011 05:45 AM

*

Post # 31 , @ rochd : Which Ubuntu are you using ? ?

Asago 02-15-2011 11:41 PM

Hi! Knudfl & All,

I have successfully installed ns2.33 and mobiwan. Also I have executed simple-mipv6 well by following Knudfl's explanation (by set BASEDIR to the correct path). But when I execute the TCL script file that excited in /ex folder (/ns-2.33/tcl/ex/simple.tcl),I got the following error:

ex]$ ns simple.tcl
can't read "EnableHierRt_": no such variable
(Object set line 1)
invoked from within
"Simulator set EnableHierRt_"
(procedure "_o10" line 10)
(Node attach line 10)
invoked from within
"$node attach $agent"
(procedure "_o3" line 2)
(Simulator attach-agent line 2)
invoked from within
"$ns attach-agent $n0 $udp0"
(file "simple.tcl" line 29)

How can I handle such this error?

Many Thanks!

knudfl 02-16-2011 04:00 AM

@ Asago ( and all others too ) : http://linuxsilo.net/docs/smart-questions_en.html

Every time you ask a question, tell which OS, that's used, please.

The application (ns233 mobiwan) behaves slightly different on the different OS'.

And in post # 33 the Fedora ? version is missing !

..

knudfl 02-16-2011 09:08 AM

Post #31, @rochd :

The commands are
1) cd ns-allinone-2.33/ns-2.33/tcl/mobiwan/
2) ns simple-mipv6.tcl

The file simple-mipv6.tcl will not work in another location.

..

knudfl 02-16-2011 09:16 AM

Post #33, @ Asago :

The binary 'ns', you are using is compiled with mobiwan, it seems.
And cannot be used for a "ns simple.tcl" command.

For that, you will have to compile a binary ns with no mobiwan.
And suggest : Rename it to 'ns233'.
Then 'ns233 simple.tcl' will work. ( And open nam.)

..

rochd 02-18-2011 04:44 AM

@Knudfl
thank you for your reply
I use ubunto 10.04
when I've run from tcl / mobiwan here is what the actual execution

rochd@rochd-laptop:~/ns-allinone-2.33/ns-2.33/tcl/mobiwan$ ns simple-mipv6.tcl
couldn't open "out.tr": permission denied
while executing
"open $opt(tracefile) w"
(procedure "main" line 23)
invoked from within
"main"
(file "simple-mipv6.tcl" line 152)

rochd 02-18-2011 01:54 PM

1 Attachment(s)
@Knudfl
I do not know how but I have to run again another time in the file ns-2.33, and he gave the following
rochd@rochd-laptop:~/ns-allinone-2.33/ns-2.33$ ns simple-mipv6.tcl
num_nodes is set 5
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl (except for MobiWAN simulations)
INITIALIZE THE LIST xListHead

>-------------------- NS Addressing --------------------<
Domains (domain_num) : 2
Clusters (cluster_num) : 1 5
Nodes (nodes_num) : 1 1 3 1 1 1
>-------------------------------------------------------<

SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
31.9021 get_coa for BS 1.2.0:4198400
Simulation finished

|Binding Cache for node 1.1.0 at 100 --------------------------------------- |
|Node COA Type Info Flag Last Time Life Expire Nb|
|1.1.1 1.2.6 7 MN 1 22 96.9076 10 0 12 |


|Binding Cache for node 0.0.0 at 100 --------------------------------------- |
|Node COA Type Info Flag Last Time Life Expire Nb|
|1.1.1 1.2.6 7 MN 1 23 96.9098 10 0 11 |


|Binding Update List for node 1.1.1 at 100 --------------------------------------- |
|Node COA Type Info Flag Last Time Life Expire Nb|
|0.0.0 1.2.6 5 CN 1 23 96.9021 10 109.964 11 |
|1.1.0 1.2.6 3 HA 1 22 96.9021 10 2.68435e+08 12 |


|Base Station List for node 1.1.1 at 100 --------------------------------------- |
|Node COA Type Info Flag Last Time Life Expire Nb|
|1.2.0 1.2.6 8 BS 1
-1 99.5648 10 135 |

rochd@rochd-laptop:~/ns-allinone-2.33/ns-2.33$ nam out.nam
Cannot connect to existing nam instance. Starting a new one...

(attachment)

i can say is well done mobiwan ?????
if so I do not seen as the mobile node moves in out.nam and the graphs are not displayed

knudfl 02-18-2011 04:43 PM

Everything is OK so far.

Please push the 'Play' button in nam, and watch.

Graphs ? You get : out.nam and out.tr : 'out.tr' is a text file, you can read.
Or may be the mobiwan documentation has other suggestions ? ?

..

rochd 02-20-2011 06:26 AM

@knudfl

when I click button play the figure remains stable no node moves to show the mobility !!!????
how I could get the graphics simulations?? I need to convert out.tr in graphics

knudfl 02-21-2011 10:55 AM

# 40.

One LQ member complained, that the nodes moved to a new position,
every time 'nam out.nam' was run. Is is that kind of mobility, you want ?

Mobile doesn't necessarily means that a unit is on the run all the time.
You can actually use a mobile unit when you do not move.
Also : It would be rather confusing, if the nodes constantly circled around ?

.

rochd 02-22-2011 03:32 AM

@41 Knudfl

for the scenario that I envisage for mobility, this link here or there is a simulation of mobility.(http://plex.coe.psu.ac.th/mip/ns2mobiwan.pdf see figure out.nam)
secondly I would like to know is what I could have graphics? I heard that the file may become out.tr graphics??

thank you very much for your answers Knudfl

knudfl 02-22-2011 03:57 PM

# 42.

Sorry, I don't know the "mobiwan-020513bis.tar.gz files".

But I guess, the required "awk filter" by name 'mipv6-awk', etc. is included
in that tarball.

Asago 02-24-2011 01:50 AM

Quote:

Originally Posted by knudfl (Post 4260327)
Post #33, @ Asago :

The binary 'ns', you are using is compiled with mobiwan, it seems.
And cannot be used for a "ns simple.tcl" command.

For that, you will have to compile a binary ns with no mobiwan.
And suggest : Rename it to 'ns233'.
Then 'ns233 simple.tcl' will work. ( And open nam.)

..

Thank you Kundfl,
Just for clarify, in case I compile ns2 without mobiwan, that means mipv6 will not work again :( ..
Do you think can we dealing with ipv4&6 in one ns framework?!.

knudfl 02-24-2011 05:56 AM

# 44.

You can have both binaries.
The most easy is to do './install' in a ns-allinone-2.33/ with no mobiwan.
And after that : cd ns-allinone-2.33/ns-2.33/ && mv ns ns233
Then you can use it with : ns233 simple.tcl
Suggest : copy all binaries, ns and nam, to /use/local/bin/.
Then you don't have to care about the path.

Currently, I have these "ns" : 'ls /usr/local/bin/ns*'

/usr/local/bin/ns227* /usr/local/bin/ns234*
/usr/local/bin/ns227-leach* /usr/local/bin/ns233-mobiwan*
/usr/local/bin/ns233

..


All times are GMT -5. The time now is 07:47 PM.