CS代写 COMP3331/9331 T2 Mid-term Front Page

09/07/2021 Sample Mid Term Exam
COMP3331/9331 T2 Mid-term Front Page
COMP3331/9331 — Computer Networks and Applications Term 2, 2022
Mid-term Examination

Copyright By PowCoder代写 加微信 powcoder

Instructions:
1. TIME ALLOWED: 1 hours and 10 minutes.
2. TOTAL MARKS AVAILABLE: 20 marks worth 20% of the total marks for the course.
3. ALL QUESTIONS MUST BE ANSWERED.
4. MARKS AVAILABLE FOR EACH QUESTION ARE SHOWN IN THE EXAM. THERE IS NO NEGATIVE MARKING, IN THAT THE MINIMUM MARK FOR EACH QUESTION IS ZERO.
5. THE EXAM IS OPEN BOOK, OPEN NOTES. USE OF CALCULATORS IS PERMITTED.
6. STUDENTS ARE ADVISED TO READ THE EXAMINATION QUESTION BEFORE ATTEMPTING TO ANSWER THE QUESTION.
7. THIS EXAM CANNOT BE COPIED, FORWARDED, OR SHARED IN ANY WAY.
8. STUDENTS ARE REMINDED OF THE UNSW RULES REGARDING ACADEMIC INTEGRITY
AND PLAGIARISM.
9. YOUR WORK WILL BE SAVED PERIODICALLY THROUGHOUT THE EXAM AND WILL BE AUTOMATICALLY SUBMITTED PROVIDED YOU ARE CONNECTED TO THE INTERNET.
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
We know smtp.gmail.com is the mail server of gmail.com and ns1.google.com and ns2.google.com are the authoritative DNS servers for google.com. The questions below are about the following DNS Resource Records (a – f) where the entry types are masked (XXX).
(a) (gmail.com, smtp.gmail.com, XXX, 2 days)
(b) (smtp.gmail.com, 108.177.125.10, XXX, 2 days) (c) (google.com, ns1.google.com, XXX, 2 days)
(d) (google.com, ns2.google.com, XXX, 2 days)
(e) (ns1.google.com, 216.239.32.10, XXX, 2 days) (f) (ns2.google.com, 216.239.34.1, XXX, 2 days)
Answer the 6 multiple-choice questions. You may select multiple choices for each answer. However, note that selecting additional choices beyond the correct answer(s) will be considered incorrect. Partial marks may be allocated as noted in the marking scheme. The lowest possible mark is 0.
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
1. Which of the provided Resource Records are Type A entries?
Select one or more alternatives:
None of the provided records (e)
Type A records provide a mapping from hostname to IP address. Thus the correct answer is (b), (e) and (f). 0.167 mark for each correct answer and -0.167 mark for each incorrect answer. 0 if “none of the provided records” is chosen. Minimum possible mark is 0.
Maximum marks: 0.5
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Which of the provided Resource Records are Type MX entries?
Select one or more alternatives:
None of the provided records
MX refers to the mail server record, thus the correct answer is (a). 0.5 mark for the correct answer and -0.1 for each incorrect answer. 0 if “none of the provided records” is chosen. Minimum possible mark is 0.
Maximum marks: 0.5
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Which of the provided Resource Records are Type NS entries?
Select one or more alternatives:
None of the provided records (a)
NS refers to a name server record which provides the name of the nameserver responsible for the hostname/domain.
Thus the correct answer is (c) and (d) , which are the primary and secondary nameserver for google.com. 0.25 for each correct answer and -0.125 answer for each incorrect answer. 0 if “none of the provided records” is chosen. Minimum possible mark is 0.
Maximum marks: 0.5
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Which of the provided Resource Records are type CNAME entries?
Select one or more alternatives:
None of the provided records (c)
(f) (d) (e)
CNAME refers to a canonical name record for the hostname. None of the provided records are of this type. 0.5 mark for the correct answer. -0.5 mark if any of the other answers is chosen. Minimum possible mark is 0.
Maximum marks: 0.5
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Which of the provided Resource Records are stored in the .com TLD servers?
Select one or more alternatives:
None of the provided records (a)
Information of the authoritative name servers of a hostname is stored in the TLD servers so that when a local DNS server queries for the mapping for the hostname, they can be directed to the authoritative name servers which would contain the actual answer (i.e. the mapping requested). Thus, the NS records for the Google name servers (primary and secondary) would be stored in the .com TLD server. In addition, the corresponding IP addresses of these name servers (i.e. the A records) would also be stored in the .com TLD server.
Thus, the correct answer is (c), (d), (e) and (f). 0.125 for each correct answer and -0.25 for each incorrect answer. 0 if “none of the provided records” is chosen. Minimum possible mark is 0.
https://unsw.inspera.com/admin#author/test/87304030 7/33
Maximum marks: 0.5

09/07/2021 Sample Mid Term Exam
Which of the provided Resource Records are stored at an authoritative name server?
Select one or more alternatives:
None of the provided records (b)
The MX record for the gmail mail server and the corresponding A record that holds the IP address for this server would be stored at the authoritative name servers (i.e. ns1.google.com and ns2.google.com). These are the “final” answers that are provided in response to a MX query for the gmail mail server.
Thus, the correct answer is (a) and (b). 0.25 for each correct answer and -0.125 mark for each incorrect answer. 0 if “none of the provided records” is chosen. Minimum possible mark is 0.
Maximum marks: 0.5
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Assume a webpage comprised of 10 objects which includes the index.html file, 8 embedded images and one embedded audio clip. The 10 objects are so small that: (i) their transmission time is negligible and (ii) each object can be completely transmitted in one TCP segment. Consider a client wishing to download the webpage.
You are asked to make the following assumptions:
the round trip time between the client and all servers is T
the time to set up and tear down a TCP connection is S and F, respectively. You must account for both these times in your computations. Note
that, S includes the 3-way handshake (SYN, SYN-ACK, ACK) and F includes the time for sending FINs and ACKs from both endpoints.
there are no packet losses.
the client knows the IP address of all servers (i.e. neglect DNS resolution delay).
neither the client nor any of the servers support parallel TCP connections.
Answer the following 5 questions. No explanations are required. Simply write the expression for each answer which should ONLY contain the
variables T, S and F (e.g., 20T+100S+50F) in the space provided.
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Assume that the client uses non-persistent HTTP for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?
Fill in your answer here
10S +10T + 10F
In non-persistent HTTP, every object is downloaded over a fresh TCP connection. Since parallel connections are not supported, this would mean the ten objects are fetched serially.
The time required to fetch one object = time to setup TCP connection + RTT for sending GET request and receiving response + time to tear down TCP connection = S + T + F.
Thus, the total time = 10S +10T + 10F.
Maximum marks: 0.6
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Assume that the client uses persistent HTTP without pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?
Fill in your answer here
S + 10T + F.
In this instance, all objects can be fetched over one single TCP connection but serially (one after the other).
Thus the total time = time to setup TCP connection + 10 x (RTT for sending GET request and receiving the object) + time to tear down TCP connection = S + 10T + F.
Maximum marks: 0.6
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Assume that the client uses persistent HTTP with pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?
Fill in your answer here
S + 2T + F
In this instance, since pipelining is used once the index page is fetched and the client knows of the 9 embedded objects, these 9 objects can be requested back-to-back (simultaneously) and the corresponding objects would also be received back-to-back.
Thus the total time = time to setup TCP connection + RTT for sending GET request for the index page and receiving that page + RTT for sending 9 GET requests for embedded objects and receiving them + time to tear down TCP connection = S + T + T + F = S + 2T + F.
Maximum marks: 0.6
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Now assume that all 10 objects are located on 10 different servers (one object on each server). The client can only have one active TCP connection at any given time. Assume that the round trip time between the client and each of the 10 servers is T. Neglect DNS queries. Assume that the client uses persistent HTTP with pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?
Fill in your answer here
10S + 10T + 10F
Now each object is fetched from a different server. Since parallel connections are not supported, this would mean these objects have to be fetched serially (one after the one).
The time to fetch one object from one server = time to setup TCP connection + RTT for sending GET request for the object and receiving that object + time to tear down TCP connection = S + T + F.
Thus the total time = 10 (S + T + F)
Maximum marks: 0.6
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Now assume that the index page and 7 embedded images are on one server, while the remaining image and audio clip are on another server. The client can only have one active TCP connection at any given time. Assume that the round trip time between the client and both servers is T. Neglect DNS queries. Assume that the client uses persistent HTTP with pipelining for downloading the web page. What is the time required to complete the transfer of the web page (including the time for setting up and tearing down each TCP connection involved)?
Fill in your answer here
2S + 3T + 2F
In this instance, all objects from each server can be fetched over a single TCP connection established with that server.
The client would first fetch the index page and would become aware of the embedded objects. The 7 objects hosted on this same server (as the index page) are then fetched in one go. Next, the client fetches the other two objects from the other server in one go.
Thus the total time = time to setup TCP connection with the first server + RTT for sending GET request for the index page and receiving that page + RTT for sending 7 GET requests for embedded objects and receiving them + time to tear down TCP connection + time to setup TCP connection with the second server + RTT for sending 2 2 GET requests for embedded objects and receiving them = S + T + T + F + S + T + F = 2S + 3T + 2F.
https://unsw.inspera.com/admin#author/test/87304030 14/33
Maximum marks: 0.6

09/07/2021 Sample Mid Term Exam
Suppose a number of users share a 4 Mbps link. Also, suppose that each user transmits continuously at 2 Mbps when transmitting, but each user transmits only 20% of the time.
Answer the 3 questions.
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Packet/Circuit Switching Q1
When circuit switching is used, how many users can be supported? No explanation is required. Simply enter the numeric value in the space provided: (2)
Maximum marks: 0.25
In circuit switching, the percentage of time a user is active is irrelevant. A circuit needs to be established for each active user. Since each user requires 2Mbps and the link capacity is 4Mbps, 2 users can be supported.
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Packet/Circuit Switching Q2
Now suppose packet switching is used. Why will there be essentially no queuing delay before the link if two or fewer users transmit at the same time? Why will there be queuing delay if three users transmit at the same time? Be brief (2 sentences at most for each question).
Fill in your answer here
Format   Σ
Since each user requires 2 Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 4 Mbps will be required. Since the available bandwidth of the shared link is 4 Mbps, there will be no queuing delay before the link. (0.25 marks)
Whereas, if three users transmit simultaneously, the bandwidth required will be 6 Mbps which is more than the available bandwidth of the shared link. In this case, there will be queuing delay before the link. (0. 5 marks)
Maximum marks: 0.75
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Packet/Circuit Switching Q3
Suppose with packet switching, there are three users. Find the probability that at any given time, all three users are transmitting simultaneously. No explanation is required.Simply enter the
numeric value in the space provided: (0.008)
Maximum marks: 0.5 The probability that all three users are transmitting simultaneously =(0.2)^3 = 0.008
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
BitTorrent Tit/ Answer
BitTorrent uses a “tit-for-tat” incentive mechanism for selecting peers to whom a particular peer would upload chunks. Consider a peer who has finished downloading the file but wishes to continue seeding the file to other peers (i.e. continue uploading chunks of that file) participating in the torrent. Will “tit-for-tat” still be useful for this peer? Explain why or why not in 2-3 sentences. Answers without explanations will not receive marks.
Fill in your answer here
Format   Σ
No. Tit-for-tat is not useful. This peer is no longer downloading any chunks of this file. So the peer will never be able to determine the top (four) peers that are providing her chunks at the best rate. Recall that “tit-for-tat” selects these top four peers to upload chunks.
NOT EXPECTED IN ANSWER. THIS IS JUST FYI: In this instance, BitTorrent selects the peers who have the best upload rate (in general). This ensures that chunks get uploaded faster, and they get replicated faster.
Maximum marks: 1
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
UDP Checksum
Assume that the UDP checksum is only computed over the data (i.e. ignore all other UDP headers and pseudo IP headers from the computation). Assume that the UDP segment format is (checksum, data). Assume that a UDP sender sends a segment (0010, 1110) and the UDP receiver receives (0011, 1110). Which of the following is true of the UDP receiver?
Select one alternative:
It thinks that the segment is corrupted and discards the segment.
It thinks only the checksum is corrupted and delivers the correct data to the application. It concludes that nothing is wrong with the segment.
It explodes.
Maximum marks: 1
Recall that the checksum algorithm can detect errors but not locate the precise bits that are in error.The receiver can thus detect an error, but it would not know which bit(s) is/are in error. Thus, it must discard the segment. The correct answer is thus (a).
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Which of the following is true about how TCP implements reliable data transfer? (Multiple choices may be correct. Selecting additional choices beyond those that is/are correct will be considered as incorrect)
Select one or more alternatives:
TCP uses multiple timers
TCP receiver always transmits acknowledgement immediately upon receiving a data packet
TCP may retransmit packets upon receiving duplicate acknowledgements TCP uses cumulative acknowledgements
TCP may retransmit packets upon timer timeout events
Maximum marks: 1
TCP uses a single timer for the oldest unacknowledged segment.
The receiver employs a delayed ACK mechanism as noted in the lectures
The sender retransmits a segment when it receives triple duplicate ACKs as per the fast retransmit mechanism
TCP uses cumulative acks
The expiration of a timer will result in the transmission of the oldest unacknowledged segment
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
GBN and SR
Two hosts A and B are using the go-back-N (GBN) protocol with a window size of 4. Host A sends host B four segments back to back with sequence numbers 15, 16, 17 and 18. These segments arrive at host B in the following order: 15, 18, 17, 16. When host B receives each of these segments, it sends an acknowledgment segment to host A. What are the acknowledgement numbers in the acknowledgement segments that host B sends to host A in the order in which host B sends them? You may assume that all previous segments (14, 13, ….) have been correctly received by host B in the expected order.
Repeat the above if the two hosts are using the selective-repeat (SR) protocol.
Note: You are not required to provide any explanation. Simply note down the sequence of ack numbers in the space provided below, first for GBN and then for SR.
Fill in your answer here
Format   Σ
GBN: 15, 15, 15, 16 SR: 15, 18, 17, 16
Maximum marks: 2
Go-Back-N (1 mark):
15, 15, 15, 16
The second and third packets arrive out of order. These are thus discarded. The acknowledgments for these packets will contain the last in-order received segment number, which is 15 (cumulative acks). The last received packet is the next expected packet (sequence number 16) and thus the acknowledgment will now contain the sequence number 16.
Selective Repeat (1 mark):
15, 18, 17, 16
In selective repeat, each packet is individually acknowledged and out of order packets are buffered, thus resulting in the above-noted pattern.
https://unsw.inspera.com/admin#author/test/87304030 22/33

09/07/2021 Sample Mid Term Exam
UDP and Applications
Which of the following statements is corrrect?
Select one alternative:
BitTorrent, DNS and First Person Shooter Games typically use UDP. DNS and First Person Shooter Games typically use UDP.
E-mail and DNS typically use UDP.
E-mail, DNS, BitTorrent and First Person Shooter Games use UDP. DNS and BitTorrent typically use UDP.
E-mail and BitTorrent use TCP.
Maximum marks: 0.75
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
TCP Sequence Number
Host A sends a 128-byte TCP segment carrying a sequence number of 100 to Host B. Host B receives it correctly and sends an ACK to Host A. What is the acknowledgement number in the ACK?
Select one alternative:
The segment contains bytes numbered from 100 to 227. The ACK number is always for the next expected sequence number which is 228.
Maximum marks: 0.75
https://unsw.inspera.com/admin#author/test/87304030

09/07/2021 Sample Mid Term Exam
Consider the network in the figu

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com