University of Cape Town
Department of Computer Science
Computer Science CSC3002F
Examination
Paper 1: Networks
June 2023
Read through the entire examination paper before you start writing. The relative importance
of a question is indicated by the marks allocated to it. Please write legibly.
This paper consists of two (2) sections:
Section 1: Networks 1 — All questions are compulsory.
Section 2: Networks 2 — All questions are compulsory.
Total Marks: 50
Approximate marks per question are shown in brackets.
Section 1: 25
Section 2: 25
Time: 90 minutes +
10 minutes reading
The use of calculators is permitted.
Please write your answers in two (2) separate books. Use one book for each of Networks 1
and Networks 2. On the cover of each book, write the name of the topic: Networks 1 or
Networks 2.
Your attention is drawn to the instructions on your answer book on the front and the back. In
particular, “EVERY CANDIDATE MUST enter the book number and the number of each
question answered (in the order in which it has been answered)” on the table provided on
the front cover of the first book.
Please do this for the front cover of the different books used for each section.
This is needed so that we can allocate marks and not miss questions.
A list of sub-questions is not required.
Section 1.
Networks 1
Question 1.
Multiple Choice
[25 Marks]
[5 Marks]
a) Which layer has the primary responsibility for communications between one device and
the devices directly connected to it?
A. Network
B. Physical
C. Transport
D. Link
E. Application
b) As a message proceeds down the protocol stack, the destination port number is added at
which layer?
A. Application Layer
B. Transport Layer
C. Network Layer
D. Data Link Layer
E. None of the above
c) In the DNS structure, what servers are responsible for the .za domain?
A. Authoritative
B. Top level domain
C. Root
D. Default
E. None of the above
d) Which of the following applications will run effectively on UDP?
A. Email
B. File transfer
C. Web
D. Multimedia streaming
E. All of the above
e) In a client/server connection using HTTP over TCP, if multiple objects are sent over the
same TCP connection, then the connection is classified as:
A. Stable
B. Stateless
C. Persistent
D. Non-persistent
E. Reliable
Question 2.
[10 Marks]
a) Compare Flow Control and Congestion Control in at most three sentences.
[2]
b) Consider a scenario in which Host A wants to simultaneously send packets to Hosts B
and C. A is connected to B and C via a broadcast channel, whereby a packet sent by A
is carried by the channel to both B and C. Suppose that the broadcast channel connecting
A, B, and C can independently lose and corrupt packets (and so, for example, a packet
sent from A might be correctly received by B, but not by C). Design a stop-and-waitlike error-control protocol for reliably transferring packets from A to B and C, such that
A will not get new data from the upper layer until it knows that both B and C have
correctly received the current packet. Give FSM descriptions of A and C. (The FSM for
[8]
B is essentially the same as for C.)
Question 3.
[10 Marks]
a) Explain transport layer demultiplexing in the context of the following: Host C has a
TCP socket with port number 6789 and both Host A and Host B send a TCP segment to
Host C with destination port number 6789.
b) What does the statement ‘TCP is a reliable byte-oriented protocol’ mean?
[2]
[2]
c) Use a clearly labelled sequence diagram to illustrate the TCP 3-way handshake. Assume
the client and server initial sequence numbers are 100 and 200, respectively.
[4]
d) Suppose Host A sends 3 TCP segments back-to-back to Host B over a TCP connection,
with the sequence numbers 90, 110, 120, respectively. Suppose that the second segment
is lost but the first and third segments arrive at B. What is the acknowledgement number
that Host B sends to Host A? Justify your answer.
[2]
Section 2.
Networks 2
Question 4.
[25 Marks]
[9 Marks]
a) Consider the network with 5 routers as depicted in the figure for Question 4a. The
routers run a distance vector algorithm, for which the Bellman-Ford equation is used:
dx(y) = minv{c(x,v) + dv(y)}
Where, dx(y) is the cost of the least-cost path from node x to y, and minv is taken over
all x’s neighbours, and dv(y) is the cost from v to y. As is usual, things change in a
network from time to time. At which point in time, or possibly caused by what, will R1
recompute its forwarding table and send packets straight to R4, if it does not do so
already? Explain your answer.
[4]
Network topology for Question 4a.
b) Is it ever possible that the same router, i.e., the same physical device, runs more than
one routing protocol at the same time? If so, which protocols are permitted to run
simultaneously and when? If not, why not?
[3]
c) Consider the router depicted in the figure labelled Question 4c. Demonstrate and
explain the minimum number of time slots required to move all queued packets from
their respective input ports on the left to their designated output port on the right. The
red/dashed line (with dotted content) packets must go to the top-port, the blue/solid line
packets need to go to the middle port, and the brown/double-lined packet must go to the
bottom port.
[2]
Internals of the router for Question 4c.
Question 5.
[11 Marks]
a) The Address Resolution Protocol resolves addresses. What is its task and why do we need
[2]
such a protocol?
b) Consider the network configuration in the Figure for Question 5b.
i.
Does subnet A need a DHCP server? Explain why.
ii.
Host A is trying to send a message to Host B. Describe the sequence of what
[1]
happens at R2 with respect to ARP.
[3]
Figure for Question 5b.
c) Switch S1 has N computers connected to it via Ethernet. Host A tries to set up a TCP
connection with Host B. Both hosts are directly connected to S1 and they are the only ones
starting to communicate on that LAN. Host A knows B’s IP address, and the ARP tables
have all the necessary information still (from before the power glitch that caused S1 to
reset). Under the assumption that there is no packet loss or packet errors, how many frames
will be sent to start setting up that connection? Explain your answer.
[4]
d) What is the main benefit of a VLAN?
Question 6.
[1]
[5 Marks]
a) Wired versus wireless communication affects the link layer. Consequently, there are two
CSMA flavours that are popular. A key difference is how they deal with collisions. What is
the difference, and why is there that difference?
[3]
b) The concept of mobility in computer networks may affect the workings in the network layer.
For a basic setting where correspondent C wants to communicate with mobile host MH
who’s visiting another network, name and describe the procedure of one of the possible
routing options. You may use the diagram provided below for this question.
[2]
Sample figure for Question 6b.
***END***