COMP3331/9331 Practice Final Exam
1/37
Exam Information Cover Sheet
COMP3331/9331— Computer Networks and Applications
Term 2, 2021
Practice Final Examination
Instructions:
1. TIME ALLOWED: 2 hours and 10 minutes (Reading Time).
2. TOTAL MARKS AVAILABLE: 40 marks worth 40% of the total marks for the course. You must score at
least 16 marks on the exam to pass the course.
3.MARKS AVAILABLE FOR EACH QUESTION ARE SHOWN IN THE EXAM. YOU MUST ANSWER ALL
QUESTIONS. THERE ARE A TOTAL OF 29 QUESTIONS.
4. STUDENTS ARE ADVISED TO READ THE EXAMINATION QUESTION BEFORE ATTEMPTING TO
ANSWER THE QUESTION.
5. THIS EXAM CANNOT BE COPIED, FORWARDED, OR SHARED IN ANY WAY.
6. STUDENTS ARE REMINDED OF THE UNSW RULES REGARDING ACADEMIC INTEGRITY AND
PLAGIARISM.
7. YOUR WORK WILL BE SAVED PERIODICALLY THROUGHOUT THE EXAM AND WILL BE
AUTOMATICALLY SUBMITTED PROVIDED YOU ARE CONNECTED TO THE INTERNET.
https://student.unsw.edu.au/plagiarism
COMP3331/9331 Practice Final Exam
2/37
Suppose two hosts have a long-lived TCP session over a path with a 100 msec round-trip time
(RTT). Then, a link fails, causing the traffic to flow over a longer path with a 500 msec RTT. This
scenario is depicted in the figure below. The original path is the straight path at the bottom. The new
path is at the top.
Answer the following two questions.
COMP3331/9331 Practice Final Exam
3/37
1 TCP Path Change Q1
Suppose the router on the left recognises the failure immediately and starts forwarding data packets over the
new path, without losing any packets. (Assume also that the router on the right recognises the failure
immediately and starts directing ACKs over the new path, without losing any ACK packets.) Why might the
TCP sender retransmit some of the data packets anyway?
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
4/37
2 TCP Path Change Q2
Suppose instead that the routers do not switch to the new paths all that quickly, and the data packets (and ACK
packets) in flight are all lost. What new congestion window size does the TCP sender use? Explain your
answer.
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
5/37
3 TCP SYN
Why does a TCP sender use a very large retransmission timeout (e.g., several seconds) for the SYN segment?
Answer in 2 sentences at most.
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
6/37
4 TCP 3 Way Handshake
Why is it necessary to have a 3 way handshake for connection establishment in TCP? Why is a 2 way
handshake not sufficient?
Fill in your answer here
Maximum marks: 2
COMP3331/9331 Practice Final Exam
7/37
Assume that the SendBase for a TCP Reno sender is currently 4000. The TCP sender has sent four
TCP segments with sequence numbers 4000, 4500, 5500 and 7000. The sender then receives a
segment with an acknowledgement number 7500 and a receive window 6000. The congestion
window, CongWin, is set to 10000 bytes after this ACK is processed. Answer the first three questions
assuming that this ACK is processed and no further ACKs are received.
COMP3331/9331 Practice Final Exam
8/37
5 TCP Sequence Q1
What is the value of SendBase? Only enter the numeric value in the space provided: .
Maximum marks: 0.75
COMP3331/9331 Practice Final Exam
9/37
6 TCP Sequence Q2
How many bytes in total are sent in the four TCP segments? Only enter the numeric value in the space
provided: .
Maximum marks: 0.75
COMP3331/9331 Practice Final Exam
10/37
7 TCP Sequence Q3
What is the last byte (number) that the TCP sender can send with certainty that the receiver’s buffer will not
overflow? Assume that the sender always has data to send. Explain your answer in 1-2 sentence.
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
11/37
8 TCP Sequence Q4
Now assume that the sender receives three more TCP segments, such that all three segments have TCP
acknowledgement number 7500.
Answer the this question and the next question assuming that all three ACKs are processed and no further
ACKs are received.
What is the value of CongWin and why?
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
12/37
9 TCP Sequence Q5
What is the sequence number of the next segment that will be transmitted by the sender? Explain your answer
in 1 sentence.
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
13/37
A small university campus is assigned a large address block 12.1.0.0/17, but is only using a portion of
these addresses (in 12.1.1.0/24) to number its computers. The campus uses a single Internet Service
Provider (ISP) to reach the rest of the Internet. The picture below shows the forwarding tables on the
ISP’s router (on the left) and the campus edge router (on the right).
For example, the ISP forwards all packets with destination addresses in 12.1.0.0/17 to link #2 toward
the campus edge router. Both routers include a default forwarding entry (i.e., 0.0.0.0/0) that can match
any destination IP address.
Answer the following 4 questions.
COMP3331/9331 Practice Final Exam
14/37
10 IP Addressing Q1
How many IP addresses does the campus “own” in its 12.1.0.0/17 block? You can represent your answer as a
power of two.
Fill in your answer here
Maximum marks: 0.5
COMP3331/9331 Practice Final Exam
15/37
11 IP Addressing Q2
What are the smallest and largest IP addresses that the campus “owns”? Do these addresses have special
meaning and if so what do they signify?
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
16/37
12 IP Addressing Q3
Suppose the ISP router receives a packet from the Internet with destination IP address 12.1.20.1? What path
does this packet follow (indicate the path using link numbers from the above figure)? What is the ultimate
outcome for this packet?
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
17/37
13 IP Addressing Q4
Suppose the ISP router receives a packet from the Internet with destination IP address 12.1.1.1? What path
does this packet follow (indicate the path using link numbers from the figure above)?
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
18/37
14 NAT
When an IP datagram containing a transport segment is going from a private network onto the public Internet
through a Network Address Translation (NAT) router, which of the following network and transport layer header
fields might the router change? You can select multiple options.
Select one or more alternatives
Protocol field in IP header
Destination IP address
Source IP address
Transport checksum
Destination port number
IP checksum
Source port number
None of the provided choices
Maximum marks: 1
COMP3331/9331 Practice Final Exam
19/37
15 DV MCQ
Which of the following statements about distance vector routing are true? Multiple statements may be true.
Select one alternative:
The distance vector sent by each router is propagated to all other routers in the network.
None of the other choices are true.
Poison reverse may not always resolve the count to infinity problem.
Every router in the network knows the entire network topology.
A reduction in the cost of a link connected to a router will always trigger a distance vector update to be
sent from this router.
Maximum marks: 1
COMP3331/9331 Practice Final Exam
20/37
Consider the 8-node network shown in the figure below with link costs as shown. Note that each link
shown in this network is bidirectional and has the same cost in either direction.
Answer the following two questions.
COMP3331/9331 Practice Final Exam
21/37
16 Dijkstra
Execute Dijkstra’s algorithm at Node a to determine the shortest path from Node a to every other node in the
network. You will have to draw an appropriately sized table using the table option in the menu at the top of the
text area below (similar to the one shown in the lecture notes on Dijkstra’s algorithm) You are required to show
all steps.
Fill in your answer here
Words: 0
Maximum marks: 4
javascript:void(‘Paragraph%20Format’)
javascript:void(‘Bold’)
javascript:void(‘Italic’)
javascript:void(‘Underline’)
javascript:void(‘Subscript’)
javascript:void(‘Superscript’)
javascript:void(‘Remove%20Format’)
javascript:void(‘Copy’)
javascript:void(‘Paste’)
javascript:void(‘Undo’)
javascript:void(‘Redo’)
javascript:void(‘Temporary%20Backup%20Snapshots’)
javascript:void(‘Insert/Remove%20Numbered%20List’)
javascript:void(‘Insert/Remove%20Bulleted%20List’)
javascript:void(‘Insert%20Special%20Character’)
javascript:void(‘Table’)
javascript:void(‘Insert%20Drawing’)
javascript:void(‘Edit%20formula’)
javascript:void(‘Expand’)
COMP3331/9331 Practice Final Exam
22/37
17 Forwarding Table
Based on the execution of the Dijkstra’s algorithm in the above question, draw the forwarding table for node a,
which contains the outgoing link for reaching every other node in the network. A link between two nodes x and
y should be denoted as (x, y).
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
23/37
18 CRC Q1
Assume that the data bits D being transmitted over a link are 100010 and that CRC is being used to provide
error detection. Suppose that a generator, G = 111 is being used and known to both the sender and receiver.
1) What are the CRC bits (R) as computed (and included with the message) by the sender? You are not
required to show your calculations. Simply note down R in the space provided.
2) Continuing with the previous question. Assume that the sender transmits
headers. Assume that 2nd, 3rd and 4th bits of this sequence are flipped as the frame is transmitted through the
link. Will the receiver be able to detect the error?
Select an alternative
True
False
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
24/37
19 CRC Q2
Now assume that the data bits D are the same as the previous two questions (100010) but that a generator G =
1111 is used.
1) What will be the CRC bits (R) as computed (and included with the message) by the sender? You are not
required to show your calculations. Simply note down R in the space provided.
2) Continuing with the previous question. Assume that the sender transmits
headers. Assume that 2nd, 3rd and 4th bits of this sequence are flipped as the frame is transmitted through the
link. Will the receiver be able to detect the error?
Select an alternative
True
False
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
25/37
Consider the network shown in the figure below. You may assume that all switch tables are empty at
the start.
Answer the following three questions. To represent links you can use notations such as A-S1 (the link
connecting A to S1) and S1-S4 (the link connecting S1 to S4).
COMP3331/9331 Practice Final Exam
26/37
20 Switch Q1
Assume that host A sends a frame to Host F. Indicated all links in the network that this frame is transmitted on
and explain why.
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
27/37
21 Switch Q2
Assume that host F now sends a frame to Host A. Indicated all links in the network that this frame is transmitted
on and explain why.
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
28/37
22 ARP
Suppose Host C wants to send an IP datagram to Host F. Assume that Host C only knows the IP address of
Host F but does not know its MAC address. Describe how Host C proceeds to send the IP datagram (i.e.,
outline the sequence of events leading to transmission of this datagram).
Fill in your answer here
Maximum marks: 1.5
COMP3331/9331 Practice Final Exam
29/37
Consider the wireless network composed of four nodes in the figure below, which has a
linear topology deployed along a highway. The distance between neighbouring nodes is
equal. Assume all nodes are using 802.11 MAC with RTS/CTS enabled. The radio range for
each node is fixed, and this radio range is slightly longer than the inter-node distance, i.e., each node
can reach only its left and right neighbours. Assume that if there are two simultaneous transmissions
within the radio range of the receiver, both transmissions will be unsuccessful.
Answer the following three questions.
COMP3331/9331 Practice Final Exam
30/37
23 WiFi Q1
Assume that node A is currently sending a data frame (not an ACK, an RTS, or a CTS) to node B. Node C
wants to send a packet to node D. Assume that node C (and only C) ignores the 802.11 MAC and sends the
packet. Would C’s packet arrive successfully at D? Would A’s packet arrive successfully at B? Explain your
reasoning.
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
31/37
24 WiFi Q2
Consider the same situation as in the previous questions except that all nodes are using the 802.11 MAC. Will
C start transmission while A is sending the data packet? Why or why not? If not, how does C know that A is
transmitting a data frame?
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
32/37
25 WiFi Q3
Is there any way for C to know when A’s transmission will end? Explain.
Fill in your answer here
Maximum marks: 1
COMP3331/9331 Practice Final Exam
33/37
26 Keys
Suppose N people want to communicate with each of N – 1 other people using symmetric key encryption. All
communication between any two people, i and j, is visible to all other people in this group of N, and no other
person in this group should be able to decode their communication. How many keys are required in the system
as a whole?
Now suppose that public key encryption is used. How many keys are required in this case?
Provide a short explanation for your answers in the space below.
Fill in your answer here
Maximum marks: 2
COMP3331/9331 Practice Final Exam
34/37
27 CA
What is the role of a Certification Authority (CA) in Public Key Infrastructure (PKI)?
Select one alternative:
Guarantee that the public key of the registered user is authenticated by issuing a digital certificate
Maintain private keys of all authenticated users
CA’s are not used in PKI
Issues a session key to both end parties for communication
Maximum marks: 1
COMP3331/9331 Practice Final Exam
35/37
28 Email
SuperMail wants every email to be authenticated and protected from modification or tampering while it is transit
from the sender to the receiver. Suppose Alice is sending an email M to Bob. Assume that a SuperMail
employee proposes the following solution: Alice’s software should encrypt M using Bob’s public key. In other
words, Alice’s software should send E (M) to Bob. Can you comment on whether the employee’s solution
meets the requirement stated above. Justify your answer.
Fill in your answer here
KB+
Maximum marks: 1
COMP3331/9331 Practice Final Exam
36/37
29 Putting it together
You walk into a room, connect your laptop to an Ethernet outlet, and type in your web browser a URL of a web
page. List all the messages/packets that you expect your laptop to send or receive until you download the web
page. Assume that your laptop is configured with the IP address of a local DNS server, as well as the IP
address of a default gateway (a router through which traffic from your laptop will exit the local IP subnet).
Fill in your answer here
Words: 0
Maximum marks: 3
javascript:void(‘Paragraph%20Format’)
javascript:void(‘Bold’)
javascript:void(‘Italic’)
javascript:void(‘Underline’)
javascript:void(‘Subscript’)
javascript:void(‘Superscript’)
javascript:void(‘Remove%20Format’)
javascript:void(‘Copy’)
javascript:void(‘Paste’)
javascript:void(‘Undo’)
javascript:void(‘Redo’)
javascript:void(‘Temporary%20Backup%20Snapshots’)
javascript:void(‘Insert/Remove%20Numbered%20List’)
javascript:void(‘Insert/Remove%20Bulleted%20List’)
javascript:void(‘Insert%20Special%20Character’)
javascript:void(‘Table’)
javascript:void(‘Insert%20Drawing’)
javascript:void(‘Edit%20formula’)
javascript:void(‘Expand’)
COMP3331/9331 Practice Final Exam
37/37