When & Where
Click to Attend
Network simulator
Click to Attend

Network simulator is a tool for simulating basic networking aspects.
NS2 requires a different language for scripting.

In this session i will provide you with the basics of Network Simulator installation and scripting.

Also i will provide you with some basic programs and protocol scripts that you would need as a framework for implementing your project’s.

Here is my WebSite for NS2.

Please do visit this site if you need to learn NS2 or if have any queries about NS2.

https://sites.google.com/site/dicoverns2/

Here are a few applications where you will need ns2.

focused on modeling network protocols
-> wired, wireless, satellite
-> TCP, UDP, multicast, unicast
-> Web, telnet, ftp
-> Ad hoc routing; sensor networks
-> Infrastructure: stats, tracing, error models etc.
Simulate existing network protocols: TCP,routing, and multicast protocols over both wired and wireless networks.

•Possibility to implement and test new protocols and applications

•Current release: ns-2.5

Here is a sample ns2 code that is used for creating two nodes and link them using a duplex link:

#Create a simulator object
set ns [new Simulator]

#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#Define a ‘finish’ procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
#exec nam out.nam &
exit 0
}

#Create two nodes
set n0 [$ns node]
set n1 [$ns node]

#Create a duplex link between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail

#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 “finish”

#Run the simulation
$ns run

Coming to NAM :

Nam is a Tcl/TK based animation tool for viewing network simulation traces and real world packet traces. It supports topology layout, packet level animation, and various data inspection tools.

https://i0.wp.com/www.isi.edu/nsnam/nam/nambig.gif?resize=754%2C544

Share this session:

Comments

    Leave a Reply

    When & Where
    FEB 2
    TWO THOUSAND AND NINETEEN
    8:00
    IN THE MORNING
    DAYANAND SAGAR UNIVERSITY, SCHOOL OF ENGINEERING
    HOSUR ROAD, KUDLU GATE, BANGALORE (NOT KUMARSWAMY LAYOUT)
    FEB 02
    TWO THOUSAND AND NINETEEN
    8:00
    IN THE MORNING
    DAYANAND SAGAR UNIVERSITY, SCHOOL OF ENGINEERING
    HOSUR ROAD, KUDLU GATE, BANGALORE (NOT KUMARSWAMY LAYOUT)