Skip to main content

Posts

Telnet and FTP for a wired network | NS2 Tutorial 4

TELNET and FTP for a Wired Network In the above network, Node 0 to Node 5 is enabled with Telnet Application, and Node 4 to Node 1 is enabled with FTP Application.  Both FTP and TElnet are application layer protocols use TCP as the transport Layer.  Requisites: OS: Ubuntu 22.04 NS Version: 2.35 Results: Throughput with the help of AWK script Animation: NAM Graphs: xgraph or gnuplot PROGRAM #=================================== #     Simulation parameters setup #=================================== set val(stop)   10.5                     ;# time of simulation end #=================================== #        Initialization         #=================================== #Create a ns simulator set ns [new Simulator] #Open the NS trace file set tracefile [open telnet.tr w] $ns trace-all $tracefile #Open the NAM trac...

AWK and NS2 Tracefile | NS2 Tutorial 3

AWK Awk is abbreviated from the names of the developers – Aho, Weinberger, and Kernighan . 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 one of the most prominent text-processing utilities on GNU/Linux. It is very powerful and uses a simple programming language. 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. 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. AWK Useful For: (a) Transform data files (b) Produce formatted reports Syntax: $ awk options 'selection ...