Laboratory I (Based on Cores) IT0904C
M.Tech IT (1st Semester)
Department of Information Technology, Tripura University
Syllabus: Laboratory I (Based on Cores) IT0904C is based on syllabus of Computer Networks and Internet Protocols (IT0902C)
Prior Software Installation and Setup
Download and Install VirtualBox (Click here)
Download and Install Fedora 13 (fedora13.iso)
Download and Install Network Simulator 2 (ns-allinone-2.33.tar.gz)
Commands:
To write TCL programme: vi filename.tcl
To compile TCL Programme: ns filename.tcl
Prior Write-up
Introduction to "Network Simulator 2" (Basic steps, Goals, Protocols & Models supported, Components)
Write Installation procedure of "Network Simulator 2".
Introduction to trace file (*.tr) format.
Lab Experiments
Write a TCL script to create network topology with two nodes (n0 and n1) and create a duplex link between the nodes with speed 50mb and time 20ms. [aka Node experiment] [Solution: Video, TCL Code, Output]
Write a TCL script that simulates a wired network topology with two nodes and create duplex link between them. Set up a TCP connection between nodes and run a FTP application over the TCP connection. [aka Single TCP experiment] [Solution: TCL Code, Output, Tracefile]
Write a TCL script to create wired network topology with 8 nodes using all links as duplex links of 10 Mb and 10ms. Here, nodes n0, n1, n2 are labeled as "senders", nodes n3, n4, n5 are labeled as "gateway", nodes n6, n7, n8 are labeled as "receivers". Using TCP connections, transfer data from node n0 to n6, node n7 to n1 and node n2 to n6 at various times. Analyze the output nam-trace file using nam software and write first five lines of trace file (.tr) output. [aka Multiple TCP experiment] [Output]
Write a TCL script that simulates a wired network topology with two nodes and create duplex link between them. Set up a UDP connection between nodes and run a CBR application over the UDP connection. [aka Single UDP experiment] [Solution: TCL Code, Output, Tracefile]
Write a TCL script to create wired network topology with 8 nodes using all links as duplex links of 25 Mb and 24ms. Here, nodes n0, n1, n2 are labeled as "senders", nodes n3, n4, n5 labeled as "gateway" and nodes n6, n7, n8 labeled as "receiver". Create three UDP connections between (node n6 & n0), (node n1 & n7) and (node n8 & n2). Run three CBR applications over the UDP connections at time 1.0, 1.5 and 2.0. Analyze the output nam-trace file using nam software and write first five lines of trace file (.tr) output. [aka Multiple UDP experiment] [Output]
Write a TCL script to create wired network topology with 8 nodes using all links as duplex links of 15 Mb and 30 ms. Create three TCP connections between (node n2 & n8), (node n1 & n7) and (node n1 & n7). Create three UDP connections between (node n6 & n0), (node n1 & n7) and (node n8 & n2). Run three FTP and three CBR applications over the TCP and UDP connections at same time 1.0. Analyze the output nam-trace file using nam software and write first five lines of trace file (.tr) output. [aka Hybrid-TCP-UDP experiment] [Output]
Write an AWK script to calculate Throughput from Trace file of the experiment 2 and experiment 4. [Input: Tracefile, Solution: AWK Script] (Code to run awk script: awk -f Throughput.awk SingleTCP.tr)
Write an AWK script to calculate the total number of enqueue, dequeue, receive and drop operations by analyzing trace file of experiment 2 and experiment 4. [aka event experiment]
Write an AWK script to calculate PDR from Trace file of the experiment 2 and experiment 4.
Write an AWK script to calculate Delay from Trace file of the experiment 2 and experiment 4.
Write a TCL script to simulate wireless networks with two nodes.
Write AWK script to calculate Energy, Throughput, PDR and Delay from trace file of the wireless networks.
Experiment x. Basics of Network Simulation
Please read the information given in the Introduction, Theory, simulation, procedure, exercise tabs of the link: http://vlabs.iitkgp.ac.in/ant/1/
Q1(a). Write a TCL script to simulate the network described below: Consider a small network with five nodes n0, n1, n2, n3, n4, forming a star topology. The node n4 is at the center. Node n0 is a TCP source, which transmits packets to node n3 (a TCP sink) through the node n4. Node n1 is another traffic source, and sends UDP packets to node n2 through n4. The duration of the simulation time is 10 seconds. Hints: http://vlabs.iitkgp.ac.in/ant/1/
Q1(b). Write a TCL script to simulate a file transfer with ns2.
Consider a client and a server. The server is running a FTP application (over TCP). The client sends a request to download a file of size 10 MB from the server. Write a script to simulate this scenario. Let node #0 be the server and node #1 be the client. TCP packet size is 1500 B. Assume typical values for other parameters.
Note: This simulation require transfer of a fixed size file. Therefore, time required for the transfer would be constant for a given bandwidth of a link. To verify this, determine the time that would roughly be required for the transfer. Then look at the bottom of the trace file and verify whether there is any transmission beyond the time calculated.
To verify that the client has downloaded the entire file, plot the "Bytes Received " curve for node #1. The y-axis is in Kbits. Convert it to MB and verify whether it approximates the specified file size. TCP headers would effectively increase the count of received bytes at node # 1. Hints: http://vlabs.iitkgp.ac.in/ant/1/