26-06-2013, 01:05 PM
An Introduction to NS, Nam and OTcl scripting
An Introduction to NS.pdf (Size: 704.09 KB / Downloads: 45)
Introduction to NS-2
This report deals with Network Simulator Version 2, also known as NS-2 [20]. NS-2 is
an event driven packet level network simulator developed as part of the VINT project
(Virtual Internet Testbed)[1]. This was a collaboration of many institutes including UC
Berkeley, AT&T, XEROX PARC and ETH. Version 1 of NS was developed in 1995 and
with version 2 released in 1996. Version 2 included a scripting language called Objectoriented
Tcl (OTcl) [2]. It is an open source software package available for both
Windows 32[3] and Linux [4] platforms.
The TCL interpreter:
TclCL is the language used to provide a linkage between C++ and OTcl. Toolkit
Command Language (Tcl/OTcl) scripts are written to set up/configure network
topologies. TclCL provides linkage for class hierarchy, object instantiation, variable
binding and command dispatching. OTcl is used for periodic or triggered events
NAM
NAM [5, 27] provides a visual interpretation of the network topology created. The
application was developed as part of the VINT project. Its features are as follows. Figure
8 displays the NAM application and its components.
· Provides a visual interpretation of the network created
· Can be executed directly from a Tcl script
· Controls include play, stop ff, rw, pause, a display speed controller and a packet
monitor facility.
· Presents information such as throughput, number packets on each link.
· Provides a drag and drop interface for creating topologies.