Midterm F2021 Solution
Midterm F2021 Solution
COMPUTER NETWORKS
MIDTERM EXAM
Professor Carey Williamson
Department of Computer Science
University of Calgary
October 27, 2021
This is a CLOSED BOOK exam. Textbooks, notes, laptops, personal digital assistants,
tablets, and cell phones are NOT allowed. However, calculators are permitted.
It is a 45 minute exam, with a total of 50 marks. There are 16 questions, and 8 pages
(including this cover page). Please read each question carefully, and write your answers
legibly in the space provided. You may do the questions in any order you wish, but please
USE YOUR TIME WISELY.
When you are finished, please hand in your exam paper and sign out. Good luck!
Student Name:
Score: / 50 = %
Student ID:
1
True or False
Circle either True or False for each of the following 4 questions, for a total of 4 marks.
True
True
1 4. On DSL (Digital Subscriber Line), the upstream and downstream rates differ.
True
Multiple Choice
Choose the best answer for each of the following 6 questions, for a total of 6 marks.
1 5. The format of the messages exchanged between entities on a network are defined by:
(c) a protocol
(d) sockets
1 6. Receiving a transport-layer segment from the network layer, extracting the payload data,
and delivering the data to the correct socket is known as:
(a) multiplexing
(b) demultiplexing
2
1 7. For Web sites that use cookies, state information about users is provided in:
1 8. Which of the following is NOT used in the current email system on the Internet?
(c) SMTP
(d) TLS/SSL
1 10. Which of the following are used in TCP’s congestion control algorithm?
3
Internet Protocol Stack
7 11. Use your knowledge of the Internet protocol stack to answer the following questions.
(a) (1 mark) What is the layering principle?
(b) (6 marks) Describe the Internet protocol stack, including the name of each layer, the
key function of each layer, and the data unit handled by each layer. Include a diagram
if you wish.
4
Networking Delays
5 13. During his recent commercial space flight on the Blue Origin shuttle, William Shatner
(also known as Captain Kirk from the Star Trek series) used his smartphone to take a photo
of the planet Earth while 100 km above it. The photo was 8 MB in size. Suppose that
he wants to upload this photo to his Facebook page, and is trying to decide whether to do
it immediately during his shuttle flight, or after he lands back on Earth 10 minutes later.
(Note: 1 Kbps = 103 bits per second, 1 Mbps = 106 bps, 1 MB = 220 Bytes, and 1 Byte =
8 bits).
(a) (2 marks) Assuming that his cellular provider offers signal coverage that reaches the
shuttle, with a data rate of 100 Kbps (and reasonable roaming charges), approximately
how long will it take to upload the photo while still on the shuttle? Show your work.
67,108,864 bits
= --------------- = 671 sec
100,000 bits/sec
(b) (2 marks) Assuming that his cellular provider offers signal coverage at the shuttle
landing area, with a data rate of 1 Mbps, approximately how long will it take to
upload the photo immediately after landing? Show your work.
(c) (1 mark) Considering that it will take 10 minutes before the shuttle lands, which of
the foregoing two approaches is faster, and by how much?
5
Networking Concepts and Definitions
9 14. For each of the following pairs of technical terms, define each term, and clarify the key
difference(s) between the two terms. Be clear and concise. If in doubt about your definition,
feel free to supplement with a relevant example.
Transaction-oriented: Session-oriented:
- a type of protocol that has - a type of protocol that has
minimal state information involved a lot of state information
- also known as request-response - also known as conversation
or connectionless protocol oriented or connection-oriented
(e.g., DNS, HTTP/1.0, UDP) (e.g., SMTP, FTP, TCP)
6
Reliable Data Transfer (RDT)
8 15. Briefly explain the role of each of the following mechanisms in an RDT protocol at the
transport layer. Make sure to indicate how each one works, and why it is needed.
7
Transport-Layer Protocols
7 16. Use your knowledge of TCP and UDP to answer the following questions.
(a) (3 marks) List 3 examples of features provided by TCP that are not provided by UDP.
(b) (4 marks) For each of the following network applications (1 mark each), indicate
whether TCP or UDP would best fit the service requirements of the application,
and briefly explain why. State any assumptions that you make for each application.
See RFC 958 for the original Network Time Protocol (NTP).