Skip to main content


Showing posts from March, 2015

Installing ns-3.37 and ns-3.35 in Ubuntu | Ubuntu 22.04 | NS3

Multiple Versions of ns3 in Ubuntu 22.04 In this post, we are going to install two versions of ns3 namely ns-3.35 and ns-3.37  My OS is : Ubuntu 22.04 LTS (Long Term Support) ns-3.35 uses waf and (./waf --run scratch/first)  ns-3.37 uses cmake  (./ns3 run scratch/ So we will install both the packages  Go through the video for complete instructions To start with  $ sudo apt update  $ sudo apt install build-essential autoconf automake libxmu-dev g++ python3 python3-dev pkg-config sqlite3 cmake python3-setuptools git qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gsl-bin libgsl-dev libgslcblas0 wireshark tcpdump sqlite sqlite3 libsqlite3-dev  libxml2 libxml2-dev libc6-dev libc6-dev-i386 libclang-dev llvm-dev automake python3-pip libxml2 libxml2-dev libboost-all-dev  I have downloaded both the versions of ns3 fr

Security Protocol (packet) in NS2

Security is not my area of work, but most of the places, I have been bombarded with questions like , is it possible to implement security protocol in ns2. The answer is yes, here is the solution for that.   Here is the document to read This work is done in 2005 and developed for ns version 2.26 or 2.27. I have done the compilation for ns-2.35 The files to be modified 1. Create a new agent called "Security_packet" and two files Security_packet.h and are created. 2. Add a new packet type in ~ns-2.35/common/packet.h 3. Add a new packet type in ~ns-2.35/tcl/lib/ns-default.tcl 4. Add a new packet type in ~ns-2.35/tcl/lib/ns-packet.tcl 5. modify the ~ns-2.35/ Steps 1. Download the two files here 2. Copy the and security.h file in ~ns-2.35/security folder (create the security/ folder and paste both the files) 3. Open ~ns-2.35/ and make an entry as shown below, OBJ_CC = ...... ...              security/security.o

Adding a New Agent and Application in Network Simulator 2 (NS2)

 This post is reproduced from this website .  But the above code is compiled for older ns2 version. But showcases the code for ns-2.35 version. You can read the theory about the agent from this weblink.   A Simple theory about Application and Agent In Ns2, Nodes are individual entities where in... Nodes -> Agent -> Application Nodes is attached with an Agent and the Agent carries the Application. You can see the following image where Node is attached with the Agent and the Agent carries the FTP or CBR Application Here is an Agent and Application is implemented Agent - UDPmm Application - mmApp node -> Agent -> Application To compile it  Method 1: Easy method Please download the code here Copy the and in the -ns-2.35/multimedia directory there is another folder called ns-modified-files/folder, copy the files which are there in to the corresponding location as specified belo

Tracegraph installation in Fedora 21

To install tracegraph (a software that handles the tracing automatically by specifying the trace file generated from ns2) OS Used: Fedora 21 (64 bit) Tracegraph version: 2.02 Download the tracegraph software from this link Since tracegraph is a 32 bit software, you need to install all the 32bit libraries. The following packages that ends with .i686 are related to 32bit libraries Steps to install $] su and press the root password $] yum update $] yum install libXext.i686 libXt.i686 libXp-devel.i686   Still if tracegraph is not working, install these softwares too (this will also help in installing ns-2.35) $]   yum install tcl tk gcc-c++ libX11-devel libXt-devel libXmu-devel To install Tracegraph untar the software after copying it to your home folder (/home/pradeepkumar) in my case. $] tar zxvf tracegraph202.tar.gz $] cd tracegraph202 After the above step you need to set the LD_LIBRARY_PATH Open the file /home/pradeepkumar/.bash_profile and give th

Ant Colony Algorithm (antnet) in NS-2.35

The source code of antnet is taken from this website. If anyone claims as the owner of this software, let me know so that I will give credits to him/her. (NB: This topic does not have any relevance to me and I have just reproduced what was available in the above website). And of Course, corrected some bugs.  Important: These codes will work well with fresh installation of ns-allinone-2.35. If you have already compiled any other simulation in ns-2.35, kindly take a back up before you proceed. These are the files to be modified. Download the entire folder here ...ns-2.35/tcl/lib/ns-default.tcl  ...ns-2.35/common/packet.h     rtable.txt (This file is created for my network with 2 nodes) ...ns-2.35/trace/  ...ns-2.35/queue/drop-tail.h ...ns-2.35/tcl/lib/ns-lib.tcl       ...ns-2.35/queue/   simpleant.tcl (This is the tcl file can be copied anywhere) ...ns-2.35/trace/cmu-trace.h   ...ns-2.35/ ...ns-2.35/tcl/lib/ns-packet.tcl    ...ns-2.35