0% found this document useful (0 votes)
50 views29 pages

24T3COMP3331 Sample Solution

The document outlines the mid-term exam instructions and sample solutions for the COMP3331/COMP9331 course on Computer Networks & Applications for Term 3, 2024. It includes various questions related to throughput, web page loading times, and statistical multiplexing scenarios. The exam consists of 17 questions worth a total of 20 marks, and emphasizes academic integrity and timely submission of answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views29 pages

24T3COMP3331 Sample Solution

The document outlines the mid-term exam instructions and sample solutions for the COMP3331/COMP9331 course on Computer Networks & Applications for Term 3, 2024. It includes various questions related to throughput, web page loading times, and statistical multiplexing scenarios. The exam consists of 17 questions worth a total of 20 marks, and emphasizes academic integrity and timely submission of answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

30/10/2024, 10:04 Mid-Term Exam of COMP3331/COMP9331 - Term 3 2024 - Computer Networks & Applications

COMP3331/COMP9331 – Computer Networks & Applications

Mid-Term Exam – Term 3 2024 Sample Solution

INSTRUCTIONS:

1. Time allowed: 1 hour and 15 minutes.

2. Total number of questions to be answered : 17

3. Total marks available: 20 marks, worth 20% of the total marks for the course.
4. Students are advised to read all of the examination questions before attempting to answer
the questions.
5. This exam cannot be copied, forwarded, or shared in any way.

7. Students are reminded of the UNSW rules regarding Academic Integrity and Plagiarism.

8. Your work will be saved periodically throughout the exam and will be automatically submitted
when the test ends provided you are connected to the internet.

9. You must upload all of your work within the exam time. There is no extra time to upload. No
late submissions will be accepted.

https://unsw.inspera.com/admin#author/test/272794284 1/15
30/10/2024, 17:49 Throughput 2024T3v1(1.5 marks)

Throughput 2024T3v1(1.5 marks)


Background image
Consider the home network shown in the figure above which is comprised of
three hosts. Suppose that the ADSL modem has a connection to the Internet
that supports a downstream tranmission rate of 15 Mbps and an upstream
tranmission rate of 8 Mbps . Suppose that the Ethernet network can support a
transmission rate of 1 Gbps (both upstream and downstream) and the WiFi
network can support a transmission rate of 54 Mbps (both upstream and
downstream). Assume that the rest of the Internet (not shown in the figure) has
ample capacity and can support any transmission rate (both upstream and
downstream). Hosts A and C are connected through Ethernet while Host B is
connected through WiFi.

Answer the following three questions (0.5 mark for each)

1) What is the maximum throughput that any host in this home network can
experience when downloading a large file from the Internet?
Select one alternative:

1 Gbps

8 Mbps

54 Mbps

15 Mbps

5 Mbps

2) What is the maximum throughput that any host in this home network can
experience when downloading a large file from any other host in the same
home network?
Select one alternative:

15 Mbps

8 Mbps

5 Mbps

54 Mbps

1 Gbps

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=285713931&selectedLanguageId=2#/section/1/question/285713931 1/2
30/10/2024, 17:49 Throughput 2024T3v1(1.5 marks)

3) If all hosts in the home network are simultaneously downloading large files
from the Internet and each host gets an equal share of the available bandwidth,
what is the maximum throughput that any host in the home network can
experience?

Select one alternative:

54 Mbps

8 Mbps

1 Gbps

15 Mbps

5 Mbps

Unanswered. 0 of 1.5 marks. Try again

 Feedback

1) The end-to-end path comprises of the rest of Internet, ADSL


downstream link, and Ethernet (for A and C) or WiFi network (for B).
Amongst these 3, the ADSL downstream link is the bottleneck link
(i.e. has lowest capacity) and thus limits the maximum throughput to
15Mbps.

2) Since A, B, and C are connected through both Ethernet (1Gbps)


and WiFi (54Mbps. The set the of download speeds experience
between hosts { [(A-C), (C-A) ]= 1 Gbps, [(A-B), (B-A)] = 54Mbps,
[(B-C),(C-B)] = 54Mbps}. Therefore, the maximum throughput any
host can experience is 1 Gbps.

3) This follows from the answer to the first question. The bottleneck
link (ADSL) has capacity of 15Mbps and when shared equally
amongst the 3 hosts, each would achieve a maximum throughput of
5 Mbps.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=285713931&selectedLanguageId=2#/section/1/question/285713931 2/2
30/10/2024, 17:49 Throughput 2024T3v2(1.5 marks)

Throughput 2024T3v2(1.5 marks)


Background image
Consider the home network shown in the figure above,which is comprised of
three hosts. Suppose that the ADSL modem has a connection to the Internet
that supports a downstream stranmission rate of 15 Mbps and an upstream
transmission rate and 8 Mbps. Suppose that the Ethernet network can support
a transmission rate of 1 Gbps (both upstream and downstream) and the WiFi
network can support a transmission rate of 54 Mbps (both upstream and
downstream). Assume that the rest of the Internet (not shown in the figure) has
ample capacity and can support any transmission rate (both upstream and
downstream). Hosts A and C are connected through Ethernet while Host B is
connected through WiFi.

Answer the following three questions (0.5 mark for each)

1) What is the maximum throughput that any host in this home network can
experience when downloading a large file from the Internet?
Select one alternative:

8 Mbps

5 Mbps

54 Mbps

15 Mbps

1 Gbps

2) What is the maximum throughput that Host B can experience when


downloading a large file from any other host in the same home network?
Select one alternative:

54 Mbps

15 Mbps

5 Mbps

8 Mbps

1 Gbps

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685413&selectedLanguageId=2#/section/1/question/288685413 1/2
30/10/2024, 17:49 Throughput 2024T3v2(1.5 marks)

3) If all the hosts in the home network are simulataneously downloading large
files from the Internet and each host gets an equal share of the available
bandwidth, what is the maximum throughput that any host in the home network
can experience?

Select one alternative:

5 Mbps

1 Gbps

15 Mbps

8 Mbps

54 Mbps

Unanswered. 0 of 1.5 marks. Try again

 Feedback

1) The end-to-end path comprises of the rest of Internet, ADSL


downstream link, and Ethernet (for A and C) or WiFi network (for B).
Amongst these 3, the ADSL downstream link is the bottleneck link
(i.e. has lowest capacity) and thus limits the maximum throughput to
15Mbps. 2) Since A and C are connected through Ethernet, but B is
WiFi which is the bottleneck link. Thus, the maximum throughput is
54 Mbps. 3) This follows from the answer to the first question. The
bottleneck link (ADSL) has capacity of 15Mbps and when shared
equally amongst the 3 hosts, each would achieve a maximum
throughput of 5 Mbps.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685413&selectedLanguageId=2#/section/1/question/288685413 2/2
30/10/2024, 17:51 WWW 2024T3 midterm

WWW 2024T3 midterm


A client requests a webpage (index.html) that includes ten referenced objects
(seperate to the index.html), all hosted on the same server.

Assume TCP is used with a 1.5 RTT connection handshake, and the client
combines the HTTP GET request with the final ACK in the TCP handshake.
Calculate the total time in terms of RTTs required to load all objects if the client
uses each of the following approaches.

Answer next three questions

https://unsw.inspera.com/player?mode=question&context=preview&contentItemId=272794278&selectedLanguageId=2#/section/1/question/285437868 1/1
30/10/2024, 17:52 WWW 2024T3 midterm

WWW 2024T3 midterm


How many RTTs the client will have to wait to see all objects on the page if it
uses non-persistent HTTP?
Select one alternative:

18

20

22

24

Unanswered. 0 of 1 marks. Try again

 Feedback

(1.5 for Handshake+ 0.5 receive 1st object ) + 10 * (1.5+0.5) = 22

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685441&selectedLanguageId=2#/section/1/question/288685441 1/1
30/10/2024, 17:52 WWW 2024T3 midterm

WWW 2024T3 midterm


How many RTTs the client will have to wait to see all objects on the page if it
uses persistent HTTP with pipelining?
Select one alternative:

Unanswered. 0 of 0.75 marks. Try again

 Feedback

1.5 for Handshake+ 0.5 receive 1st object + 1 for receive 10


referenced objects = 3 RTT

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685470&selectedLanguageId=2#/section/1/question/288685470 1/1
30/10/2024, 17:53 WWW 2024T3 midterm

WWW 2024T3 midterm


How many RTTs the client will have to wait to see all objects on the page if it
uses persistent HTTP without pipelining?
Select one alternative:
Select one alternative:

12

14

15

13

Unanswered. 0 of 0.75 marks. Try again

 Feedback

1.5 for Handshake+ 0.5 receive 1st object ) + 10 * 1 = 12

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685510&selectedLanguageId=2#/section/1/question/288685510 1/1
30/10/2024, 17:54 RTP 2024T3 midterm

RTP 2024T3 midterm


Two hosts located at opposite ends of a continent are communicating using a
window-based reliable transport protocol (such as TCP). The one-way
propagation delay between the hosts is 30 milliseconds. The hosts are
transmitting packets with a length of 1,200 bytes over a 500 Mbps
transmission link. Calculate the minimum window size required to achieve a
channel utilization greater than 95%.
Select one alternative:

1,000 packets

500 packets

3,000 packets

2,000 packets

Unanswered. 0 of 1 marks. Try again

 Feedback

RTT = 60 ms transmit time = (1200 * 8)/500*10^6 = 0.0192 ms 0.95 =


X*(0.0192)/(60+0.0192) X = 2970 packets to achieve 95% utilization
so any value larger than this is correct answer.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288687718&selectedLanguageId=2#/section/1/question/288687718 1/1
30/10/2024, 17:54 DNS 2024T3 midterm

DNS 2024T3 midterm


Your company recently switched to a new Internet Service Provider (ISP) for a
better deal, which required updating the IP addresses linked to its domain
name. However, users are experiencing delays in reaching the updated server
due to DNS caching at various levels of the internet.

Question:
Which DNS record's configuration would you adjust to minimise this delay?
Select one alternative:

Increase the TTL value for the NS (Name Server) record

Set a lower TTL (Time-to-Live) value for the A record

Use CNAME records to point to the updated IP address

Adjust the MX record’s priority to a higher value

Unanswered. 0 of 1 marks. Try again

 Feedback

Since the type A record needs to be refreshed in caches, lower TTL


value should allow to record to be updated faster in DNS caches.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685548&selectedLanguageId=2#/section/1/question/288685548 1/1
30/10/2024, 17:54 statistical multiplexing 2024T3 midterm

statistical multiplexing 2024T3 midterm


Assume that a number of users share a 20 Mbps link. Each user transmits
continuously at 2 Mbps when transmitting but only transmits 10% of the time.

Based on the information above, please provide answers to the following three
questions. Simply record the numerical responses in the designated spaces.
No explanations are necessary.

https://unsw.inspera.com/player?mode=question&context=preview&contentItemId=272794230&selectedLanguageId=2#/section/1/question/276752793 1/1
30/10/2024, 17:55 statistical multiplexing 2024T3 midterm

statistical multiplexing 2024T3 midterm


If the network has 20 users, what is the probability that more than five users
are transmitting simultaneously (to three decimal place)?

(0.011 - 0.012) .

Unanswered. 0 of 1.25 marks. Try again

 Feedback

The probability that more than five users are transmitting


simultaneously = 0.01125 p = 0.1 n = 20 x = 5

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685613&selectedLanguageId=2#/section/1/question/288685613 1/1
30/10/2024, 17:55 statistical multiplexing 2024T3 midterm

statistical multiplexing 2024T3 midterm


When packet-switching is used, if there are 30 users, what is the expected link
utilisation rate : (0.3) .

Unanswered. 0 of 1 marks. Try again

 Feedback

Each user transmits 10% of the time at 2 Mbps. Therefore, the


average transmission rate per user is: 2* 0.1 = 0.2 Mbps With 30
users, the total average transmission rate is: 30 * 0.2 = 6 Mbps The
link utilization rate is the total average transmission rate divided by
the link capacity: 6/20 = 0.3 30% is also taken as a valid answer.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685658&selectedLanguageId=2#/section/1/question/288685658 1/1
30/10/2024, 17:56 statistical multiplexing 2024T3 midterm

statistical multiplexing 2024T3 midterm


When circuit switching is used, how many users can be supported? Simply
enter the numeric value in the space provided. No explanation is required.
(10) .

Unanswered. 0 of 0.5 marks. Try again

 Feedback

This is the total bandwidth devided by the bandwidth required per


user. Since each user require dedicated 2Mbps regardless they are
active, 10 users can be supported.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685876&selectedLanguageId=2#/section/1/question/288685876 1/1
30/10/2024, 17:56 Queueing 2024T3 midterm

Queueing 2024T3 midterm


Four packets arrive simultaneously at a network switch, which is currently idle.
Each packet has a length of 500 bytes, and the switch forwards packets at a
rate of 2 Mbps.

What is the average queuing delay for the four packets? Please provide a
concise explanation of how you arrived at this result in two to three sentences.

Format 

 Σ 

Words: 0

Unanswered. Try again

 Feedback

500*8/(2*10^6)*(0+1+2+3) / 4 = average 3 ms

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685903&selectedLanguageId=2#/section/1/question/288685903 1/2
30/10/2024, 17:56 Queueing 2024T3 midterm

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685903&selectedLanguageId=2#/section/1/question/288685903 2/2
30/10/2024, 17:57 GoBackN 2024T3 midterm

GoBackN 2024T3 midterm


A Go-Back-N protocol uses a sequence number field of 12 bits. If the window
size is increased to 2,500, would the protocol still function correctly? If not,
what is the minimum number of bits required to support this new window size?
Justify your answer.

Fill in your answer here

Format 

 Σ 

Words: 0

Unanswered. Try again

 Feedback

2^12-1 = 4,095 (12 bits are supporting maximum window size) >
2,500 so protocol would still function properly.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685909&selectedLanguageId=2#/section/1/question/288685909 1/2
30/10/2024, 17:57 GoBackN 2024T3 midterm

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685909&selectedLanguageId=2#/section/1/question/288685909 2/2
30/10/2024, 17:57 SR 2024T3 midterm

SR 2024T3 midterm
In a Selective Repeat system, the sequence number field is 10 bits long. The
system uses a window size of 350 packets. Will the protocol function correctly?
If not, what is the maximum allowable window size? Justify your answer.

Fill in your answer here

Format 

 Σ 

Words: 0

Unanswered. Try again

 Feedback

2^10 = 1,024 windows size should be at most half of 1,024 which is


512 so window is <= 512 which means it will support without an
issue.

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=285619059&selectedLanguageId=2#/section/1/question/285619059 1/2
30/10/2024, 17:57 SR 2024T3 midterm

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=285619059&selectedLanguageId=2#/section/1/question/285619059 2/2
30/10/2024, 17:57 BT 2024T3 midterm

BT 2024T3 midterm
Doro joins a BitTorrent torrent to download a file and is connected to 4 peers –
Tarja, Randy, Corey, and Rob. The file Doro wishes to download is divided into
4 chunks. Each peer tracks its availability of chunks using a vector of 4 bits.
When the bit value is 1, the peer holds the chunk on the disk. When the bit
value is 0, the chunk is not on the peer’s disk. For example, (1, 0, 1, 0)
indicates chunks 1 and 3 are available at this particular peer.
The vectors of Tarja, Randy, Corey and Rob are shown below:
Tarja: (0, 1, 1, 1)
Randy: (1, 1, 0, 0)
Corey: (0, 1, 1, 1)
Rob: (0, 1, 1, 0)

Assume that Tarja, Randy, Corey and Rob are not interested in the file
anymore and stop downloading the remaining chunks but continue to
participate in the torrent and service requests for chunks.

What is the order in which Doro requests the chunks for downloading the file.
Select the appropriate options below.

Select one alternative:

Chunk 2, Chunk 3, Chunk 1, Chunk 4

Chunk 4, Chunk 3, Chunk 2, Chunk 1

Chunk 3, Chunk 1, Chunk 4, Chunk 2

Chunk 1, Chunk 4, Chunk 3, Chunk 2

Unanswered. 0 of 1 marks. Try again

 Feedback

Bittorrent uses rarest first method so Doro sould download the rarest
chuck first and then so on. So Chunk 1, Chunk 4, Chunk 3 and
Chunk 2

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685938&selectedLanguageId=2#/section/1/question/288685938 1/2
30/10/2024, 17:57 BT 2024T3 midterm

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685938&selectedLanguageId=2#/section/1/question/288685938 2/2
30/10/2024, 17:58 CDN & Cache 2024T3v1(2.5 marks)

CDN & Cache 2024T3v1(2.5 marks)


cache

Refer to the above diagram when answering the questions.

We assume that all connection setup packets HTTP request packets and HTTP
headers are negligible in size, and disregard the connection closure process.

Additionally, we assume that the cache initially contains no entries related to the
specified host.

A web browser sends the following HTTP request to the cache:

The HTTP response header received by the browser is:


Background image

Calculate the minimum time required for the object to appear in the web browser. (please
provide the exact value)

(203.616) ms

After an hour, same web browser attempts to access the same page and issues the same
GET request. Assuming no changes have been made to the index.html on the web server,
calculate the minimum time required for the object to appear in the web browser. (please
provide the exact value)

(2.016) ms

Unanswered. 0 of 2.5 marks. Try again

 Feedback

Q1) Browser to Cache TCP = 1 ms Browser to Cache Get Request = 0.5 ms


Cache to Server TCP = 100 ms Cache to Server Get Request = 50 ms 1st bit to
arrive to Cache = 50 ms Transmit index.html from Server to Cache =
(2000*8)/10^7*10^3 = 1.6 ms 1st bit to arrive to Browser = 0.5 ms Transmit
index.html from Cache to Browser = (2000*8)/10^9*10^3 = 0.016 ms Total Time
elapsed = 203.616 Alternative answers 203.6, 203.61,and 203.62 are given
maximum 0.5 marks Q2) Browser to Cache TCP = 1 ms Browser to Cache Get
Request = 1 ms Transmit index.html from Cache to Browser = (2000*8)/10^9 10^3
= 0.016 ms Total Time elapsed = 2.016

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685976&selectedLanguageId=2#/section/1/question/288685976 1/2
30/10/2024, 17:58 CDN & Cache 2024T3v1(2.5 marks)

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685976&selectedLanguageId=2#/section/1/question/288685976 2/2
30/10/2024, 17:58 TCP Seq 2024T3v1(1.5)

TCP Seq 2024T3v1(1.5)


connection_management

Consider the diagram above, which illustrates a TCP data transfer between Host A and
Host B using five segments. The TCP timeout is set to 200ms, and assume that TCP fast
retransmit is disabled.

Some of the sequence numbers and acknowledgment numbers are shown in the diagram.

Based on the information above, please provide answers to the questions below.

Simply record the numerical responses in the designated spaces. No explanations are
necessary

Note: We will not consider any error propagations in the computations. No partial marks
will be awarded for the computation of each numeric value.

A value is (1501)

B value is (500)

C value is (2001)

D value is (2001)

E value is (3001)

F value is (3501)

Unanswered. 0 of 1.5 marks. Try again

 Feedback

A = 1,001 + 500 = 1,501 B = 500 (since the ACK sent by Host B acknowledges
A’s sequence number plus the data received, i.e., 2,001 + 500) C = 2,001 (the
ACK sent by Host A shows 2,001, and Host B is not sending any additional data
to Host A) D = 2,001 (no data is sent by Host B to Host A, so the sequence
number remains the same) E = 3,001 (the 5th segment is sent to Host B before
the TCP timeout occurs, so no retransmission has happened yet) F = 3,501
(acknowledging segment 5, which accounts for the lost ACK during transmission.
The TCP timer expires once the ACK is received at Host A)

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685996&selectedLanguageId=2#/section/1/question/288685996 1/2
30/10/2024, 17:58 TCP Seq 2024T3v1(1.5)

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288685996&selectedLanguageId=2#/section/1/question/288685996 2/2
30/10/2024, 17:59 TCP Seqno 2024T3 midterm

TCP Seqno 2024T3 midterm


Consider the following exchange of TCP segments between two hosts, A and
B. Host A sends three data segments to Host B with the following sequence
numbers:

Segment 1: Seq = 100, Data = 400 bytes


Segment 2: Seq = 500, Data = 300 bytes
Segment 3: Seq = 800, Data = 500 bytes

Host B acknowledges each segment as it receives them, but the second


acknowledgment is lost. Assuming Host A uses a timeout of 200 ms and
retransmits upon timeout, what will be the next sequence number Host A sends
after receiving the third acknowledgment?

Select one alternative:

800

500

1,300

1,800

Unanswered. 0 of 1 marks. Try again

 Feedback

sequence of the ACK for 3rd segment = A's next sequence number
=1,300

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288686007&selectedLanguageId=2#/section/1/question/288686007 1/1
30/10/2024, 17:59 TCP Seq 2024T3 midterm

TCP Seq 2024T3 midterm


A TCP connection is initiated with an ISN of 500. The sender sends three
segments with the following byte counts:

1. 200 bytes
2. 300 bytes
3. 400 bytes

The receiver sends an ACK after receiving each segment. If the ACK for the
third segment has an acknowledgment number of 1,000, what is the sequence
number of the next segment sent by the sender?

Select one alternative:

1,400

1,200

1,000

900

Unanswered. 0 of 1 marks. Try again

 Feedback

ISN = 500 segment 1 seq = 500 segment 2 seq = 500+200 = 700


segment 3 seq = 700+300 = 1,000

https://unsw.inspera.com/player?mode=question&context=preview&contentRevisionId=288686033&selectedLanguageId=2#/section/1/question/288686033 1/1

You might also like