Skip to main content

Posts

Printing the Routing Table in DSDV protocol

Printing the routing table for any protocol is quite a easier task if the data structure is known. You may read the post on "printing the routing table for AODV protocol"   Now this post will let you know how to print the routing table when using DSDV protocol. As you know, the DSDV protocol is a table driven protocol in which each node maintains a Routing table for a given source to destination and the table gets updated periodically to maintain the routes. But AODV protocol is a on demand routing protocol that deals with Route Request, Route Reply for forming the routes. So printing the routing table takes a minor tweak. But the DSDV protocol handles the routing table as a data structure, here is the steps to do it. OS Used : Linux Mint 17 - 64 bit NS2 Used : ns-2.35 Files to be modified: dsdv.cc and dsdv.h Step 1: The folder where ns2 installed on my machine  /home/pradeepkumar/ns-allinone-2.35/ns-2.35 Execute these commands to access the DSDV protocol $promp...

NS3 installation in Linux Mint 17 (64 bit)

This post tells you how to install the ns3 version in Linux Mint 17 (64bit)- Long Term Support till 2019. Preliminaries The following development libraries are to be installed before trying ns3 $prompt] sudo apt-get update  $prompt] sudo apt-get install build-essential autoconf automake libxmu-dev $prompt] sudo apt-get install ia32-libs  (the above software ia32-libs is needed only when you want to run the 32 bit applications inside a 64bit OS) Now download the ns3 software from the website http://www.nsnam.org I downloaded the version 3.20 ( ns-allinone-3.20.tar.bz2 ). Please do understand that ns2 is different from ns3 and they are not having any link between them (however, some network models were used in ns3 were adopted from ns2). Also ns3 will run using the main() of C++ and also it has python bindings. Here is the installation steps of ns3 1. copy the ns-allinone-3.20.tar.bz2 in the home directory(Ex: /home/pradeepkumar) 2. Set the following path infor...

Time Command in Linux

The  time  command is linux is very much useful if you want to know the time information while running a program or a process. The time command usage is as followsprompt $] time <commandname> Example prompt $] time ls The output will be real0m0.002s user0m0.004s sys0m0.000s If you want to see the detailed system parameters occupied during a program or process, then the command will be prompt$] TIMEFORMAT=”” time -v <commandname> See the screenshot given below Time Command in Linux The output of the above command is Desktop  Documents  Downloads  examples.desktop  MusicPictures  Public  Templates  Videos Command being timed: “ls” User time (seconds): 0.00 System time (seconds): 0.00 Percent of CPU this job got: 400% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum ...

Simple Screen Recorder for Linux

Recording the screen in Linux OS is always a tedious task, as either the video/audio malfunctions or support may not be there. There is a tools called simple screen recorder for Linux. Its a very simple tool that is recorded and processed in no time. For example, if you record an 1 hour video, the processing may take another 20 to 50 minutes. But this software does the “On the fly recording and processing” This software has a straight forward interface and its incomparable to other softwares in the market. Its faster than VLC It never takes more amount of RAM like VLC do. Its multithreaded, if you have more than one core, then the processing happens at all the cores. it can do live streaming also, but it is under experimental setting. it supports many different codecs. Here is the simple screenshot. Simple Screen Recorder Simple Screen Recorder Simple Screen Recorder Simple Screen Recorder A 42 minute video is recorded using this software and it ta...

GreenCloud Simulator using NS2

Introduction to GreenCloud Simulator GreenCloud is a packet level simulator that uses the existing Network Simulator 2 (NS2) libraries for energy-aware data centers for cloud computing. It models the various entities of cloud such as servers, switches, links for communication and their energy consumption. It can be helpful in developing solutions for resource monitoring and allocation, scheduling workloads for number of users, optimizing the protocols used for communication and also provide solutions for network switches. The data center upgradation or extension may be decided using this tool. NS2 uses two languages C++ and Otcl (Tool Command Language). The commands from TCL are usually passed to C++ using an interface TclCL. GreenCloud uses 80% of the coding is done using C++ (TclCL Classes) and remaining 20% coding is implemented using Tcl scripts (Commands are sent from Tcl to C++). GreenCloud is developed by University of Luxembourg and released under the General Public Licen...

How to set Destination of Mobile nodes and Traffic Generation in ns2

This post will help you to understand the automatic TCL code generation for creating connections between the nodes, to create hops, generates tcp or cbr agents, etc. There are two things are used: setdest and cbrgen.tcl setdest is used to Create hops between the nodes using the GOD (General Operations Director) object. Create mobility for nodes in terms of metres/second Move from one place to another place using setdest (Set destination) with speed To execute, use ./setdest Example of Setdest is $] cd /home/pradeepkumar/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest $] ./setdest -v 2 -n 10 -s 1 -m 10 -M 50 -t 30 -P 1 -p 1 -x 500 -y 500 > usersetdest.tcl The above output is redirected to usersetdest.tcl  cbrgen.tcl  create connections between the nodes , one can specify the maximum number of connections to be made for all the nodes in the network to create the type of agents between the nodes (cbr or tcp) rate at which the packets a...

Propagation models in ns2

This post is helpful for you to find out the receiving threshold values of various propagation models for certain communication distance. By default, ns2 uses a distance of 1.5m (the antenna is just placed 1.5m above the node ground). Suppose if someone needs to calculate the factor when the distance of the antenna is placed 10m above the ground, then the default value changes. NS2 has an inbuilt mechanism to calculate the distance for certain communication range using the threshold.cc file in ~ns-2.35/indep-utils/propagation/  The file is not having any OTcl linkages, its a conventional C++ file that can be compiled using the command  g++ Before compiling the file, there are some changes in the threshold.cc file. 1. Change the #include<iostream.h> to #include <iostream> 2. Include the following two lines #include <string.h> using namespace std; Once the changes are made, compile the file using the command g++ -o threshold threshold.cc...