Student Name: ____________________ Student Number: ___________________ Seat: ______ CS310: Computer Networks School of Information Technology, Engineering, Mathematics, and Physics Final Examination Semester 1 2023 F2F Only Duration of Exam: 3 hours + 10 minutes Reading Time: 10 minutes Writing Time: 3 hours Total marks: 100 Instructions: 1. This exam is a closed book exam. 2. This exam has three sections: • Section A: 30 Marks • Section B: 40 Marks • Section C: 30 Marks 3. This exam has 3 main questions (with sub questions) and ALL are compulsory. 4. There are 14 pages in this paper including this cover page. 5. Show all necessary working. Partial marks will be awarded for partially correct answers. 6. Only non-programmable calculators are allowed. 7. This exam is worth 40 % of your overall mark. 8. The minimum passing mark is 40/100. Section A (Questions 1) - Short and Long Answer Questions (30 Marks) a) What is the difference between a host and an end system? List several different types of end systems. Is a Web server an end system? (3 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ b) Consider the Figure 1 below, that draws the analogy between store-and-forward link transmission as well as propagation of bits in packet along a link, and cars in a caravan being serviced at a toll booth and then driving along a road to the next tollbooth. Figure 1: An analogy between store-and-forward link. Suppose the caravan has 5 cars, and that the tollbooth services (that is, transmits) a car at a rate of one car per 2 seconds. Once receiving serving a car proceeds to the next tool both, which is 500 kilo-meters away at a rate of 20 kilo-meters per second. Also assume that whenever the first car of the caravan arrives at a tollbooth, it must wait at the entrance to the tollbooth until all of the other cars in its caravan have arrived, and lined up behind it before being serviced at the toll booth. (That is, the entire caravan must be stored at the tollbooth before the first car in the caravan can pay its toll and begin driving towards the next tollbooth). i. Once a car enters service at the tollbooth, how long does it take until it leaves service? (1 mark) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Page 2 of 14 ii. How long does it take for the entire caravan to receive service at the tollbooth (that is the time from when the first car enters service until the last car leaves the tollbooth)? (2 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ iii. Once the first car leaves the tollbooth, how long does it take until it enters service at the next tollbooth? (3 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ iv. Are there ever two cars in service at the same time, one at the first toll booth and one at the second toll booth? Answer Yes or No. Explain your selected choice. (3 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ c) Explain what an Internet Protocol version 4 (IPv4) address is? (2 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ Page 3 of 14 d) The Selective Repeat protocol usually provides for sending multiple frames depending upon the availability of frames in the sending window. However, this depends on the maximum number of frames to be sent and the size of the sending window. Figure 2, shows an example of SR operation in the presence of lost packets. After the thorough observation fill in the gaps from (a) to (f). (6 marks) Hint: An example on the receiver’s side is completed for you. Figure 2: The SR receiver events and actions. e) Consider a store and the forward packet switched network in Figure 3, in which the application data is segmented into packets, with each packet carrying up to 1800 bits of data, and additional 200 bits of header. Host A and Host B are interconnected by the 2 routers as shown below. All the 3 links are exactly the same, with each link having a length of 300km and the transmission rate of 100x103 bps. Furthermore, the propagation speed of the signal on the links is 3 x 106 km/s. Page 4 of 14 Figure 3: A delay concepts. Suppose Host A (PC A) sends a file of the size 500 x 103 bits. From start of transmission at A, how long does B wait to receive the entire contents of the file? Hint: If you are to ignore queuing and processing delays. (4 marks) f) HTTP with Non-Persistent Connections. In many Internet applications, the client and server communicate for an extended period of time, with the client making a series of requests and the server responding to each of the requests. Let’s suppose the page consists of a base HTML file and 10 JPEG images, and that all 11 of these objects reside on the same server. Page 5 of 14 Further suppose the URL for the base HTML file is: g) Decribe in 6 steps thoroughly what happens when the above URL is requeted. [HTTP with Non-Persistent Connections]. (6 marks) ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ Section B (Questions 2) - Short and Long Answer Questions (40 Marks) a) In the scenario below, imagine that you're sending an http request to another machine somewhere on the network. You are asked to state what layer in the IP stack best corresponds to the phrase from 1-15. (7.5 marks) Figure 4: A http request scenario. Page 6 of 14 Hint: Identify the layers involved at each stage from the Figure 4 above to fill in the table below. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. b) Consider the 7-node network shown in Figure 5 below, with the given link costs. Figure 5: Portrayal of the 7-node network. Using Bellman-Ford Algorithm, find the shortest path. Ensure to show the detailed working as learnt in CS310 course. Page 7 of 14 (12 marks) Page 8 of 14 c) Consider the figure below, which shows the arrival of 6 messages for transmission at different multiple access wireless nodes at times: t = 0.6, 1.3, 1.6, 2.3, 3.8, 4.5 and each transmission requires exactly one-time unit. Figure 6: Nodes implementing the Slotted Aloha protocol. i. Suppose all nodes are implementing the Slotted Aloha protocol. For each message, indicate the time at which each transmission begins. Separate each value with a comma and no spaces. (3 marks) ______________________________________________________________________________ ii. Which messages transmit successfully? Write your answer as a comma separated list with no spaces using the messages' numbers. (2 marks) ______________________________________________________________________________ d) TCP Retransmissions (Reliable Data Transmission with Ack Loss) Consider the figure below in which a TCP sender and receiver communicate over a connection in which the segments can be lost. The TCP sender wants to send a total of 10 segments to the receiver and sends an initial window of 5 segments at t = 1, 2, 3, 4, and 5, respectively. Suppose the initial value of the sequence number is 90 and every segment sent to the receiver each contains 636 bytes. The delay between the sender and receiver is 7-time units, and so the first segment arrives at the receiver at t = 8, and an ACK for this segment arrives at t = 15. As shown in the figure, 1 of the 5 segments is lost between the sender and the receiver, but one of the ACKs is lost. Assume there are no timeouts and any out of order segments received are thrown out. Page 9 of 14 Figure 7: Portrayal of the TCP Retransmissions. i. What is the sequence number of the segment sent at t=5? (2 marks) _____________________________________________________________________________________ ii. What is the value of the ACK sent at t=8? (If segment lost, write 'x'). (2.5 marks) _____________________________________________________________________________________ iii. What is the value of the ACK sent at t=12? (If segment lost, write 'x'). (2.5 marks) _____________________________________________________________________________________ e) First describe how the client and the server interact? To support the claim, draw a diagram to show their interaction flow. (4.5 marks) Page 10 of 14 f) Briefly describe what are the functions of Transport, Network and Data Link layer. (4 marks) ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ Section C (Questions 3) - Short and Long Answer Questions (30 Marks) The Vision Limited is building a retail outlet in Port Villa, Vanuatu. There will be 2 departments required in the retail outlet. The number of IP addresses required on a per department basis is as follows: • • Customer Wi-Fi – 100 IP Addresses Retail Devices – 50 IP Addresses Part A (19 marks) a. Subnet the major network 172.16.0.0/16 using Variable Length Subnet Mask to design the network for the Retail outlet. Fill the table below. All the calculations should be clearly stated. Table 1: Carries the subnet information’s. Department Network Usable IP Range Customer Wi-Fi Retail Devices Page 11 of 14 Broadcast Address Page 12 of 14 Part B b. Draw the topology diagram. Use the last Usable IP address as for the Default gateway. (5 marks) c. What is the difference between access and trunk ports? (2 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ d. What is a VLAN? (2 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ e. Give two benefits of using VLAN. (2 marks) _____________________________________________________________________________________ _____________________________________________________________________________________ _____________________________________________________________________________________ THE END Page 13 of 14 Student Name: ____________________ Student Number: ___________________ Seat: ______ THE END Page 14 of 14