Posts

Showing posts from December, 2018

Setdest and cbrgen in ns2 - NS2 Tutorial # 20

Turn on the Audio. Its about the usage of setdest and cbrgen,tcl for automatic code generation for node mobility, connection establishment, etc.   Subscribe to My Youtube Channel - Engineering Clinic

Propagation Models in ns2 - NS2 Tutorial # 19

This video shows the propagation models in ns2 and it prints the propagation threshold values in NS2   Subscribe to My Youtube Channel - Engineering Clinic

Mannasim Installation in NS2 - NS2 Tutorial # 18

Image
Subscribe to My Youtube Channel - Engineering Clinic

Real Time Vehicular Traffic Simulation Using SUMO and OpenStreetMap - NS...

Image
Its about the VANET simulation using SUMO with Open Street Map. and the entire simulation is ported to ns2 for packet tracing and network animation. Please check my website https://www.nsnam.com for any source codes. Also Subscribe to my channel and share it. Subscribe to My Youtube Channel - Engineering Clinic

VANET Simulation using SUMO and MOVE - NS2 Tutorial # 16

Image
Its about generating a tcl script for VANET Simulations using SUMO and MOVE software. It uses Sumo 0.12.3 version for creating the xml files Also a new Video similar to this, but latest OS, no issues in creating a traffic. Subscribe to My Youtube Channel - Engineering Clinic

LEACH Protocol in ns2 - NS2 Tutorial # 15

Image
LEACH (MIT uAMPS) Protocol in ns-2.35 This video is about the installation instructions for LEACH protocol in ns-2.35. It tells you the complete instruction on how to start and where to start. Subscribe to My Youtube Channel - Engineering Clinic

Congestion Control in TCP using NS2 - NS2 Tutorial # 14

Image
Congestion Control in TCP using NS2   Subscribe to My Youtube Channel - Engineering Clinic

How to add a Protocol in ns2 - NS2 Tutorial #13

How to add a new protocol in ns2 I am going to use the version ns-2.35 protoname was one of the best unicast routing protocol for ns2. Agent/SIMP Protoname -| Simp PROTONAME -| SIMP protoname -| simp you can download teh source code from https://www.nsnam.com There are totally 5 files in the source code protoname.cc converted to simp.cc protoname.h -| simp.h protoname_pkt.h -| simp_pkt.h protoname_rtable.cc -| simp_rtable.cc protoname_rtable.h -| simp_rtable.h In this new protocol, we have to 1. Add the source code (the 5 files given above) 2. existing code modification (within ns2) 3. Make an entry in the Makefile.in 4. Recompile ns2 5. Test the protocol using a TCL file. Addition of source code is done. Existing code modification - Very important. in ns2, inforamtion about compilation is scattered... we need to make modifications at multiple locations. What are the files that are needed for modification. all the file locations are here. To add

Blackhole attack in ns2 - NS2 Tutorial # 12

How to add a black hole attack in AODV protocol in ns2. https://www.nsnam.com You can download the source codes. Black hole is the basic attack in a network, here we are going mitigate this attack in ns2. Trust value, based on the trust value, if the value is less, then we can make it as an attacker node. High trust, medium trust and low trust (integer) Trusted or not (boolean) To make a node attacker node (preferanly a black hole attack, how to do that?) AODV protocol as it is easy to implement in ns2. Step 1: Declare the attacker variable We will two files aodv.h and aodv.cc files in aodv.h file, create a variable name as given below in the protected scope bool attacker; Step 2: initialize the attacker variable as false. In aodv.cc file, initialize the attacker to be false inside the constructor. Step 3: if a node is a blackhole, what happens to attacker value in the command() function of aodv.cc file inside the block if(argc==2), include the follow

Finding Energy, node position and speed in AODV - NS2 Tutorial # 11.1

AODV - Part 2 Finding the node position, energy and speed of the node while it is forwarding a packet. By default, these codes are not there in AODV, so we are going to modify or append in aodv protocol.. Check https://www.nsnam.com for downloading the source code.   Subscribe to My Youtube Channel - Engineering Clinic

AODV simulation in NS2 (Part 1) - NS2 Tutorial # 11

Detailed Explanation of AODV protocol. Lecture 11 - AODV - Part 1 Todays topic on AODV protocol AODV - Adhoc Ondemand Distance Vector the location of the source code for Aodv is in the folder ~ns-2.35/aodv/ My suggestion is Always try to understand the header file first.. later you can move on to source file (.cc files) I will go through aodv.h file first and then aodv.cc file next.... let me explain.... I should know where my work is residing, for example in AODV should I work on Routing Table Energy Management Quality oif Service Link Failure Logs or tracing Neighbour management Attacks (Black hole, gray hole, etc...) Security so prefer to stay at the header files first... Now the action begins. how do i modify the AODV protocol as per my small piece of algorithm... I would like to print the nodes that are forwarding the packets. Two information will be recorded in a text file separately.. Name of the file: aodv_output.dat data recorded will b

Creation of a New Agent in ns2 - NS2 Tutorial # 10

We know that the file is stored in the folder ~ns-2.35/pradeep/tspagent.cc Open the file ns-2.35/Makefile.in and make an entry of your own file (in this case, it is tspagent.cc Find a vairable inside the Makefile.in called OBJ_CC= and make an entry there as shown below pradeep/tspagent.o \ Save the file and open a terminal, go to the folder ~ns-2.35/ and execute the command one by one $] ./configure $] make Correct any mistakes or errors in your .cc file and run the above commands. Successful OTcl and C++ linkages.... Thank you and Stay tuned for more lectures Next lecture will be on AODV protocol and its modification. Refer my website nsnam.com for downloading the source code and refer my videos at youtube.com/tspradeepkumar share and subscribe. Thank you......   Subscribe to My Youtube Channel - Engineering Clinic

Performance Evaluation of Adhoc Routing Protocols in ns2 - NS2 Tutorial...

PErformance Evaluation of Adhoc Routing Protocols using NS2 Very old Project as well as a topic, but this will give an idea of how to compare multiple protocols or agents. 1 hour Project* * - you should know ns2 already should know how to write AWK scripts Should know about energy model Should know about wireless networks and protocols To know the above concepts, check my Ns2 Lecture series videos in Youtube and come back to this video Youtube.com/tspradeepkumar AODV, DSDV and DSR AODV - Adhoc On Demand Distance Vector DSDV - Destination Sequenced Distance Vector DSR - Dynamic Source Routing Lcture 8 - AWK Scripts Average throughput Instant throughput Residual Energy Packet Delivery ratio To download the source codes, visit https://www.nsnam.com Going inside the project Step 1: Use the same network and same disntace, energy, etc when you compare multiple protocols Step 2: Generate Scenario, You need not write the code in TCL (of course you can modify)

AWK Scripts for NS2 - NS2 Tutorial # 8

AWK Scripts for ns2 This is one of the important in ns2 as we are going to analyse the performance metrics of the network In this session, we are going to see the following metrics. 1. Average Throughput 2. instant Throughput 3. Packet Delivery Ratio 4. Residual Energy of the nodes. A - Aho W - Weinberger K - Keninghan Easy to implement and process. BEGIN { } { } END { } In ns2, new trace format, there could be as many as 52 columns. Each column specify some parameters. Viewers are requested to go through these parameters through the documentation. in aAWK, $1 refers 1st column $2 refers 2nd column and so on... awk can be run using either of these commands $] awk -f filename.awk filename.tr or $] gawk -f filename.awk filename.tr Average throughput is done you can download this source code in https://www.nsnam.com Instant Throughput with two values to plot the characteristics. Residual Energy of the individual nodes AND ALSO THE AVERAGE RES

NS2 Scenario Generator - NS2 Tutorial # 7

This video shows about the tool NSG2.1.jar that creates TCL files automatically as per the design of our network. It just creates beautiful simulation within seconds. See this post for more information https://www.nsnam.com/2013/04/ns2-scenario-generator.html   Subscribe to My Youtube Channel - Engineering Clinic

Energy Model in ns2 - NS2 Tutorial # 6

This video shows how to implement energy Model in ns2. The following six lines are crucial in mentioning energy in ns2. These lines are added to the node-config parameter. Refer https://www.nsnam.com for downloading the source code. -energyModel "EnergyModel" \ -initialEnergy 3.0 \ -txPower 0.9 \ -rxPower 0.5 \ -idlePower 0.45 \ -sleepPower 0.05 \   Subscribe to My Youtube Channel - Engineering Clinic

Wireless network Coding in ns2 - NS2 Tutorial # 5

Image
Subscribe to My Youtube Channel - Engineering Clinic

Wired Network Coding in ns2 - NS2 Tutorial # 4

Image
Before starts this video, go to this link and learn the design of this network https://youtu.be/1_KeTTFsrt0 Its about Wired network coding in TCL in ns2. Its is step by step instruction that shows the complete source code of tcl and the network animation and trace file. Refer to Lecture 3 - wired Network design for complete information on how to design a network Subscribe to My Youtube Channel - Engineering Clinic

Wired Networks Design - NS2 Tutorial # 3

This video shows the design of a 6 node wired network that shows the complete design of the network. Listen to the full video and then proceed to the Lecture 4 - Coding with TCL for the wired network. Refer to Lecture 4 - https://youtu.be/FS0jnfNCwBA   Subscribe to My Youtube Channel - Engineering Clinic

Installation of NS2 in Ubuntu 18.04 - NS2 Tutorial # 2

ns2 installation in ubuntu 18.04 $] tar zxvf ns-allinone-2.35.tar.gz $] sudo apt install gcc-4.8 g++-4.8 Subscribe to My Youtube Channel - Engineering Clinic if you have installed ubuntu just now, you can try these commands also in the beginning $ sudo apt update $ sudo apt install build-essential autoconf automake libxmu-dev $ cd ns-allinone-2.35/ns-2.35 $ gedit Makefile.in $ gedit linkstate/ls.h $ cd .. $ ./install export PATH=$PATH:/home/pradeepkumar/ns-allinone-2.35/bin:/home/pradeepkumar/ns-allinone-2.35/tcl8.5.10/unix:/home/pradeepkumar/ns-allinone-2.35/tk8.5.10/unix export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/pradeepkumar/ns-allinone-2.35/otcl-1.14:/home/pradeepkumar/ns-allinone-2.35/lib https://www.nsnam.com https://www.pradeepkumar.org

Introduction to NS2 - NS2 Tutorial # 1

Image
Its about introduction to network simulator 2. Its gives information on basics of linux, basics of ns2 and its architecture. It also tells how to write a basic OTCL Code. Stay tuned for more lectures and workouts. Subscribe to My Youtube Channel - Engineering Clinic