UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
FINAL EXAMINATION: December 08, 2018 at 2 PMDURATION: 21/2 hrs. ECE361 - Computer Networks
Exam Type: B
Calculator Type: 2 (non-programmable calculators)
Examiner: Hamid S. Timorabadi
LAST NAME: FIRST NAME: STUDENT NUMBER:
INSTRUCTIONS:
Answer all the questions on this examination paper. The value of each question is indicated in the brackets. All work is to be done on these sheets.
Use the back of the pages if you need more space. Show details of your solutions for all questions.
Full marks are only applied to legible solutions with required details.
MARKS
Qi
/5Q2 /20
Q3
/5[5 Marks] Qi: Clearly circle the correct answer. There is only one correct answer. 1. Which one is true about Ethernet protocols?
Ethernet is commonly used for the link-layer protocol for long-distance links (such as across a country).
The Maximum Transmission Unit (MTU) of Ethernet is dictated by the buffer size of the link-layer endpoints.
Ethernet adaptors send frames as soon as they have any available data.
The Ethernet spanning tree may take a longer path through a network than that which would be calculated by a link-state algorithm (assuming both have converged).
The Ethernet spanning tree protocol prevents Ethernet forwarding from ever encountering a loop.
None of the above.
2. A network advertises the CIDR network number 50.1.56.0/22 (and no other numbers). Which IP addresses could the network own?
50.1.57.0 50.1.75.1 50.1.60.0 50.1.120.0
3. By looking at the header of the packet can you say which application protocol generated it? Yes.
No. Maybe.
4. Which of the following about UNIX socket programming are true.
accept() returns when the receiver completes the three-way TCP handshake.
When a TCP sender calls closeQ, the network stack immediately sends a FIN packet to its peer.
The return value of recvO specifies the number of bytes wrote to a socket.
send() on a TCP socket causes a sender to generate a TCP/IP packet and send it out the appropriate network interface.
None of the above.
5.
In the Transmission Control Protocol (TCP), acknowledgements (ACKs) are used for: Error controlFlow control Congestion control
Error control and flow control
Error control, flow control, and congestion control t) None of the above.
6. Considering that routers employ OSPF or RIP to configure their routing tables then which one of the followings is correct?
Both OSPF and RIP employ TCP. Both OSPF and RIP employ UDP.
RIP employs TCP and OSPF employs UDP. OSPF employs TCP and RIP employs UDP. None of the above.
7. When the link cost increases suddenly between two routers in a network, poisoned reverse is
used to
accelerate the convergence to a stable routing table
replace all update link costs initially to infinity for all routes through the affected routers
guarantee unique routing solutions in the final routing tables Both a and b responses are correct.
8. IP fragments are reassembled at the destination.
False True
9.
Sliding window achieves higher throughput than Stop-and-Go. False True10.
One of the advantages of IPv6 is that its header offers a 16-bit offset for the fragmentation process.[18 Marks] Q2: Short answer questions.
Name three kinds of switching found inside a router. (1.5 marks)
2-
3-
Give two reasons why an Internet Service Provider (ISP) might select a route with a longer AS-PATH over a route with a shorter AS-PATH. (1 mark)
2-
In sending email and using SMTP: How can one send an email that contains only one single dot (.)? How does SMTP handle this task? (1 marks)
What are the header sizes for the following protocols? Indicate minimum and maximum if applies. (1 mark)
TCP:
UDP:
IP:
5. Consider transferring a file of size 250,000 bytes from a server to a host with a bandwidth of 2Mbps.
Assuming that all bandwidth is consumed by only this data transfer (i.e. there are no other packet headers, there is no other traffic on the link, etc.) and that can start immediately to send data at the maximum rate, how long does it take to transmit the file? (1 mark)
Consider transferring this file via TCP, with a maximum segment size of 1000 bytes. You have to follow TCP's transport algorithm, so you start transmitting the file at a low rate. How many network round trip times (RTTs) will it take to transmit the entire file? Again assume that all bandwidth is consumed for transferring this file. Justify your answer. (2 marks)
7. Name all the possible fields in the IP header that might be changed during fragmentation. (1 mark)
In the process of fragmentation, what is the reason for dividing the data size by 8 in order to determine the fragments offset? (1 mark)
9. Name two similarities and two differences between switches and router. (1 mark)
10. Describe virtual LAN. (1 mark)
ii. The following datagram is being sent over the physical layer. If byte-stuffing is applied to this datagram then what is being sent? Provide your answer in Hex. (1 mark)
Datagram sent (in Hex) is: 61 7D 62 7E 70 90 66
What is Gratuitous ARP? Why is it used? (1 mark)
Name two disadvantages of NAT? (2 mark)
What is the maximum number of blocks that in a Selective Acknowledgement (SACK) can be acknowledged for each IP header? Explain why this maximum number is selected. (3 marks)
[5 Marks] Q3: Consider the following network where Client 1 (Cl) wants to download a file from File Server. The size of the file is 500MB. RI and R2 are also routers that connect Cl to the File Server. C 1 has a direct link to the File server as well.
W=1 I BW=200KB/s
File Server
1IBW=250KB/s °°
Cl Ri
W=i I BW=lOOKB/s
Client 1 (Cl) uses Dijkstra to find the shortest path (based on the links' costs) to the File Server such to download the File. In case of a link failure or in order to find a better link, Cl switches to that link and resumes the download with no delay from the new link. Ignore the re-routing delay, propagation delay, or queuing delay and answer the following questions.
Given that all the links in the network are connected, how much of the File is now downloaded at time to=55 and how much is left?
Now consider the direct link from Cl to File Server is down for 50 seconds. How much of the file is now downloaded at time tj=55s and how much is left?
c) At this time the link from Cl to File Server has come back up. How long more does it take for Cl to download the whole file?
[10 Marks] Q3: Part A: (5 marks)
An input (port A) to a router is connected to a link of a Maximum Transfer Unit (MTU) of 1492 bytes. The output (port B) of this router is connected to another link with a MTU of 512 bytes. A datagram passes through this router from port A and is loaded into port B. The following information about this datagram is available.
Header Length 20 Total Length 1400 Identification 0xa678 DFflag 0 MFflag 0 Fragment offset 0
In the space provided below fill the information for each fragment that is loaded into port B by this router.
Header Length
Total Length
Identification
DFflag
MFflag
Fragment offset
Header Length
Total Length
Identification
DFflag
MFflag
Fragment offset
Header Length
Total Length
Identification
DFflag
MFflag
Fragment offset
Header Length
Total Length
Identification
DFflag
MFflag
Fragment offset
Q3: Part B (5 marks)
L Determine the shortest-path from node 6 to all the other nodes in the following network by applying Dijkstra's algorithm. Write the final answer in the table provided and clearly label each column. Show all the details.
This Page Left Blank for additional work space
[10 Marks] Q5:
a) The Stable Paths Problem (SPP) is an abstract model of BGP routing, where each node has a ranked list of "permitted paths" (where the first path is preferred over the second path, and so on). In a solution of an SPP instance, each node selects the highest-ranked path consistent with its neighbors' choices. Consider the SPP below, where nodes 1, 2, 3, and 4 each want to select a path to destination node 0. Does this SPP instance have a unique, stable solution? If yes, please indicate the path that each node selects in the stable solution. If not, give an example of an oscillation. Use the space to the right of the figure for your answer.
120 40 410 230 20 'U
b) Consider the network below that runs a link-state routing protocol that computes shortest paths as a sum of link weights. The number on each link is the weight of the link in each direction (e.g. links b-c and c-b both have weight 2). Suppose nodes a, b, and d send packets to destination node c. If link d-c (and c-d)fails, which of nodes a, b, and d could conceivably see their packets stuck in a temporary forwarding loop? Which ones would not?
c) In Figure from Part b, suppose for maintenance links d-c (and hence c-d) is taken down. Then temporarily the weight of the link is set to a higher value, such to coax (persuade gradually) nodes to move away from paths that use the link without creating any loops or blackholes. What is the (minimum) sequence of weight settings for the link that ensures no packets destined to node c experience a loop or a blackhole?
Note: Blackholes are where incoming or outgoing traffic is dropped, without informing the source that the data did not reach its intended recipient.