Sunday, May 2, 2010

How to install OMNET++ on Ubuntu

OMNeT++ is a discrete event simulation environment. Its primary application area is the simulation of communication networks, but because of its generic and flexible architecture, is successfully used in other areas like the simulation of complex IT systems, queueing networks or hardware architectures as well.

Follow the simple steps given below and get your OMNET++ up:

1. Download the OMNET++ simulator from here.

2. sudo -s (become root user)
    sudo tar zxf omnetpp-4.0p1-src.tgz -C /usr/local/ ; cd /usr/local ; sudo ln -s omnetpp-4.0p1 omnetpp

3. sudo apt-get install bison byacc flex blt lmodern giftrans doxygen libxml2-dev graphviz imagemagick (or use synaptic package manager for installing these)

4. sudo apt-get install tcl8.4 tk8.4 tcl8.4-dev tk8.4-dev (Or use synaptic package manager for installing these)

5. The following environment variables may be added into ~/.bashrc for future convenience. Remember to remove the word export!)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/omnetpp/lib
export TCL_LIBRARY=/usr/share/tcltk/tcl8.4
export PATH=$PATH:/usr/local/omnetpp/bin

6. cd /usr/local/omnetpp; sudo ./configure;

7. sudo make

8. export PATH=$PATH:/usr/local/omnetpp/bin

9. sudo make

This will complete your installation. Try running the program given in samples directory by:

10. cd /usr/local/omnetpp-3.3/samples/dyna

11. run ./dyna

Its so simple!! Have fun !!


Mobility Framework for OMNeT++

1. Download Mobility Framework (MF) from Omnetapp

2. Unzip the tar file using tar command

3. goto MF directory

4. run ./mkmk

5. Add in ~/.bashrc file
export LD_LIBRARY_PATH=/mobility-fw directory/core/lib
export LD_LIBRARY_PATH=/mobility-fw directory/contrib/lib

4. make all

5. goto networks directory->802.11

6. ./802.11

Try other examples also given with MF.

Oops !! Still getting shared library error, then follow this step->

a. Create symbolic link from /../core/lib/*.so to /usr/local/lib/*.so

and /../contrib/lin/*.so to /usr/local/lib/*.so

How to create Symbolic link ? Here we go->

ln -s /../MF Directory/core/lib/filename.so /usr/local/lib/filename.so


And I am sure this will surely solve your problem :)



Catch the changing security environment Get it now.

5 comments:

  1. hi, thanks a lot for the instruction.
    In my system, till 6th step it is working fine. but for 7th step it is unable to execute make file. im getting the following error:

    Makefile:32: Makefile.inc: No such file or directory
    Makefile:36: *** OMNETPP_BIN_DIR must be correctly set. Stop.

    please help me.

    ReplyDelete
  2. Hi,

    Export the environment Variables.

    export PATH=$PATH:/usr/local/omnetpp/bin

    then try $ sudo make

    Vasanth

    ReplyDelete
  3. Hi, make sure the configuration run well, with the message ending with ¨Good!¨ If this message does not appear, then go through the response after ¨./configure¨ and install missing packages.

    ReplyDelete
  4. Omnetpp 5.0 onwards require TCL/TK 8.5 or newer:
    In step 4 use following command instead:
    sudo apt-get install tcl8.5 tk8.5 tcl8.5-dev tk8.5-dev

    Finally update the paths with 8.5 in place of 8.4 wherever required.

    Like Anonymous wrote, make sure the ./configure finished with a sentence ending with "Good!" in step 6

    Great work Vasath!

    ReplyDelete
  5. You will also need to install JRE for running OMNeT++ IDE by following instructions at http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux

    Once done with JRE type goto omnet_installation_folder/bin:
    sudo ./omnetpp

    ReplyDelete