Feb 15, 2008

Installing NS2 and Mannasim

I was so eager to install NS2 and Mannasim so I downloaded the installer while teaching yesterday...hahaha...multitasking huh....rushed back to the office right after the class i.e. at 4pm....

Mannasim is a Wireless Sensor Networks (WSN) simulation environment that works in NS2.29. This framework was developed by Manna Research Group from the Federal University of Minas Gerais (UFMG), Brazil. Before the installation process starts, I had to get some packages that Kubuntu does not have in order for me to complete the installation.


  1. Patch is needed to patch Mannasim into NS2.29. To install "patch", type the following command in the terminal: sudo apt-get install patch

  2. Ns2.29 needs TCL/TK. To install "tcl/tk", type the following command in the terminal : sudo apt-get install tcl8.4 tk8.4

To install NS2.29 on Ubuntu, follow the instruction in http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04. This page describes the process of installing NS2.31 on Ubuntu but the procedures are similar except for some changes:

  1. NS2.31 should be replaced with NS2.29
  2. otcl-1.13 should be replaced with otcl-1.11
  3. tcl8.4.14 should be replaced with tcl8.4.11
  4. tk8.4.14 should be replaced with tk8.4.11

The process of installing NS2 with Mannasim can be found here http://www.mannasim.dcc.ufmg.br/download.htm

I tried to simulate some Mannasim scripts...Alhamdulillah it works.... :-)

34 comments:

Anonymous said...

Salam,

Currently I'm doing my master research in WSN routing protocol. Planning to use NS2. Have u tried running this NS2 + Mannasim in windows environment?

Ummi Adlina said...

Salam wbt,

I never used NS2 on Windows.

Anonymous said...

salam,
saya guna cygwin utk operate ns2 dlm windows n dh patch mannasim skali...alhamdulillah..it works!!
skang ni tgh study camner nk create new routing protocol utk performance evaluation... wish me luck!! :)

Mohd.Taufiq said...

Salam, I used both of them (linux and cygwin) but when using cygwin always crach with my windows so altenatively I used linux to complete the simulation, by the please come to my blog www.ip-tech.blogspot.com and at lease give a comment, thank you...

misz aisha said...

salam..
i'm using ns2.30..so what should i change if i want to install mannasim?do i have to install ns2.29 first?

thanx in advance!

Unknown said...

Salem ,
I'm trying to implement a new clustering algorithm and compare it with leach under mannasim +ns-2 ubuntu 8.04
So , i want plz to know if you can give me some help to implement my new protocol

This my mail : amina.bechtarzi@gmail.com

plz help me to implement my new clustering protocol, i have not much time to learn ns-2 in detail

Tks in advance

Ramadan moubarak

Jejaka Kejora said...

test 123

Asif (NUCES Islamabad Pakistan) said...

Assalam-O-Alaikum,

Dear on which linux distribution have you installed ns2.29+Mannasim?

Because I am installing them on Ubuntu9.10 and compilation errors are occurring.

Shyam Sundar said...

Hi,
I am using NS2 with mannasim. I need to get nam trace for mannasim simulation. Please help me out of this?

Anonymous said...

Salam

I m installing mannasim bt it is showing error in ubuntu 9.04,
Please help me im at the end of b.tech project

Thanks in Advance

Unknown said...

I want to install mannasim with ns-2.33 on ubuntu 9.04 platform. how this can bu sucessfully happen. Please tell me steps.

Anonymous said...

hi

with the help of script generator tool of mannasim, i was able to run a simulation and got the trace files. what is the format of analyzing the trace files and how to invoke nam?

DS said...

Nice Blog... IT was a great help in doing setup of MannaSim with NS2.

Please also share any research paper you have published using MannaSim

Anonymous said...

i have already installed ns-2.29 and its working.

but tel me that can i patch mannasim in it now as ns has been installed? or do i have to ns2.29 first...

Anas said...

Hi and Ramadan Kareem I am Anas doing a master and in my project i have to simulate WSN in NS2.29 I successfully installed the mannasim but i got too many errors while trying to simulate any scripts these errors are :
++++++++++++++++++++++++++++++++++++
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 10.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 102)
(Simulator create-wireless-node line 102)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_common_node" line 6)
invoked from within
"create_common_node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(n_common)} {incr i} {
create_common_node
}"
(file "anas.tcl" line 357)
anas@anas-laptop:~/Desktop$ ns anas.tcl
num_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 102)
(Simulator create-wireless-node line 102)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
+++++++++++++++++++++++++++++++++++
I hope you can help me in this since you could run the scripts
if you would like to help i hope you can send me on my email
Anasamer@hotmail.com
Best regards

Najma said...

Assalam-o-Alaikum,
i m working on the reliability of WSN and trying simulate leach tcl script generated by mannasim script generator tool on ns-2.29 but when i run the script i get the segmentation fault error. also the trace file contains no captured data.

i'll be grateful if you can help me resolving this issue.
Regards,
najma

khalid said...

i already installed mannasim and even test it is working , but how i can analyse the trace file.

because there is a lot of data in there is there is any Technic to capture the proper data inside the trace file.

because i used a lot of ways to capture. is not easy because the lines is some how complicate.

Salaam.

Er. Umesh said...

i have installed ns2.34 in my ubuntu 10.04 but i want to work on wireless sensor network which require mannasim and ns2.29 installation. please give me the instructions steps which require to install ns2.29 because the steps which did ns2.34 are not working for this.Thanks in advance..

ibrahym said...

after installing the ns patched with mannasim, ns works good but when i try to simulate wsn tcl file like this example i have this text
i'd like to know what's the source of the problem.
i'm using ubuntu 10.10
ibrahym@ibrahym-Compaq-610:~/ns-allinone-2.29/paulson/sample-codes/mannasim$ ns mannasim-rede-hierarquica.tcl
num_nodes is set 14
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 106)
(Simulator create-wireless-node line 106)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
(file "mannasim-rede-hierarquica.tcl" line 351)
ibrahym@ibrahym-Compaq-610:~/ns-allinone-2.29/paulson/sample-codes/mannasim$

please heple me

blackhorse said...

respected mam..
my name s raj am doing implementation and analysis of leach and spin protocols. as given in ur post u preferred mannasim where as patches are also available for ns2.34 for both of these protocols plz guide in choosing between 2.29 and 2.34
which one is preferred for my work.. thanks in advance

Unknown said...

i have installed mannasim patch on ns 2.34 ,but the examples are not working ...it gives following errors :-

INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 115)
(Simulator create-wireless-node line 115)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
(file "mannasim1.tcl" line 351)


Please Help me if any one had solution...

Unknown said...

Assalam Alaikum,

Currently, I'm doing my research on WSN, video over WSN. Could you please help me and send me any examples and other sources that help me to learn how to Mannamis.
Thank you.

Unknown said...

Assalam Alaikum,

I installed Mannasim on NS2.34. unfortunately, Whan I tried the example, I got this erroe :
num_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 115)
(Simulator create-wireless-node line 115)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
(file "mannasim-rede-plana.tcl" line 350)

Can anyone help me with this problem.
your help will be appreciated,
my email, Fehtiba@gmail.com
Thank you in advance.

Poorna Chandar said...

How to deploy cloud environment using NS 2

Rohini said...

Hello sir,

I am doing my research on WSN.
I have installed Ns2.34 on fedora 10. Then I run patch ns2.34-mannasim-gcc4.3.patch .

But when I tried to run mannasim-rede-plana.tcl test script. I got the following error message.



% ns mannasim-rede-plana.tcl
warning: using backward compatibility mode
error when calling class OldSim: mannasim-rede-plana.tcl
%

please suggest me how to work on Mannasim . I an working on WSN.

Thanks

nivedita said...

i have installed mannasim but when i run any script im getting this error

Anonymous said...

I have run mannasim programs.Unable to generate nam file. Please help. Is there a mannasim Patch which generate nam file. My mail id is rani_tp@yahoo.com

Anonymous said...

dear sir.i have installed mannasim.LEACH is implemented by default in mannasim.how i can use this?please help me for LEACH in mannasim.

my id is: mykpk.pk@gmail.com

thanks

Loki said...

hi ummi,

im not able to use ./make command at the final step of mannasim installation since make file is not found.. then how come i can complete installation?

thanks!

Anonymous said...

I want to work with leach protocol. suggest me how to work with it and how to gerate nam file in mannasim .please. my mail id is ranitp.2010@gmail.com

Anonymous said...

I want to work with leach protocol. suggest me how to work with it and how to gerate nam file in mannasim .please. my mail id is ranitp.2010@gmail.com

Divya said...

I installed Mannasim on NS2.29. unfortunately, Whan I tried the example, I got this erroe :
num_nodes is set 12
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
invalid command name "EnergyModel/Battery"
while executing
"EnergyModel/Battery create _o33 _o15 100.0 0.5 0.2"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $energyModel_ $node $initialEnergy_ $l1 $l2"
invoked from within
"if [info exists energyModel_] {
if [info exists level1_] {
set l1 $level1_
} else {
set l1 0.5
}
if [info exists level2_] {
set l2 $level2_
} else {..."
(procedure "_o3" line 115)
(Simulator create-wireless-node line 115)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_sink" line 8)
invoked from within
"create_sink"
(file "mannasim-rede-plana.tcl" line 350)

Can anyone help me with this problem.
your help will be appreciated,
my email, divya_ld@yahoo.co.in
Thank you in advance.

Divya said...

im not able to use ./make command at the final step of mannasim installation since make file is not found.. then how come i can complete installation?

Can anyone help me with this problem.
your help will be appreciated,
my email, divya_ld@yahoo.co.in
Thank you in advance.

Unknown said...

i got this error while simulating leach in ns2.35 with mannasim in ubuntu

error is: Warning! No Cluster Head ADVs were heard by 3
Node 3 sending 100 data to BS at time 1.632786
Error: Meta size 2844 too large (max = 1000).

plz provide solution.
my mail id: divyaprabha34@gmail.com