Professional Documents
Culture Documents
DCCN File
DCCN File
for Women
NS-2 can be used to implement network protocols such as TCP and UDP, traffic
source behavior such as FTP, Telnet, Web, CBR, and VBR, router queues
management mechanism such as Drop Tail, RED, and CBQ, routing algorithms,
and many more. In ns2, C++ is used for detailed protocol implementation and
Otcl is used for the setup. The compiled C++ objects are made available to the
Otcl interpreter and in this way, the ready-made C++ objects can be controlled
from the OTcl level.
Features of NS2
• It’s a networking research discrete event simulator.
• It has a lot of features for simulating protocols including TCP, FTP, UDP,
HTTPS, and DSR.
• It is capable of simulating both wired and wireless networks.
• It is mostly based on Unix.
• Its scripting language is TCL.
• Tclcl is a C++ and otcl linkage language.
• Scheduler for discrete events.
export NS_HOME=/home/sys27/ns-allinone-2.28
export PATH=$NS_HOME/nam-1.11:$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOM
E/bin:$PATH
export LD_LIBRARY_PATH=$NS_HOME/tcl8.4.5/unix:$NS_HOME/tk8.4.5/unix:$NS_HOME/otcl-
1.9:$NS_HOME/lib:$LD_LIBRARY_PATH
export TCL_LIBRARY=$NS_HOME/tcl8.4.5/library
Assignment 2
Awk is a scripting language used for manipulating data and generating reports. The awk
command programming language requires no compiling and allows the user to use variables,
numeric functions, string functions, and logical operators.
Awk is a utility that enables a programmer to write tiny but effective programs in the form of
statements that define text patterns that are to be searched for in each line of a document and
the action that is to be taken when a match is found within a line. Awk is mostly used for
pattern scanning and processing. It searches one or more files to see if they contain lines that
matches with the specified patterns and then perform the associated actions.
Awk is abbreviated from the names of the developers – Aho, Weinberger, and Kernighan.
1. AWK Operations:
(a) Scans a file line by line
(b) Splits each input line into fields
(c) Compares input line/fields to pattern
(d) Performs action(s) on matched lines
2. Useful For:
(a) Transform data files
(b) Produce formatted reports
Awk is mostly used for pattern scanning and processing
3. Programming Constructs:
(a) Format output lines
(b) Arithmetic and string operations
(c) Conditionals and loops