What is the Difference Between NS2 and NS3

What is the Difference Between NS2 and NS3

Step-1 Supporting tools

Simulation result presentation:
in ns2 we use the nam package for present the simulation in the graphical mode
in ns3 we use the NetAnim package for present the simulation in the graphical mode
Graph genration:
in ns2 we use the Xgraph package for plot the result graph
in ns3 we use the gnuplot package for plot the result graph
Video Transmission:
in ns2 we perform the video transmission process based on the evalvid package
in ns3 we perform the video transmission process based on the ffmpeg package

Step-2 Supporting Languages

in NS3 written the main file using C++ , with the file extension of .cc but in NS2 written the main file with the help of TCL and C++.
in NS3 Python is available for the scripting language , but in NS2 Only TCL can be used as the scripting language
in NS3 .tr-> files used for trace analysis,.XML->files are used for network Animation ,.csv-> files used for gnu plot. But in NS2 .tr-> files used for trace parameters , .nam -> files used for Network Animation and .xg -> files used for graph

Step-3 Modules

In ns3 ,we have a default modules , for routing AODV, DSR,DSDV and others. For communication TCP,UDP and others. And the Mobility models with the node moving configurations, antenna configurations and others. In NS3 we can create a own models , by using the command suod ./create-module.py new-modulename.
in ns2, we have a default modules , for routing AODV, DSR,DSDV and others. For communication TCP,UDP,satellite and others. And the mobile with the node moving configurations, antenna configurations and others. In NS2 we can create a own models , by create a folder in ns-2.35 folder and call the new modules fiels in the makefile.in

Step-4 Supporting Domains

in the ns2 support the wifi,WPAN ,LTE, VANET with sumo and wireless sensor networks,, multimedia video transmission and D2D and M2M Communication process.
in the ns3 support the wifi,WPAN ,LTE, VANET with sumo and wireless sensor networks and D2D and M2M Communication process,IoT,5G,6G Terasim, FANET and Underwater sensor network , multimedia video transmission.

Step-5 Difference between ns2 and ns3

NS3NS2
NS3 can be act as the emulator that it can connect to the real worldNS2 can not be act as the emulator.
Some of the NS2 models can be imported to NS3NS3 scripts can not run in NS2 environment
NS3 is written using C++NS2 is written with the help of TCL and C++.
Compilation time is not a matterC++ recompilation takes more time more than TCL so most of the scripts are written using TCL
A Simulation script can be written in ns3Simulation script is not possible with NS2
Python is available for the scripting languageOnly TCL can be used as the scripting language
Information needed to send through the packet can be added at the header ,trailer, buffer ,etcThe header part of the NS2 includes all the information of header parts in the specified protocol
NS3 frees the memory that used to store the packetsNS2 never reuse or re allocate the memory until it get terminated.
The packet of ns3 consist of single buffer and small tagsThe packet of ns2 has headers and data for payload.
.tr-> files used for trace analysis. tr-> files used for trace parameters
.XML->files are used for network Animation.nam -> files used for Network Animation
.csv-> files used for gnu plot .xg -> files used for graph
Nam animator is available for visualization.Python visualizer , Network Animator visualization is available
Memory allocation is goodMemory allocation is not good as NS3
System prevents unnecessary parameters to be stored.Unnecessary parameters can not be prevented.
Total computation is less when compared to NS2Total Computation time is high when compared to NS3
Live Tasks
Technology Ph.D MS M.Tech
NS2 75 117 95
NS3 98 119 206
OMNET++ 103 95 87
OPNET 36 64 89
QULANET 30 76 60
MININET 71 62 74
MATLAB 96 185 180
LTESIM 38 32 16
COOJA SIMULATOR 35 67 28
CONTIKI OS 42 36 29
GNS3 35 89 14
NETSIM 35 11 21
EVE-NG 4 8 9
TRANS 9 5 4
PEERSIM 8 8 12
GLOMOSIM 6 10 6
RTOOL 13 15 8
KATHARA SHADOW 9 8 9
VNX and VNUML 8 7 8
WISTAR 9 9 8
CNET 6 8 4
ESCAPE 8 7 9
NETMIRAGE 7 11 7
BOSON NETSIM 6 8 9
VIRL 9 9 8
CISCO PACKET TRACER 7 7 10
SWAN 9 19 5
JAVASIM 40 68 69
SSFNET 7 9 8
TOSSIM 5 7 4
PSIM 7 8 6
PETRI NET 4 6 4
ONESIM 5 10 5
OPTISYSTEM 32 64 24
DIVERT 4 9 8
TINY OS 19 27 17
TRANS 7 8 6
OPENPANA 8 9 9
SECURE CRT 7 8 7
EXTENDSIM 6 7 5
CONSELF 7 19 6
ARENA 5 12 9
VENSIM 8 10 7
MARIONNET 5 7 9
NETKIT 6 8 7
GEOIP 9 17 8
REAL 7 5 5
NEST 5 10 9
PTOLEMY 7 8 4

Workflow

YouTube Channel

Unlimited Network Simulation Results available here.