星期四, 十一月 26, 2009

OMNeT++ Vs ns-2: A comparison

.OMNeT++ns-2
FlexibilityOMNeT++ is a flexible and generic simulation framework. One can simulate anything that can be mapped to active components that communicate by passing messages. For example, it can be used for simulating queueing networks, multiprocessor systems, hardware architectures (routers, optical switches, file servers etc.), or business processes. Several model frameworks available for different problem domains (INET Fw, Mobility Fw, OverSim, NesCT, MACSimulator, etc.)ns-2 has been designed as a (TCP/IP) network simulator, and it difficult to impossible to simulate things other than packet-switching networks and protocols with it. It has highly detailed andhardcoded concepts about nodes, agents, protocols, links, packet representation, and network adresses etc, which is good, but makes it very hard if you want to do things a little differently.
Programming ModelObject-oriented, event-driven simulator, written in C++. Topology descriptions are either written as text files (NED language), or can be dynamically created in run-time. There is also a graphical interface (GNED) for creating and editing the topologies, which automatically creates the topology file.Mixed-mode: OTcl (Object-Tcl) with underlying C++ classes. OTcl is also used for creating and configuring networks, recording results etc.
Model ManagementThe OMNeT++ simulation kernel is a class library, i.e., models in OMNeT++ are independent of the simulation kernel. The researcher writes their components (simple modules) against the OMNeT++ simulation kernel API. OMNeT++ sources are never patched by models. Simple modules are then reusable, and can be freely combined like LEGO blocks to create simulations,.In ns-2, boundary between simulation core and models is blurred, without a clear API. Install instructions for 3rd party models usually begin like: "download ns2 2.xx.x, unpack it, then apply the following patch..."
Support for Hierarchical ModelsHierarchical module structure in OMNeT++ facilitates dealing with complexity in a methodical manner. Model designer assembles a complex model from self-contained building blocks (i.e. simple modules and compound modules) which are resuable in other simulations as they are.In ns-2, models are "flat": creating subnetworks, or implementing a complex protocol as a composition of several independent units (that appear as one unit) are not possible in ns-2.
Debugging and Tracing SupportOMNeT++ can show packet transmissions while a simulation is running. OMNeT++'s Tkenv is an interactive execution environment, which allows one to examine the progress of simulation and change parameters. There is also extensive library support for packet tracing etc.?
Variety of Models AvailableOMNeT++ has a good variety of models for simulating computer systems, queueing systems etc., but lags behind the ns-2 simulator on availability of communication protocol models.ns-2 has a rich set of communication protocol models (since it has been designed as a network protocol simulator, this is not surprising).
DocumentationOMNeT++ has a well written and up-to-date manual (there are also tutorials for quick introduction). OMNeT++'s simulation API is more mature and much more powerful than ns-2's.ns-2 documentation is fragmented (there is a good tutorial for quick introduction). There is no clear dividing line between the models and the ns-2 simulation library.
Ability to Run Large NetworksOMNeT++ can simulate very large scale network topologies. The limit is the virtual memory capacity of the computer used.ns-2 has scalability problems on simulating large network topologies (more details needed here).
Support for Parallel SimulationSupports conservative parallel distributed simulation. The Null Message Algorithm (Chandy-Misra-Bryant) and Ideal Simulation Protocol (Bagrodia et al) are supported; others can be plugged in. Lookahead models for NMA can be plugged in. Communication layer is pluggable: currently implemented ones are MPI, named pipe, and file-based (for debugging). Unlike PADS, models do not need to be modified or instrumented for parallel simulation -- it is just a matter of configuration.The PADS research group at Georgia Tech. has developed extensions and enhancements to the ns-2 to allow a network simulation to be run in a parallel and distributed fashion on a network of workstations.
Experiment DesignParameters of a simulation experiments are written in theomnetpp.ini, which enforces the concept of separating model from experiments.Models and experiments are usually interwoven in ns-2: topology, parameters, model customizations, result collection etc usually in the same Tcl script, which makes "separation of concerns" difficult.
EmbeddabilityOMNeT++ simulation kernel can be embedded in other applications (where one can use alternative means of intpu/output, e.g., use databases). The existing user interfaces can be extended via plug-ins, modified or replaced.?

星期六, 十一月 21, 2009

Installing TinyOS-2.x in Ubuntu intrepid (8.10)


Thank to

http://nmlaxaman.blogspot.com/2009/01/installing-tinyos-2x-in-ubuntu-intrepid.html

To Install java on your intrepid use the following command:

sudo apt-get install sun-java5-jre sun-java5-jdk sun-java5-plugin

To verify that the correct version of Java is installed the following command can be used:
java -version

This command will print the current version of java that is active. Should there be more than one version of Java be installed on the operating system, the following command can be used to list the available java versions:

update-java-alternatives -l

This command list all the available Java runtime environments on the Ubuntu system. To change from one version to another, the following command can be used:

sudo update-java-alternatives -s < JRE version >

Mostly 'JRE version' needs to be one of the folder name under /usr/lib/jvm/

Once java is installed sucessfully the follow the points below.

1) add bellow repository to your
/etc/apt/sources.list. Though it is for hardy, it is working for intrepid also

deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main

2) with following commands you can update the apt-cache and search the required packages thin you can install the required version and all.

apt-get update
apt-cache search tinyos
apt-get install tinyos-2.1.0

3) then install python development package (headers)

apt-get install python-dev

4) Edit /opt/tinyos-2.1.0
/tinyos.sh and change the CLASSPATH env-variable as bellow

CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:.

4) Import /opt/tinyos-
2.1.0/tinyos.sh in your .bashrc; include bellow code snippet to ~/.bashrc

if [ -f /opt/tinyos-
2.1.0/tinyos.sh ] ; then
. /opt/tinyos-
2.1.0/tinyos.sh
fi

5) Now execut bash again or restart the terminal and chech your enviorenment with bellow command. It will check the enviorenment and report you the status. (Ignore the WORNING returned due to graphvis version)

tos-check-env

6) Lets compile the first application

cd $TOSROOT/apps/Blink
make micaz

for simulator

make micaz sim