Ns2 Projects code
Ns2 Projects code we offer all network concepts.c++ & tcl, otcl is used to develop the applications in ns2.
What is Ns2
- Ns2 is a type of network simulator
- Ns2 is a object oriented simulator
- It is used to predict behavior of a computer network
- It is a discrete event simulator for accurately understand the network behavior
Uses of network simulators
Network simulators offer a cost effective method for
- Network design validation for enterprises / data centers /sensor networks etc
- Impact assessment for modification / additions to existing network
- Network protocol R & D
- Defense applications and Network-centric warfare
- It uses C++ and OTcl programming languages
- C++ is efficient to implement a design
- NS2 separates control path implementations from the data path implementation
- It plumbing makes NS2 very powerful.
- Another feature of NS2 is the event scheduler
- FreeBSD or *BSD
- Linux
- Unix
- Sun Solaris
- HP, SGI
- WINDOWS
- Tcl/TK
- OTc
- TclCL
- NS -2
- Nam-1
- Xgraph
Benefits of Ns2:
- Free of cost i.e. open source software
- All network components are implemented almost
- Active contributions from researchers
- Easy to modify and/or add new functions
# Create a dumbbell topology
$ns duplex-link $s(0) $n(0) 1Mb 5ms DropTail
$ns duplex-link $s(1) $n(0) 1Mb 5ms DropTail
$ns duplex-link $n(0) $n(1) 1Mb 20ms RED/myRIO
$ns duplex-link $n(1) $n(2) 700Kb 25ms RED/myRIO
$ns duplex-link $n(2) $r(0) 1Mb 5ms DropTail
$ns duplex-link $n(2) $r(1) 1Mb 5ms DropTail
# Load a size-aware classifier to node 0
set cls [new Classifier/Hash/SizeAware 128]
$cls set default_ -1
$cls set flowlen_thr_ 5
$cls set refresh_intv_ 2
$cls set dynamic_update_ 0
set n(0) [node_with_classifier $cls]