程序代写案例-COMP3331

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
2021/6/8 Lab Exercise 1: Tools of the Trade | COMP3331 21T2 | WebCMS3
https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60274 1/5
Resources / Lab E
xercises (/COMP3331/21T2/resources/60249) / Lab Exercise 1: Tools of the Trade
Lab Exercise 1: Tools of the Trade

There are 6 labs during this course. For each student, the
5 best performing labs will contribute to your final lab
mark.
Objectives:
Get familiar with the basic networking tools: ping, traceroute, ifconfig, netstat, nslookup
Gain insights into evaluating network performance and understanding network topology
Prerequisites:
Week 1 Lectures
Relevant Parts of Chapter 1 of the textbook
Introduction to Tools of the Trade
(https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60271)
runping.sh (https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60140)
plot.sh (https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60164)
Basic understanding of Linux. A good resource is (http://www.ee.surrey.ac.uk/Teaching/Unix/) here
(http://www.ee.surrey.ac.uk/Teaching/Unix/) but there are several other resources available online
Marks: 10 marks
This lab comprises of a number of exercises. Pl note that not all the exercises for this lab are marked.
However, you have to submit a report containing answers for all of the lab exercises.
Please attend only in your allocated lab slot.
We expect the students to go through as much of the lab exercises as they can at home and come to
the lab for clarifying any doubts in procedure/specifications.
Deadline:
4:00 pm Tuesday 15/06/2021 . You can submit as many times as you wish before the deadline. A later
submission will override the earlier submission, so make sure you submit the correct file. Do not leave until the
last moment to submit, as there may be technical or communications error and you will not have time to rectify
it.
Note: For all your lab exercises you are asked to put a screenshot of your outputs (e.g., graphs, traceroute, dig
comments) in your report.
Specification Make Submission Check Submission Collect Submission
2021/6/8 Lab Exercise 1: Tools of the Trade | COMP3331 21T2 | WebCMS3
https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60274 2/5
Late Penalty:
The late penalty will be applied as follows:
1 day after deadline: 20% reduction
2 days after deadline: 40% reduction
3 or more days late: NOT accepted
Note that the above penalty is applied to your final mark. For example, if you submit your lab work 2 days late
and your score on the lab is 8, then your final mark will be 8 - 3.2 (40% penalty) = 4.8.
Submission Instructions:
Prepare a PDF document Lab1.pdf with answers to all questions for all exercises. To include other supporting
documents, create a tar archive of all the files called Lab1.tar. Submit the archive using give or WebCMS3
interface. You can submit from a lab machine or ssh into the CSE login server. Instructions to ssh into CSE
login servers are here (https://taggi.cse.unsw.edu.au/FAQ/Logging_In_With_SSH/) .
1. Put all your files (e.g., Lab1.pdf, output.txt) in a directory lab1.
2. Type “tar –cvf Lab1.tar lab1”
3. When you are ready to submit, at the bash prompt type 3331
4. Next, type: give cs3331 Lab1 Lab1.tar
Please make sure that the tar archive is not corrupted. You can untar (use tar –xvf Lab1.tar) the created
archive to check that all the files are intact.
Max file size for submission is 3MB .
COMP9331 students should also use 'give cs3331'
Original Work Only:
You are strongly encouraged to discuss the questions with other students in your lab. However, each student
must submit his or her own work. You may need to refer to the material indicated above (particularly Tools of
the Trade document) and also conduct your own research to answer the questions.
OS Compatibility:
Please note that the instructions provided herein assume that you are running the exercises on a Linux
machine (similar to the CSE lab machines). These commands (and the scripts provided) may not work as
prescribed on other OSes (Windows, OS X, etc.). We strongly recommend that you run these experiments on
CSE machines. If you are running from off-campus, you can use VNC to connect to VLAB.
(https://taggi.cse.unsw.edu.au/Vlab/) We will be unable to help you diagnose any issues that may arise with
OSes other than Linux.
Exercise 1: nslookup
Use the nslookup command from the "Tools of the Trade" and answer the following questions:
1. Which is the IP address of the website www.koala.com.au? In your opinion, what is the reason of having
several IP addresses as an output?
2. Find out the name of the IP address 127.0.0.1. What is special about this IP address?
Exercise 2: Use ping to test host reachability
Are the following hosts reachable from your machine by using ping:
www.unsw.edu.au (http://www.unsw.edu.au)
(http://www.cse.unsw.edu.au) www.getfittest.com.au (http://www.getfittest.com.au)
www.mit.edu (http://www.mit.edu)
2021/6/8 Lab Exercise 1: Tools of the Trade | COMP3331 21T2 | WebCMS3
https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60274 3/5
www.intel.com.au (http://www.intel.com.au)
(http://www.intel.com.au) www.tpg.com.au (http://www.tpg.com.au)
(http://www.telstra.com.au) www.hola.hp (http://www.hola.hp)
(http://www.hola.hp) www.amazon.com (http://www.amazon.com)
(http://www.wikileaks.org) www.tsinghua.edu.cn (http://www.tsinghua.edu.cn)
(http://www.tsinghua.edu.cn) www.kremlin.ru (http://www.kremlin.ru)
8.8.8.8
If you observe that some hosts are not reachable, then can you explain why? Check if the addresses
unreachable by the ping command are reachable from the Web browser.
Exercise 3: Use traceroute to understand network topology
Note: Include all traceroute outputs in your report.
1. Run traceroute on your machine to www.columbia.edu (http://www.columbia.edu) . How many routers
are there between your workstation and www.columbia.edu (http://www.columbia.edu) ? How many
routers along the path are part of the UNSW network? Between which two routers do packets cross the
Pacific Ocean? Hint: compare the round trip times from your machine to the routers using ping.
2. Run traceroute from your machine to the following destinations: (i) www.ucla.edu (http://www.ucla.edu)
(ii) www.u-tokyo.ac.jp (http://www.u-tokyo.ac.jp) and (iii) www.lancaster.ac.uk
(http://www.lancaster.ac.uk) . At which router do the paths from your machine to these three destinations
diverge? Find out further details about this router. (HINT: You can find out more about a router by
running the Whois command: Whois router-IP-address). Is the number of hops on each path
proportional the physical distance? HINT: You can find out the geographical location of a server using
the following tool - http://www.yougetsignal.com/tools/network-location/
(http://www.yougetsignal.com/tools/network-location/)
3. Several servers distributed around the world provide a web interface from which you can perform a
traceroute to any other host in the Internet. Here are two examples: (i)
http://www.speedtest.com.sg/tr.php (http://www.speedtest.com.sg/tr.php) and (ii)
https://www.telstra.net/cgi-bin/trace (https://www.telstra.net/cgi-bin/trace) . Run traceroute from both
these servers towards your machine and in the reverse direction (i.e. From your machine to these
servers). You may also try other traceroute servers from the list at www.traceroute.org
(http://www.traceroute.org) . What are the IP addresses of the two servers that you have chosen. Does
the reverse path go through the same routers as the forward path? If you observe common routers
between the forward and the reverse path, do you also observe the same IP addresses? Why or why
not?
Exercise 4: Use ping to gain insights into network performance
Note: Include all graphs in your report. You need to run the scripts (runping.sh and plot.sh) when you are
physically using a lab machine or connected to a CSE server/lab machine using VLAB / VNC client. You need
to ensure gnuplot and ps2pdf are available on your system if you are planning to do this exercise on your own
machine.
We now use the ping utility to investigate network delay and its implications on network performance. In
particular, we will analyze the dependency of packet size and delay.
There is a shell script, runping.sh (https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60140) ,
provided that you can use instead of running many pings with different packet sizes by hand. After
downloading this script on your machine make sure you can execute it. If not, you will have to execute the
following command in the command line: chmod u+x runping.sh . To run the ping traces you may use the
runping.sh script as follows: ./runping.sh www.abc.net (http://www.abc.net/) (or whatever other destination you
want to ping). It will automatically run ping for different packet sizes and with 50 ping packets per size. Note,
since a ping is sent once per second, this script will take a few minutes to finish. Basically, this script only
executes the commands:
2021/6/8 Lab Exercise 1: Tools of the Trade | COMP3331 21T2 | WebCMS3
https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60274 4/5
$ ping -s 22 -c 50 -i 1 www.abc.net > www.abc.net-p50
...
$ ping -s 1472 -c 50 -i 1 www.abc.net > www.abc.net-p1500
and writes the output of the pings to the corresponding files.
Use this script for the following destinations:
(i) www.uq.edu.au (http://www.uq.edu.au/) (ii) www.upm.edu.my (http://www.upm.edu.my) (replacing
www.dlsu.edu.ph (http://www.dlsu.edu.ph/) as the hosting appears to have changed) and (iii) www.tu-berlin.de
(http://www.tu-berlin.de/)
In other words, execute the following commands
$ ./runping.sh www.uq.edu.au
$ ./runping.sh www.upm.edu.my
$ ./runping.sh www.tu-berlin.de
In case you notice one of the hosts above is not responsive, select the following alternate destinations: (i)
within Australia ( www.flinders.edu.au (http://www.flinders.edu.au/) , www.unsw.edu.au
(http://www.unsw.edu.au/) ) (ii) Asia ( www.smu.edu.sg (http://www.smu.edu.sg) , upd.edu.ph
(http://upd.edu.ph/) ) (iii) Europe ( www.aau.dk (http://www.aau.dk/) , www.uio.no (http://www.uio.no/) )
Note that all delay values reported are in milliseconds (ms) and reflect the round trip time (RTT)
between your host and the destinations.
When the runping.sh script is finished for all destinations, you can plot the results using another provided
script, plot.sh (https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60164) , as follows:
$ ./plot.sh www.uq.edu.au-p*
$ ./plot.sh www.upm.edu.my-p*
$ ./plot.sh www.tu-berlin.de-p*
If you cannot execute plot.sh, then fix the permissions by executing the following command in the command
line:
$ chmod u+x plot.sh
The script plot.sh will produce the following files: destination_delay.pdf, destination_scatter.pdf, and
destination_avg.txt for each of the destinations (e.g., for www.uq.edu.au (http://www.uq.edu.au/) we have
www.uq.edu.au_delay.pdf (http://www.cse.unsw.edu.au/~cs3331/www.uq.edu.au_delay.pdf) ,
www.uq.edu.au_scatter.pdf (http://www.cse.unsw.edu.au/~cs3331/www.uq.edu.au_scatter.pdf ) and
www.uq.edu.au_avg.txt (http://www.cse.unsw.edu.au/~cs3331/www.uq.edu.au_avg.txt ) ).
The graph destination_delay.pdf shows how delay varies over time (different colours correspond to different
packet sizes), and destination_scatter.pdf shows delay vs. packet size as a scatter plot. destination_avg.txt
contains the average (2nd column) and minimum (3rd column) delay values corresponding to each packet size
(1st column).
1. For each of these locations find the (approximate) physical distance from UNSW using Google Maps
and compute the shortest possible time T for a packet to reach that location from UNSW. You should
assume that the packet moves (i.e. propagates) at the speed of light, 3 x 10 8 m/s. Note that the
shortest possible time will simply be the distance divided by the propagation speed. Plot a graph where
the x-axis represents the distance to each city (i.e. Brisbane, Serdang and Berlin), and the y-axis
represents the ratio between the minimum delay (i.e. RTT) as measured by the ping program (select the
values for 50 byte packets) and the shortest possible time T to reach that city from UNSW. (Note that the
2021/6/8 Lab Exercise 1: Tools of the Trade | COMP3331 21T2 | WebCMS3
https://webcms3.cse.unsw.edu.au/COMP3331/21T2/resources/60274 5/5
Resource created 30 days ago (Sunday 09 May 2021, 09:15:04 PM), last modified 4 days ago (Friday 04 June 2021, 11:42:24
AM).
y-values are no smaller than 2 since it takes at least 2*T time for any packet to reach the destination
from UNSW and get back). Can you think of at least two reasons why the y-axis values that you plot are
greater than 2?
2. Is the delay to the destinations constant or does it vary over time? Explain why.
3. Explore where the website for www.epfl.ch (http://www.epfl.ch/) is hosted. Is it in Switzerland?
4. The measured delay (i.e., the delay you can see in the graphs) is composed of propagation delay,
transmission delay, processing delay and queuing delay. Which of these delays depend on the packet
size and which do not?

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: Fudaojun0228