Skip to main content

Posts

TCP Congestion Control using NS2

Congestion control is one of the performance metrics of TCP protocol. There are so many TCP Versions to control congestion in the network. NS2 also supports various TCP protocols like TCP Vegas, TCP Reno, TCP, TCP Sack, Full TCP, TCP linux, etc. The code can be downloaded from the following link https://drive.google.com/file/d/1EGeJOtqapDIB5NQy5Ar1L7nzPIihSyck/view?usp=sharing Each TCP protocols has different mechanism in controlling the congestion. Some are good at Congestion control, some are good at error ands flow control. Before understanding the congestion control, one has to know the congestion window of TCP. TCP has a congestion window (cwnd_ in ns2), this variable affects or predicts the congestion control. The value assigned to this variable will alter the congestion control. Here are the files that are of prime importance before dealing with congestion control. ~ns-2.35/tcp/tcp.cc  ~ns-2.35/tcp/tcp.h  ~ns-2.35/tcl/lib/ns-default.tcl (In this file, the co...

xgraph in Ubuntu 20.04 | Solved (Issues)

XGRAPH in Ubuntu 20.04 xgraph - Standalone application in Ubuntu 20.04 There are two options to use either 32 bit or 64 bit OS, to find what OS instruction set your OS is Using, use the following command  $] uname -a  Linux pradeepkumar-Latitude-3410 5.8.0-36-generic #40~20.04.1-Ubuntu SMP Wed Jan 6 10:15:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux In the above output x86_64 indicates its 64 bit, else it may show i686 which indicates its a 32 bit OS You can watch the complete instruction here on how to do? $] gedit ~/.bashrc include the following line in the .bashrc file (Copy the PAT H of xgraph and paste it in .bashrc)     alias xgraph=/home/pradeepkumar/XGraph4.38_linux64/bin/xgraph After the above change is made, restart the computer and its set.  $] xgraph  A window will be popping up as shown below xgraph How to plot a data file #data.xg 1 3.2 4.3 2 4.5 6.9 3 9.8 11.9 4 10.2 17.6 5 7.8 22.2 To plot the above two curves, the following command can be ...

Installing NS-3.32 in Ubuntu 20.04

This is about installing ns version 3.32 in Ubuntu 20.04 LTS. #ns3 #ns3 .32 #networksimulation The commands used in the video are given here. $] sudo apt update $] sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-qmake qt5-default gnuplot-x11 wireshark Download the ns-allinone-3.32.tar.bz2 package from nsnam.org and copy it to /home/ folder See the full video for detailed instructions Extract it either in GUI or using command $] tar jxvf ns-allinone-3.32.tar.bz2 $] cd ns-allinone-3.32/ $] ./build.py --enable-examples --enable-tests The above command will take some time to install all the packages  You can see the output as shown below ns3 To check whether ns3 installed successfully, use the following commands. $] cd ns-3.32/ $] ./waf --run hello-simulator You should get the output as Hello Simulator $] ./waf --run first This is the example from the ns-3.32...

Flying Adhoc Network Simulation (FANET) using NS3

In this post, we will see how to simulation a Flying Adhoc Network (FANET) simulation using NS3.  Its actually MANET with 3D mobility Model called Gauss Markov Mobility Model.  See the following video for more details and explanation: So all the nodes are flying in a 3D Fashion with X axis, Y Axis and Z Axis  The default values of the three axes are  X axis can be (-100m, 100m) Y axis can be (-100m, 100m) Z axis can be (0m, 100m) We will take the following example for experimenting the Flying Adhoc Networks. To begin with, We use the following parameters for Simulation: The name of the File is fanetex.cc #include "ns3/point-to-point-module.h" #include "ns3/ipv4-global-routing-helper.h" #include <fstream> #include <string> #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" #include "ns3/config-store-module.h" #include ...

Installing NS-3.31 in Ubuntu 20.04

Installing ns-3.31 in Ubuntu 20.04 - 64 bit OS. Follow the full video for more details: Fresh installation of Ubuntu OS  $] sudo apt update $] sudo apt install build-essential autoconf automake libxmu-dev $] sudo apt install build-essential autoconf automake libxmu-dev python-pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-kiwi python-gnome2 python-gnome2-desktop qt4-dev-tools qt4-qmake qt4-qmake qt4-default gnuplot-x11 wireshark extract to /home/pradeepkumar $] echo $HOME $] cd ns-allinone-3.31/ $] ./build.py --enable-examples --enable-tests you will get the following screen after the installation $] cd ns-allinone-3.31/ns-3.31/ $] ./waf --run hello-simulator  This will display  "Hello Simulator"  Which indicates that ns3 is installed successfully. $] ./waf --run first