Skip to main content

Posts

Showing posts from January, 2016

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/first.cc) 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

ns3 modules

Ns3 is a network simulation software, it depends on various in built and third party tools for enablement. Here are some of the third party modules that can be enabled while running ns3. This is a handy note for such modules. All these examples were tried on the ~ns-3.24.1/examples/tutorial/third.cc file 1. NetAnim #include "ns3/netanim-module.h" AnimationInterface anim("third.xml"); anim.SetConstantPosition(csmaNodes.Get(0),1.0,1,0); anim.SetConstantPosition(csmaNodes.Get(1),2.0,2,0); anim.SetConstantPosition(csmaNodes.Get(2),3.0,3,0); anim.SetConstantPosition(csmaNodes.Get(3),4.0,4,0); anim.SetConstantPosition(wifiApNode.Get(0),5.0,5,0); anim.SetConstantPosition(wifiStaNodes.Get(0),6.0,1,0); anim.SetConstantPosition(wifiStaNodes.Get(1),7.0,1,0); anim.SetConstantPosition(wifiStaNodes.Get(2),8.0,1,0); Open NetAnim and open the xml file (third.xml in this case). Always prefer to use the inbuilt netanim rather than an installed version of NetAnim. 2.

IOT - CoAP implementation in Contiki OS

Constrained Application Protocol (CoAP) is a lightweight http protocol that reads and controls the sensors deployed for IoT. It has actions like get, post, put, delete, observe, discover. This coap can be accessed similar like http, For ex: to access a particular mote (Sensor) with IPv6 like this coap://[aaaa::212:7402:2:202] The above line will fetch the sensor boards peripherals and one can control from the browser itself. Firefox has a Cu plugin to enable CoAP within the browser. CoAP is already available for all the devices like IOS, Android, Windows, Linux, Mac, etc, So here is an example in contiki that shows how to use this coap based application using a border router. Step 1: Contiki Selection Open instant Contiki (Which runs on VMWare or Virtual Box) Open  Cooja from the Desktop directly or  Open  the Terminal and give the following steps $] cd /home/user/contiki-2.7/tools/cooja $] ant run  If you want to simulate huge number of nodes then  $] ant run_bigm

IOT - Border Router in Contiki OS

This post shows the introduction of Border router in Contiki OS. Border router or edge router is connected to internet when the other sensor nodes are reporting the data via the border router. Implementation of this router is provided by all IOT operating systems. Using this border router, how to transmit data to the internet, how neighbours are understood and how the routes are computed. This example shows the implementation of Border router in Contiki OS OS Used: Contiki 2.7 Simulator : Pooja Step 1: Contiki Selection Open Instant Contiki (Which runs on VMWare or Virtual Box) Open Cooja from the Desktop directly or Open the Terminal and give the following steps $] cd /home/user/contiki-2.7/tools/cooja $] ant run  If you want to simulate huge number of nodes then  $] ant run_bigmem Step 2: Selecting Border router File - New Simulation -> Enter Simulation Name (Leave the defaults as it is ) and then Click "Create" Click Add Motes -> Select Sky Mot

NS2 projects with Source Code

Before shedding huge money for projects,  please go through the links which has source code along with how to execute the project. The following projects are either taken from another website or from a open source hub and all the works are compatible with ns-2.35. It is a individual work done by me ( T S Pradeep Kumar ). For some projects, i lost the source code or its misplaced, but all these posts have detailed explanation that tells how to install these projects.  Also the source codes are provided from a google drive link. (If any one have a source code and dont know to compile, please send it to me through my google+ link, I will compile for you and let you know the results). This posts is suitable for PG students, Research scholars and Graduate students. Aqua Sim in NS2 LEACH Protocol Installation Security Protocol as a packet (Agent/Security_packet) Adding a new agent and application in ns2 AntNet (Ant colony Algorithm in ns2) SUMO and MOVE Example traffic Simulat