Network Lab
Network Lab
Assignment No: 2
Aim:
To study installation and configuration of NS2 and implementation of TCL
Hello World.
TCL Programming: Tcl (Tool Command Language) is a very powerful but easy
to learn dynamic programming language, suitable for a very wide range of uses,
including web and desktop applications, networking, administration, testing and
many more. Open source and business-friendly, Tcl is a mature yet evolving
language that is truly cross platform, easily deployed and highly extensible. It
aims at providing the ability for programs to interact with other programs and
also for acting as an embeddable interpreter. Even though the original aim was
to enable programs to interact, you can find full-fledged applications written in
Tcl/Tk.
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, andvarious data inspection tools.It has a graphical interface, which
can provide information such as number of packet drops at each link. This trace
data is typically derived as output from a network simulator like ns or from real
network measurements,
Output:
Explanation:-
set ns [new Simulator] - Sets a new simulator of the name „ns‟.
$ns at 1 "puts \"hello world\"" -Puts “hello world” in the simulator of the file.
$ns at 1.5 "exit" - Exits the simulator.
$ns run – Runs the simulator.