CS代考 COMP3331/9331 Practice Final Exam – cscodehelp代写

COMP3331/9331 Practice Final Exam
COMP3331/9331— Computer Networks and Applications Term 3, 2021
Practice Final Examination
Instructions:
1. TIME ALLOWED: 2 hours, plus 15 minutes.
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 28 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.

COMP3331/9331 Practice Final Exam
Suppose two hosts have a long-lived TCP Reno 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
1 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
TCP bases its retransmission timeout (RTO) on an estimate of the round-trip time between the sending and receiving hosts. In this example, the RTT is 100 msec before the failure. As this connection has been active for some time, the sender’s RTT estimate should pretty accurate and close to 100 msec. The DevRTT should be a very low value (close to 0) The RTO will thus be very similar to the RTT estimate. When the failure occurs, the increase in the actual round-trip time implies that the ACK packets will not arrive before the RTO expires. This causes the sender to presume the data packets have been lost, leading to retransmissions, despite the fact that no packets were actually lost.
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
2 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
The TCP sender’s adjustment of the congestion window depends on how the packet losses were detected. If a triple-duplicate-ACK occurs, the congestion window would be divided in half. However, in this case, all packets in flight are lost, so no ACKs are received, forcing the sender to detect the loss via a timeout. Timeout-based loss detection leads the sender to set the congestion window to 1 (i.e., 1 MSS).
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
3 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
The TCP sender does not have any initial estimate of the round-trip time (RTT). Starting with a conservative retransmission timeout (RTO) of several seconds prevents the excessive retransmissions that would result from using an RTO that is smaller than the actual RTT.

COMP3331/9331 Practice Final Exam
4 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
TCP is a bi-directional communication protocol, which means either end ought to be able to send data reliably. Both parties need to establish an Initial Sequence Number (ISN), and both parties need to acknowledge the other’s ISN. Thus a two-way handshake is required in each direction as follows:
1) Alice picks an ISN and SYNchronises it with Bob. 2) CKnowledges the ISN.
3) Bob picks an ISN and SYNchronises it with Alice. 4) CKnowledges the ISN.
Steps 2 and 3 can be combined in a SYN-ACK segment, which reduces this to a 3 way handshake. A two way handshake would only allow one party to establish an ISN, and the other party to acknowledge it. Which means only one party can send data.
Maximum marks: 2

COMP3331/9331 Practice Final Exam
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
The sender has received an ACK for 7500, so the sender would have moved the base of the window up to that point. Thus SendBase = 7500.
What is the value of SendBase? Only enter the numeric value in the space provided: (7500). Maximum marks: 0.75

COMP3331/9331 Practice Final Exam
How many bytes in total are sent in the four TCP segments? Only enter the numeric value in the space provided: (3500).
Maximum marks: 0.75
The first segment carries 500 bytes, the second segment carries 1000 bytes, the third one carries 1500 bytes and the last segment carries 500 bytes. Thus, the total data in the four segments is 3500 bytes.

COMP3331/9331 Practice Final Exam
7 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
The window size is set to the minimum of the congestion window and receive window. Hence, the window size will now be set to 6000 bytes. Since current SendBase is 7500, this implies that the last byte that the sender can send with certainty is 13499.

COMP3331/9331 Practice Final Exam
8 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
Since the sender receives three duplicate ACKs, the CongWin is reduced to half the current value (current value = 10000 bytes), which is 5000 bytes.

COMP3331/9331 Practice Final Exam
9 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
Since the sender received three duplicate ACKs for 7500, it will now retransmit the segment with sequence number 7500.

COMP3331/9331 Practice Final Exam
10 Consider an IP datagram of size 4520 bytes (including the IP header) is to be forward by a router on an outgoing link which has an MTU of 2500 bytes. Assume that the second fragment of
the original datagram (created by the first router) arrives at a second router and is to be forwarded on an outgoing link which has an MTU of 1500 bytes. What are the MF flag and offset values in the IP headers of the resulting fragments and the total size of these fragments as created by the second router.
Fill in your answer here
Maximum marks: 1
The first router will create 2 fragments. The first fragment will have MF = 1, Offset = 0 and will be of size 2500 bytes (2480 bytes in payload). The second fragment will have MF = 0, Offset = 310 (2480/8 = 310) and will be of size 2040 bytes (2020 bytes in payload).
The second fragment will be split into two fragments at the second router. The first of these fragments will have MF =1, Offset = 310 and will be of size 1500 bytes (1480 bytes in payload). The second of these fragments will have MF = 0, Offset = 310 + 1480/8 = 495 and will be of size 560 bytes (540 bytes in payload).

COMP3331/9331 Practice Final Exam
11 Assume that an organisation has been assigned a Class C address block. Assume that the network administrator has divided this address block into a number of equally sized subnets and that the subnet mask of 255.255.255.248 is used.
1) How many subnet blocks were created? How many hosts can be assigned IP addresses in each subnet? (1 mark)
2) If a host within this organisation has an IP address is 192.168.10.17, then what is the network address and broadcast address of the subnet to which this host belongs to? (1 mark)
Fill in your answer here
1) The subnet mask of 255.255.255.248 has the first 29 bits to be 1. Recall that a Class C address has 24 bits for the network part. Thus 29-24 = 5 bits of the host part have been used to create the subnets, resulting in 2^5 = 32 subnets Each subnet would comprise of 2^3 = 8 IP addresses. Disregarding the 2 edge addresses which are reserved, each subnet can contain 6 hosts.
2) Applying the subnet mask to the IP address (i.e. bitwise AND), we obtain the network address as (192.168.10.00010xxx) 192.168.10.16. The broadcast address would be 192.168.10.00010111 = 192.168.10.23.
Maximum marks: 2

COMP3331/9331 Practice Final Exam
12 Assume that the forwarding table at a router is as follows: Destination Address Interface 192.168.32.0/26 1
192.168.32.0/24 2
192.168.32.0/19 3 0.0.0.0/0 4
Note that the last entry is the default entry which matches all destination addresses.
1) Assume that an IP datagram with destination IP address 192.168.32.100 arrives at this router. Which interface will this datagram be forwarded on?
Select one alternative:
Interface 2 Interface 4 Interface 3 Interface 1
2) Assume that an IP datagram with destination IP address 192.168.31.200 arrives at this router. Which interface will this datagram be forwarded on?
Select one alternative
Interface 4 Interface 3 Interface 1 Interface 2
Maximum marks: 1.5
1) Converting the last block of the destination IP address to binary – 192.168.32.01100100. This address does not match the first entry. It will match the other 3 entries. However, the longest match will be generated for the 2nd entry and this the datagram will be forwarded along interface 2.
2) Converting the last two blocks of the destination IP address to binary – 192.168.00011111.11001000. This will not match the first 3 entries as none of the first 26, 24 or 19 bits match the corresponding destination address entries. The last entry always matches any IP address, thus the datagram is forwarded to interface 4.

COMP3331/9331 Practice Final Exam
13 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
Destination IP address Source port number
None of the provided choices Destination port number Source IP address
Transport checksum Protocol field in IP header
IP checksum
Maximum marks: 1
A NAT router would typically modify the source IP, source destination, and the transport and IP checksums for outgoing datagrams.

COMP3331/9331 Practice Final Exam
14 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.
Every router in the network knows the entire network topology.
None of the other choices are true.
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.
Poison reverse may not always resolve the count to infinity problem.
Maximum marks: 1
In DV, routers do not have knowledge of the entire topology, just their direct neighbours.
A reduction in the cost of a link will always trigger the execution of the DV algorithm at the node. However, a DV update will only be sent if there is a change in the DV as a result of this execution, which may not always be the case.
A DV from a node is only sent to its direct neighbours. These neighbours do not propagate the DV further.
So the correct answer is that Poison Reverse may not always solve county to infinity problem. An example was shown in the lecture.

COMP3331/9331 Practice Final Exam
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
15 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
Format  
Maximum marks: 4
Since there is a tie at step 1, either b or h could be chosen as the node to be added to N. The other node would be added in Step 2. In the answer provided b is added first, followed by h. However, you could have added h first, followed by b. The end result would still be the same.

COMP3331/9331 Practice Final Exam
16 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
b – (a, b), c – (a, b), d – (a, b), e – (a, b), f – (a, h), g – (a, h), h – (a, h)
Maximum marks: 1.5

17 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 . Neglect any other 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
1) R = 11 (NOTE: you cannot add leading or trailing zeros, so 011 or 110 are not valid answers)
The computation on the left which shows how R is computed by the sender. The computation on the right side shows you that if there are no errors while transmission, then dividing by G will result in a zero remainder at the receiver.
The computation is for the case when the ordering is left to right (i.e. 2nd, 3rd and 4th bits are counted from the left). I have not shown the computation if you count the order right to left but the answer would still be the same – False.
COMP3331/9331 Practice Final Exam
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
18 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 . Neglect any other 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
1) R = 000. (NOTE: There MUST be 3 zeros in your answer, so 0 or 00 or 0000 are not valid answers)
The computation on the left shows how R is computed by the sender. The computation on the right shows the corresponding computation at the receiver assuming there are no errors in transmitting
The computation shown is for the case when the ordering is left to right (i.e. 2nd, 3rd and 4th bits are counted from the left). I have not shown the computation if you count the order right to left but the answer would still be the same – True.
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
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
19 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
The frame is first sent on the link A-S1. When it arrives at S1 since the switch table is empty, the frame will be broadcast by S1 on all other links: S1-B, S1-C, and S1-S4.
When the frame reaches S4, since the switch table is empty, S4 would send it to all other links, i.e., S4-S2.
When the frame arrives at S2 since the switch table is empty, the frame will be broadcast by S2 on all other links: S2-D, S2-E, and S2-F.
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
20 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
The frame would be transmitted on F-S2. When the frame reaches S2, it would now have learnt that host A is reachable along the link S2-S4. So S2 would selectively forward the frame on this link (i.e., S2-S4).
When the frame reaches S4, S4 would have learnt that host A is reachable along the link S4- S1. So S4 would selectively forward the frame on this link (i.e., S4-S1).
When the frame reaches S1, S1 would have learnt that host A is reachable along the link S1- A. So S1 would selectively forward the frame on this link (i.e. S1-A).
Maximum marks: 1.5

COMP3331/9331 Practice Final Exam
21 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
Host C will first send an ARP query requesting for the MAC address that corresponds to F’s IP address. This query will be sent to switch S1 which will send it on all outgoing links.
Switches S4 and S2 will do the same. So all hosts will receive this query.
Only Host F will respond with an ARP response containing its own MAC Address.
When Host C receives this MAC address, it will encapsulate the IP datagram in an Ethernet frame with F’s MAC address as the destination and transmit the frame to Switch S1.
Depending on the switch table entries of the switches this frame will either get selectively forwarded towards F or broadcast.

COMP3331/9331 Practice Final Exam
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

Leave a Reply

Your email address will not be published. Required fields are marked *