1. Homepage
  2. Homework
  3. [2022] COMP3331 Computer Networks and Applications - Lab Exercise 6: Throughput, IP Fragmentation and Routing
This question has been solved

[2022] COMP3331 Computer Networks and Applications - Lab Exercise 6: Throughput, IP Fragmentation and Routing

Engage in a Conversation
UNSWCOMP3331Computer Networks and ApplicationsHTTP & Socket ProgrammingC++Java

CourseNana.COM

Lab Exercise 6: Throughput, IP Fragmentation and Routing CourseNana.COM

Objectives: CourseNana.COM

Set up a simulation in NS2 for TCP throughput measurement gain insights into routing dynamics and IP fragmentation CourseNana.COM

Prerequisites and Links: CourseNana.COM

Week 7 and 8 Lectures
Relevant Parts of Chapter 4 and Chapter 5 of the textbook
Introduction to Tools of the Trade (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/76099)
Basic understanding of Linux. A good resource is here (http://www.ee.surrey.ac.uk/Teaching/Unix/) but there are several other resources online.
Introduction to ns-2 from Labs 4 and 5.
exercise2.tcl (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75888) TCPThroughput.png (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75877) IPfrag_trace (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75896)
tp_routing.tcl (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75873)
CourseNana.COM

Submission Instructions: CourseNana.COM

Submit a PDF document Lab6.pdf with answers to all questions for all exercises. To include all supporting files, create a tar archive of all the files called Lab6.tar. Submit the archive using the give or WebCMS3 interface. You can submit from a lab machine or ssh into the CSE login server. CourseNana.COM

OS Compatibility: CourseNana.COM

The provided script (for ns-2) has been tested on CSE Linux machines. They may not work on your personal machine even if you have installed ns-2. As such, we suggest that you work on a CSE machine to complete these lab exercises. You can do so by going to a lab in person or via ssh/vlab. CourseNana.COM

Exercise 1: Setting up NS2 simulation for measuring TCP throughput CourseNana.COM

(submit the completed file exercise2.tcl and throughput. plot separately and answer the questions on throughput behaviour in the report) CourseNana.COM

Consider the topology shown in the following figure where bandwidth and delay for each link are shown. CourseNana.COM

page2image30871616 CourseNana.COM

You have been provided with a stub tcl file exercise2.tcl (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75888) . Your task is to complete the stub file so that it runs with ns and produces two trace files tcp1.tr and tcp2.tr, and nam.out. Check the animation for the simulation using nam.out file. Next, write a script named "throughput. plot" (referenced from within exercise2.tcl in procedure finish( ) ) to plot the throughput received by host n5 for two flows terminating at n5. Uncomment the line (#exec gnuplot throughput.plot &) to execute gnuplot. You have been provided with the throughput plot TCPThroughput.png (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75877) produced by gnuplot for comparing your final output. CourseNana.COM

">>" in the stub file indicates that one (or more) lines need to be added. Remove the ">>" and insert the required code. CourseNana.COM

Consider the following traffic pattern for your simulation.
FTP/TCP Source n0 -> TCP Sink n5 : start time: 0.5 sec End time: 8.5 sec FTP/TCP Source n3 -> TCP Sink n5 : start time: 2.0 sec End time: 9.5 sec FTP/TCP Source n7 -> TCP Sink n0 : start time: 3.0 sec End time: 9.5 sec FTP/TCP Source n7 -> TCP Sink n3 : start time: 4.0 sec End time: 7.0 sec
CourseNana.COM

You have to submit your completed tcl file (exercise2.tcl) and the script (throughput.plot) for producing the throughput plot. Comment on the throughput behaviour observed in the simulation by answering the following questions. CourseNana.COM

Question 1: Why the throughput achieved by flow tcp2 is higher than tcp1 between time span 6 sec to 8 sec? Question 2: Why the throughput for flow tcp1 is fluctuating between time span 0.5 sec to 2 sec?
Question 3: Why is the maximum throughput achieved by anyone flow capped at around 1.5Mbps? CourseNana.COM

Exercise 2: Understanding IP Fragmentation CourseNana.COM

(Include in your report) CourseNana.COM

We will try to find out what happens when IP fragments a datagram by increasing the size of a datagram until fragmentation occurs. You are provided with a Wireshark trace file IPfrag_trace (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75896) that contains a trace of sending pings with specific payloads to 8.8.8.8. We have used ping with option ( – s option on Linux) to set the size of data to be carried in the ICMP echo request message. Note that the default packet size is 64 bytes in Linux (56 bytes data + 8 bytes ICMP header). Also, note that Linux implementation for ping also uses 8 bytes of ICMP timestamp option leaving 48 bytes for the user data in the default mode. Once you have sent a series of packets with the increasing data sizes, IP will start fragmenting packets that it cannot handle. We have used the following commands to generate this trace file. CourseNana.COM

Step 1: Ping with the default packet size to the target destination as 8.8.8.8 CourseNana.COM

Step 2: Repeat by sending a set of ICMP requests with data of 2000. CourseNana.COM

Step 3: Repeat again with data size set as 3500 CourseNana.COM

ping -c 3 8.8.8.8 CourseNana.COM

ping -s 2000 -c 3 8.8.8.8 CourseNana.COM

ping -s 3500 -c 3 8.8.8.8 CourseNana.COM

Load this trace file in Wireshark, filter on protocol field ICMP (you may need to clear the filter to see the fragments) and answer the following questions. CourseNana.COM

Question 1: Which data size has caused fragmentation and why? Which host/router has fragmented the original datagram? How many fragments have been created when the data size is specified as 2000? CourseNana.COM

Question 2: Did the reply from the destination 8.8.8.8. for 3500-byte data size also get fragmented? Why or why not? CourseNana.COM

Question 3: Give the ID, length, flag and offset values for all the fragments of the first packet sent by 192.168.1.103 with a data size of 3500 bytes? CourseNana.COM

Question 4: Has fragmentation of fragments occurred when data of size 3500 bytes has been used? Why or why not? CourseNana.COM

Question 5: What will happen if for our example one fragment of the original datagram from 192.168.1.103 is lost? CourseNana.COM

Exercise 3: Understanding the Impact of Network Dynamics on Routing CourseNana.COM

(include in your report) CourseNana.COM

In this exercise, we will observe how routing protocols react when network conditions change (e.g., a network link fails) using a ns-2 simulation. CourseNana.COM

The provided script, tp_routing.tcl (https://webcms3.cse.unsw.edu.au/COMP3331/22T2/resources/75873) takes no arguments and generates the network topology shown in the figure below. CourseNana.COM

page4image30870160 CourseNana.COM

You can run the simulation with the following command: CourseNana.COM

Step 1: Run the script and observe the NAM window output. CourseNana.COM

Question 1: Which nodes communicate with which other nodes? Which route do the packets follow? Does it change over time? CourseNana.COM

Note: You can also answer the above question by examining the simulation setting in the script file. CourseNana.COM

1      $ns tp_routing.tcl CourseNana.COM

Step 2: Modify the script by uncommenting the following two lines (line No 84 and 85): CourseNana.COM

page5image20189504 CourseNana.COM

1      $ns rtmodel-at 1.0 down $n1 $n4 $ns rtmodel-at 1.2 up $n1 $n4 CourseNana.COM

Step 3: Rerun the simulation and observe the NAM window output.
NOTE: Ignore the NAM syntax warnings on the terminal. These will not affect the simulation. CourseNana.COM

Question 2: What happens at time 1.0 and at time 1.2? Does the route between the communicating nodes change as a result of that? CourseNana.COM

Step 4: The nodes in the simulation above use a static routing protocol (i.e., preferred routes do not change over time). We are going to change that so that they use a Distance-Vector routing protocol. Modify the script and uncomment the following line (Line No 16) before the definition of the finish procedure. CourseNana.COM

Step 5: Rerun the simulation and observe the NAM window output. CourseNana.COM

Question 3: Did you observe any additional traffic as compared to Step 3 above? How does the network react to the changes that take place at time 1.0 and time 1.2 now? CourseNana.COM

Step 6: Comment the two lines (Lines 84 and 85) that you had added to the script in Step 2 and uncomment the following line ( Line 87) instead: CourseNana.COM

Step 7: Rerun the simulation and observe the NAM window output.
Question 4: How does this change affect the routing? Explain why.
Step 8: Comment line 87 and Uncomment the following lines (Lines 89 and 90):
CourseNana.COM

and uncomment the following (Line 29), which is located right after the finish procedure definition: CourseNana.COM

Step 9: Rerun the simulation and observe the NAM window output.
Question 5: Describe what happens and deduce the effect of the line you just uncommented. CourseNana.COM

Resource created 2 months ago (Sunday 22 May 2022, 12:49:57 PM), last modified 2 days ago (Thursday 28 July 2022, 04:07:31 PM). CourseNana.COM

$ns rtproto DV CourseNana.COM

$ns cost $n1 $n4 3 CourseNana.COM

$ns cost $n1 $n4 2 $ns cost $n3 $n5 3 CourseNana.COM

Node set multiPath_ 1 CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
UNSW代写,COMP3331代写,Computer Networks and Applications代写,HTTP & Socket Programming代写,C++代写,Java代写,UNSW代编,COMP3331代编,Computer Networks and Applications代编,HTTP & Socket Programming代编,C++代编,Java代编,UNSW代考,COMP3331代考,Computer Networks and Applications代考,HTTP & Socket Programming代考,C++代考,Java代考,UNSWhelp,COMP3331help,Computer Networks and Applicationshelp,HTTP & Socket Programminghelp,C++help,Javahelp,UNSW作业代写,COMP3331作业代写,Computer Networks and Applications作业代写,HTTP & Socket Programming作业代写,C++作业代写,Java作业代写,UNSW编程代写,COMP3331编程代写,Computer Networks and Applications编程代写,HTTP & Socket Programming编程代写,C++编程代写,Java编程代写,UNSWprogramming help,COMP3331programming help,Computer Networks and Applicationsprogramming help,HTTP & Socket Programmingprogramming help,C++programming help,Javaprogramming help,UNSWassignment help,COMP3331assignment help,Computer Networks and Applicationsassignment help,HTTP & Socket Programmingassignment help,C++assignment help,Javaassignment help,UNSWsolution,COMP3331solution,Computer Networks and Applicationssolution,HTTP & Socket Programmingsolution,C++solution,Javasolution,