辅导案例-CS 132/EECS

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
1Midterm - CS 132/EECS 148
Computer Networks - Winter 2020
Instructor Georgios Bouloukakis
Full Name: ID:
Seat no.: Date: February 13th, 2020
• This is a closed book test. Keep your desk clear (no handouts, phones, notes, books).
• Indicate name and UCI ID number in ALL the solution sheets.
• You should write all your answer clearly on these pages. Make sure that your final answers
and reasons are easily recognizable and are on the provided lines/areas. You must show
work for each answer to receive full credit. If you need extra space, use the backs of
these pages for any scratch work (indicate on the main page if any/all of your answer is
on a back page). Try to solve each problem easily and directly.
• In fairness to all students, when time is called, you have to stop writing immediately.
• Read each question fully, before writing its answer. When answering, don’t restate the
problem; get right to the answer.
• Time allowed: 75 minutes.
Full Name:
PROBLEM 1 (18 POINTS)
In the following 4 questions, we are sending a 10 Mbit MP3 file from a source host to a
destination host. All links in the path between source and destination have a transmission rate
of 5 Mbps. Assume that the propagation speed is 2 * 108 meters/sec, and the distance between
source and destination is 5,000 km.
(1) Initially suppose there is only one link between source and destination. Also suppose that
the entire MP3 file is sent as one packet. The transmission delay is:
50 milliseconds
2 seconds
5 seconds
none of the above
Solution: The transmission delay is: dtr = LD =
10∗106
5∗106 = 2 sec.
(2) Referring to the above question, the end-to-end delay (transmission delay plus propagation
delay) is:
2.025 seconds
5.025 seconds
50 milliseconds
2 seconds
Solution: The propagation delay is: τ = d
s
= 5,000Km
2∗108 = 0.025 sec. The end-to-end delay is:
dtr + τ = 2 + 0.025 = 2.025 sec.
(3) Referring to the above question, how many bits will the source have transmitted when the
first bit arrives at the destination.
5,000,000 bits
15,000,000 bits
25,000 bits
125,000 bits
Solution: The first bit arrives after τ = 0.025 sec. During that time the source is sending at rate
5Mbps. Therefore, in 0.025 sec it sends 125,000 bits.
(4) Now suppose there are two links between source and destination, with one router connecting
the two links. Each link is 2,500 km long. Again suppose the MP3 file is sent as one packet.
Suppose there is no congestion, so that the packet is transmitted onto the second link as soon
as the router receives the entire packet. The end-to-end delay is:
4.025 seconds
10.025 seconds
100 milliseconds
4 seconds
Solution: The propagation over one of the links is: τ ′ = 0.0125 sec. The transmission delay is
the same dtr = 2 sec. The end-to-end-delay of the packet is now 2(dtr+τ

) = 2∗2.0125 = 4.025
sec.
2
Full Name:
PROBLEM 2 (12 POINTS)
(1) Cable Internet access is a shared broadcast medium.
True
False
(2) The Internet provides its applications two types of services, a TDM service and a FDM
service.
True
False
(3) Consider a queue preceding a transmission link of rate R. Suppose a packet arrives to the
queue periodically every 1/a seconds. Also suppose all packets are of length L. The queue will
increase without bound and the queueing delay will approach infinity if:
La/R < 1
La/R > 1
La/R ≤ 1
La/R ∼ 0
(4) Before sending a packet into a datagram network, the source must determine all of the
links that packet will traverse between source and destination.
True
False
(5) With SMTP, it is possible to send multiple mail messages over the same TCP connection.
True
False
(6) Suppose a DNS resource record has Type=MX. Then
Value is the hostname of the mail server that has the alias hostname Name
Value is the IP address of the mail server that has the alias hostname Name
Value is the hostname of the DNS server that is authoritative for Name
none of the above
(7) With non-persistent connections between browser and origin server, it is possible for a
single TCP segment to carry two distinct HTTP request messages.
True
False
(8) A browser will generate header lines as a function of
browser type and version
user configuration of browser
whether the browser has a cached version of the requested object
all of the above
3
Full Name:
(9) Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. Then Timeout
for the connection will necessarily be set to a value >= 1 sec.
True
False
(10) Suppose that host A wants to send data over TCP to host B, and host B wants to send
data to host A over TCP. Two separate TCP connections - one for each direction - are needed.
True
False
(11) When a TCP segment arrives to a host, the socket to which the segment is directed depends
on:
the destination port number
the source port number
the source IP address of the datagram/packet that encapsulated the segment
all of the above
(12) The stop-and-wait protocol is highly inefficient when
when there is a short distance between source and destination and the transmission rate is
low
when there is a short distance between source and destination and the transmission rate is
large
when there is a large distance between source and destination and the transmission
rate is high
4
Full Name:
PROBLEM 3 – RTT (20 POINTS)
1) HTTP Non-persistent Connection: strictly one web object per TCP connection;
HTTP Persistent connection: allowing multiple web objects per TCP connection.
2) HTTP Non-persistent connection:
The total transmission time for these 4 objects would be T1 + 2 ∗ T2 + T3. For each
object, the round-trip time would be the 3.5RTT (1 RTT for the initialization of TCP
connection; 1 RTT for sending the request and receiving the first bit of the response; and
1.5 RTT for closing the TCP connection). However, when the sender sends the ACK bit
for closing a connection, the SYN bit for requesting a new TCP connection is also sent at
the same time. In addition, we don’t have to consider the last TCP closure time because
we must stop counting the time once we receive all 4 objects. Therefore, the total time is
11RTT+T1+2T2+T3.
The detailed process can be illustrated by the figure below.
In case you have considered the last TCP closure time, the total time would be 11RTT +
T1+2T2+T3+1.5RTT = 12.5RTT+T1+2T2+T3 – we will accept this answer as well.
5
Full Name:
3) HTTP Persistent Connection:
As already pointed out, an HTTP persistent connection allows to send multiple objects
using the same TCP connection. In addition, because Pipelining is used as the default
mode in HTTP, the total time is 2RTT+T1+2T2+T3 (without the TCP closure time) or
3.5RTT+T1+2T2+T3 (with the TCP closure time).
The detailed process can be illustrated by the figure below.
6
Full Name:
PROBLEM 4 (20 POINTS)
The flowcharts together with their respective sequence numbers and protocol types are shown
below.
7
Full Name:
PROBLEM 5 (30 POINTS)
Number of packets N = L
D
= 10000
1000
= 10. Each packets has size P = D + H ' 1000 bits
(since the header size is negligible).
(a) Transmission of a single packet at source A or at the router: dtr = PW =
1000bits
1.106bps
=
10−3sec = 1ms.
(b) Please see the corresponding figure. For one packet to be received at the destination, it
takes time: 2τ+2dtr = 12ms. For one packet to make it to the destination and for the ACK to be
received back at the source it takes time: 2τ+2dtr+2τ = 4τ+2dtr = 4∗5ms+2∗1ms = 22ms.
We are now ready to answer the questions.
Midterm-16 question1 part(b)
R
Source A Destination B
A Router 1 B
*me
*me
L
transmission = P/W
Propagation Delay dprop

Packet1


Packet1
ACK 1

τ
Packet10
Packet10
ACK 1
0
*me
T1:message received
First, the message delay requires all first N − 1 packets to be received and acknowledged,
and the 10th packet to be received:
Message delay = (N − 1) ∗ (4τ +2dtr) + 2τ +2dtr = 38τ +20dtr = 190ms+20ms = 210ms
Second, the throughput calculation can be made for each packet or for all 10 packets in a
message. For example, it takes time L
D
(4τ + 2dtr) to receive and acknowledge all N packets.
During this time, only the transmission of the message (L bits in total) is useful. Therefore:
Throughput =
L
L
D
∗ (4τ + 2dtr)
=
D
4τ + 2dtr
=
1000
22ms
= 45.454kbps
(c) See figure for the messages exchanged from the time that the first packet starts being
transmitted at A until it is correctly received by B. The total time (not required in the answer)
is: Timout+ 2dtr + 2τ = 42ms. Note that timer starts at the beginning of transmission.
8
Full Name:
(d) The timeout value should be at least as large as the time from starting transmitting a packet
until the ACK is received; otherwise the timeout will expire prematurely before the ACK can
reach the source.: T ≥ 4τ + 2dtr = 22ms
Midterm 16, Question 1, Part (c)
R
Source A Destination B
A Router 1 B
*me
*me
L
Dtr = (P)/W
Propagation Delay dprop

Packet1


Packet1
ACK 1

τ
*me
Packet1
9
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468