首页 > > 详细

辅导Computer Networks、Python编程设计调试、Python语言讲解讲解R语言编程|讲解SPSS

Computer Networks
Homework 1
Graded out of 36 points
In this homework, we will analyze the relationship between traffic load, delay, throughput, and
packet loss. We will utilize mininet, a network emulation tool to create a network topology and
iperf to generate traffic on that network topology.
1. Network topology
mininet will emulate the following network topology:
The hosts h1 through h6 are connected to the packet switches s1 and s2 as shown. All
communications links have a transmission rate of 1 Gbps, except for the s1-s2 link., which has a
rate to 0.5 Gbps.
2. Traffic Scenarios
You will use a tool called “iperf” to generate traffic flows. Each iperf flow has a client (sender of
the traffic) and a server (recipient of the traffic). Note that “client” and “server” in the iperf
terminology are distinct from the client and server in a client-server application architecture, as
learned in class. You will generate two concurrent flows:
Flow F1: Client is h1, server is h2
Flow F3: Client is h3, server is h4
The traffic intensity (called “bandwidth” in iperf) of each flow is a settable parameter in iperf,
expressed in Mbps. The traffic intensity is defined as the rate at which the client is sending data,
which is not necessarily the same as the rate at which the server is receiving data. You will run
performance tests for various traffic intensity values and s1’s buffer size values.
3. What to measure
The flows F1 and F3 share the same buffer at s1, and that buffer may be congested if the
combined incoming traffic intensity of F1 and F3 exceeds the rate of link s1-s2. We want to
measure the queuing delay at that buffer, and the percentage of packets lost as a result of that
buffer being full.
To perform the measurements, we will use “Ping” between h5 and h6. Ping is a networking
utility used to test the reachability of a host on an Internet Protocol (IP) network. The Ping
protocol allows a client machine to send a packet of data to a remote server machine, and have
the remote server return the data back to the client unchanged (an action referred to as echoing).
Among other uses, the Ping protocol allows a client to determine round-trip times (RTT) to the
server. The Ping client also measures packet losses. A packet is considered lost if no echo is
received within a certain time. Ping’s contribution to the traffic load is negligible. h5 and h6 will
be the Ping client and Ping server respectively. Note that “client” and “server” in the Ping
terminology are distinct from the client and server in a client-server application architecture, as
learned in class.
Another metric is the throughput of F1 and F3. iperf will generate reports on the throughput
(referred to as “bandwidth” in the report) seen at the h2 and h4 servers (how many bits reached
the server per second).
4. Steps
Intall and set up mininet, puTTY (refer to “mininet-info” posted under “General info and tools”
for details).
If you are not familiar with mininet, you may want to try some examples in the mininet
walkthrough: http://mininet.org/walkthrough/, but this is not required
Start the VM Virtual Box VM and login to mininet. It is recommended to ssh into mininet.
User name is mininet, password is mininet
Copy the provided Python script “topo1.py” into your mininet VM. To do that, first copy the files
into your local machine, then transfer from your local machine to the mininet VM, by following
the instructions in “mininet-info”.
Once logged in to your mininet VM, follow the step by step instructions in “mininet-info” to install
the “progress” module into the mininet VM, then run the script by typing “sudo –E python
topo1.py”. The “progress” module will allow the script to display a progress bar when it is
running. It is not critical to have the “progress” module, you can skip installing it if you have
trouble. Without the progress bar, you just need to patiently wait for the script to complete.
The script will generate the network topology and automatically run the performance tests for
configuration x, for x = 0 to 5.
Each performance test does the following (the size of s1’s buffer is a parameter set to 500, 500,
500, 5000, 5000 packets for x = 0, 1, 2, 3, 4, 5 respectively)
• Setup h2 as an iperf server. h2 is now ready to receive iperf traffic from a client
• Setup h4 as an iperf server. h4 is now ready to receive iperf traffic from a client
• Start the iperf traffic for flow F1. The traffic is sent by client h1 towards server h2,
for a duration of 60 seconds. The traffic intensity is a parameter, set to 0 Mbps,
100 Mbps, 200 Mbps, 300 Mbps, 200 Mbps and 300 Mbps for x =0, 1, 2, 3, 4, 5
respectively. The output is redirected to the file i1_x.out
• Start the iperf traffic for flow F3. The traffic is sent by client h3 towards server h4,
for a duration of 60 seconds. The traffic intensity is a parameter, set to 0 Mbps,
100 Mbps, 200 Mbps, 300 Mbps, 200 Mbps and 300 Mbps for x =0, 1, 2, 3, 4, 5
respectively. The output is redirected to the file i3_x.out
• Launch ping from h5 to h6, for a count of 650 pings, spaced apart by 0.1 seconds
When the script execution is completed, you will get the $ prompt.
Now open the output files i1_x.out, i3_x.out, p_x.out, for x = 0 to 5, by typing cat
(Alternatively, you can transfer the output files to your local machine, following the steps
described in “mininet-info”, and read the files on your local machine).
In the “i1_x.out” file you will find a Server Report which contains a “Bandwidth” value. That is the
throughput observed at h2. Similarly in the “i3_x.out” file, there is the throughput observed at h4.
In the p_x.out file, you will find the ping statistics: rtt min, rtt avg, rtt max, % of packets lost. rtt is
not the queuing delay, but it is a related measure which is good enough for the purpose of
analyzing the delay trends.
5. What to turn in
You should turn in a Word document or similar that contains table 1 below. Fill in the yellow
cells with your results, and answer the following questions for the various cases (6 points each):
Q1. From what you learned in the lectures, do you expect a relationship between the ping loss
and the traffic intensity for a given buffer capacity (for example, decrease or increase with
traffic intensity)? Answer yes or no, and justify your answer. Now analyze the reported data for
the various configurations. Does the data match the relationship you expected? Same question
for the relationship between the ping avg RTT and the traffic intensity.
Q2. From what you learned in the lectures, do you expect a relationship between the ping loss
and the buffer capacity (for example, decrease or increase with buffer capacity)? Answer yes or
no, and justify your answer. Now analyze the reported data for the various configurations. Does
the data match the relationship you expected? Same question for the relationship between the
ping avg RTT and the buffer capacity.
Q3. Is the observed throughput at the server h2 the same as the F1 traffic intensity? If the
answer is no, explain why.
Q4. Is the observed throughput at the server h4 the same as the F3 traffic intensity? If the
answer is no, explain why.
Q5. Is there a relationship between the RTT/loss % and the throughputs observed at the
servers? If so, what is that relationship? Can you explain?
Q6. Regarding the individual ping RTT values, do you see any significant differences between
the first pings and the last pings within the same ping session? If your answer is yes, can you
explain why?
You should also turn in the *.out files generated by the script.
Note: The expected ping RTT values should not exceed a few hundreds of msec in the worst
case. If you obtain numbers which seem out of whack, please rerun the mininet simulation.
Mininet sometimes gives incorrect results. If you still see numbers which seem out of whack
after a few reruns, please contact the TA for help.
6. Resources
If you are interested to learn more about ping and iperf, here are some links:
a. ping
https://en.wikipedia.org/wiki/Ping_(networking_utility)
b. iperf
https://www.es.net/assets/Uploads/201007-JTIperf.pdf
https://en.wikipedia.org/wiki/Iperf

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!