ECE67: First Exam First Exam for ECE67 Spring 208 02/22/8 Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 75 minutes to complete the exam. Be a smart exam taker - if you get stuck on one problem go on to another problem. Also, don't waste your time giving irrelevant (or not requested) details. The total number of points for each question is given in parenthesis. There are 00 points total. Show all your work. Partial credit is possible for an answer, but only if you show the intermediate steps in obtaining the answer. If you make a mistake, it will also help the grader show you where you made a mistake. Good luck. Problem Max. Points Points 32 2 8 3 20 4 30 Total 00
ECE374: First Midterm 2 Problem : (Quickies 32 Points (4 each)) a. In the case of an SDN, explain the difference between a proactive and reactive flow installation? A: Re-active: When a new flow comes into the switch a lookup in the switch s flow table is performed. If no match for the flow is found, the switch consults the controller and creates a rule in the flow table based on the instruction. Pro-active: Rather than reacting to a packet, the controller could populate the flow tables ahead of time for all traffic matches that could come into the switch. b. Server A runs a web server on port 80 and an SMTP server on port 25. Client opens local port 5500 to establish a TCP session to the web server on Server A. What are the numbers of the destination and source ports in the TCP segments sent to the server? Client 2 opens local port 6600 to establish a TCP session to the SMTP server on Server A. What are the numbers of the destination and source ports in the TCP segments sent to the server? Answer: Client D=80, S=5500, Client 2 D=25, S=6600 c. Name the highest layer up to which a header modification can be made by each of the following entities: switch, router, transport layer system, and end system? A: MAC, Network, Transport, Application d. A caravan of 2 cars propagates at 00 km/hr on a 00 km long toll road. At the beginning of the road, at the toll booth, it takes 40 seconds to service each individual car. How long does it take for the last car to arrive at the end of the toll road? Cars now propagate at 000 km/hr (it still takes 40 seconds to service each car). Will cars arrive at the end of the toll road before all cars are serviced at first booth? If so, at what time will that happen? A: 00km/h: 480 seconds + 60 minutes = ~67 minutes 000km/h: 480 seconds + 360 seconds. Yes, after 400 seconds (40+360) the first car will arrive at the end of the toll road with 2 cars still waiting at the toll booth to be processed. e. Name the three major functionalities of the TCP protocol. To transmit a text file from the server to client, would you base your application on TCP or UDP? Briefly explain why? A: Reliability, congestion control, flow control. TCP, since it provides reliable data transfer. f. Assuming traditional congestion avoidance in TCP, how long would it take for the congestion window to increase from 50,000 to 00,000 if the RTT is 00ms? A: 50,000 * 00ms = 5000s = 83.33 minutes.4 hours! g. When a client broadcast an ARP message to find the destination MAC address for another node that has a specific IP address, what are MAC destination and
ECE67: First Exam 3 source addresses of that frame? Who responds to this ARP request? Answer: Dest: FF:FF:FF:FF:FF:FF; Source: Client MAC address; Node that has assigned IP address responds; h. Explain the functionality of a trunk port in VLAN switching? In 802.Q, how many different VLANs can be supported? A: trunk port: carries frames between VLANS defined over multiple physical switches. 802.Q: 2 2 =4096 Problem 2: Delays, Throughput (8 Points) Figure Consider the network shown in Figure. a. (4 Points) Based on this figure explain how the traceroute application determines the round-trip-time (RTT) between your host, the individual routers on the path to the receiving host, and the receiving host? A: sends three packets that will reach router i on path towards destination, router i will return packets to sender, sender times interval between transmission and reply. b. (2 Points) The following line represents a typical single output line from traceroute: ar0.needham.ma.boston.comcast.net(68.87.47.24) 4.682ms 3.927ms 9.944ms Why do the values for the three RTTs shown at the end of that line change? Answer: RTTs highly depend on the queue length of the routers located between the sender and the receiver. Based on other traffic there can be more or less waiting packets in a routers queue at a certain instance in time. Thus, the RTT between individual pings can vary. c. (4 Points) Now assume a static RTT of 20 milliseconds between the two hosts. A TCP session between Hosts A and B is starting. How long will it take for the congestion window to reach a value of 32? (Assuming no losses and an initial window size of.) List all individual congestion window size increases and the times at which those increases occur. A: 2 = 20ms, 4 = 240ms, 8 = 360 ms, 6 = 480 ms, 32 = 600ms. Impact of different RTTs on TCP d. (8 Points) For this problem, consider the network shown in Figure 2. Assume that source A and sink A communicate via TCP Reno (TCP), while source B and sink B also communicate via TCP Reno (TCP2). At t=700ms a packet loss (detected via triple duplicate ACKs) occurs for TCP2. Similarly, at t=000 ms
ECE374: First Midterm 4 a packet loss (detected via triple duplicate ACKs) occurs for TCP. Use the empty diagram given below to indicate the size of the congestion window over time for both TCP connections. ssthresh for both is 6 segments! Source A Sink A 0 ms Router 30 ms 5 ms 0 ms Router 2 5 ms 5 ms Source B Router 3 Sink B Figure 2 Congestion window (segments) 40 35 30 25 20 5 0 5 0 Time (ms) Figure 3
ECE67: First Exam 5 A: Problem 3: MAC and IP (20 Points) For this problem consider the network shown in Figure 4. X Y BB:89:34:E6:0:3B C Switch Switch (i) AA:0:F3:5C:02:04 (iii) Switch R 3 0:D4:E:A8:95:F0 (ii) Switch B A 20:FF:3A:BC:0:4E 2 Figure 4
ECE374: First Midterm 6 a. (6 points) Assign IP addresses to hosts A, B, C, and interfaces, 2, and 3 of R. Note: Each of the subnets should be able to host a maximum of 28 nodes. A: Because each subnet should be able to host a maximum of 28 hosts, five address bits are needed for each subnet. So let s assign the left subnet XX.YY.ZZ.xx0*****/27, where the XX.YY.ZZ are 8 bit numbers. Each x is a bit and the three * s correspond to the five address bits for this network. For the right subnet, we ll use XX.YY.ZZ.xx*****/27. Any address in the range XX.YY.ZZ.xx00000 to XX.YY.ZZ.xx00 can be used for A, C, and interface. Any address in the range XX.YY.ZZ.xx0000 to XX.YY.ZZ.xx0 can be used for B and interface. Any address in the range XX.YY.ZZ.x00000 to XX.YY.ZZ.x00 can be assigned to interface 3. b. (3 points) Now consider a frame that contains an IP datagram that is sent from Host B to Host A. What are the MAC source and destination address of this frame and the IP source and destination addresses in the encapsulated IP datagram at points (i), (ii), and (iii)? A: (i) MAC-S: BB:89:34:E6:0:3B, MAC-D: 0:D4:E:A8:95:F0, IP-D: e.g., XX.YY.ZZ.xx0000, IP-S: e.g., XX.YY.ZZ.xx00000 (ii) same as (i). (iii) MAC-S: 20:FF:3A:BC:0:4E, MAC-D: AA:0:F3:5C:02:04, IP-D: e.g., XX.YY.ZZ.xx0000, IP-S: e.g., XX.YY.ZZ.xx00000 c. (2 Points) Does the MAC address of the switches ever appear in a frame? Explain. A: No. Ethernet switches are transparent. d. (5 Points) Assume that node B initially did not know the MAC address of router interface 3. How does it obtain that MAC address? Describe the process for the case where node B needs to find out the MAC address of node Y. What happens if node B needs to find out the MAC address of node A? A: B sends and ARP request for the MAC address of interface 3 of the router. Since it is not known which node hosts this interface the ARP request is sent as a broadcast. Only the node that has the IP address contained in the ARP request will reply with the reply message containing its MAC address. Same procedure as in the case above. Finally, there is no need for B to find out A s MAC address! e. (4 Points) Imagine all switches in Figure 4 are replaced by SDN switches and controlled by a single controller. No traffic has been transmitted in this network so far and no flow rules are implemented in the switches. Now, Node B starts sending data to Node Y. What would happen to the very first frame when it reaches the switch that connects B and Y? What logic would the controller have to provide to assure that this frame is forwarded to Y? A: First frame is sent to the controller. Logic that resembles the one of a learning switch needs to be implemented. Problem 4: Crossbar Switch (30 Points)
ECE67: First Exam 7 Output Output 2 Output 3 Output 4 Input Number indicates output port Input 2 Input 3 Input 4 Figure 5: Enter solution for 4 c) in template Output Output 2 Output 3 Output 4 Input Number indicates output port Input 2 Input 3 Input 4 Figure 6: Enter solution for 4 d) in template For this problem consider a crossbar switch with four input and four output ports as shown in Figure 5. a. (3 points) Briefly explain why a crossbar switch outperforms a switch that is based on virtual memory. A: The access to the virtual memory is the bottleneck. It still uses a bus. That s not the case with a crossbar switch where transmissions can go on in parallel at full line speed. b. (3 Points) Explain the term head of line (HOL) blocking and how it influences the performance of a crossbar switch. A: HOL occurs when one or more packets are held up in a queue by the first
ECE374: First Midterm 8 packet in the queue. The first packet in the queue can be blocked because of several reasons. c. (4 Points) Use Figure 5 to give an example for a scenario in which NO HOL blocking occurs. (To make this example, assign output port numbers to the first four packets in each input queue. An example is given for the first packets in input queue ). A: Output Output 2 Output 3 Output 4 Input 2 2 2 2 Input 2 3 3 3 3 Input 3 4 4 4 4 Input 4 d. (4 Points) Use Figure 6 to give an example for a scenario in which HOL blocking occurs. (To make this example, assign output port numbers to the first four packets in each input queue. An example is given for the first packets in input queue ). A: Output Output 2 Output 3 Output 4 Input 2 2 2 Input 2 3 3 3 3 Input 3 4 4 4 4 Input 4 e. (4 Points) Explain why virtual queues can be used to avoid HOL blocking? How many virtual queues in total are required in the case of the scenario
ECE67: First Exam 9 shown in Figure 6. A: For each outgoing port, a virtual input queue is created at each physical input port. If HOL blocking at on of these queues occurs a packet from one of the other virtual queues can be chosen for switching. 6. Now we switch our focus to the Ethernet learning switch mechanism. Figure 7: Learning switch example f. (6 Points) Use Figure 7 to explain the functionality of an Ethernet learning switch. To explain the mechanism assume that the switch s table is completely empty and that Host A wants to sent data to Host A. A: Host A sends a frame to the switch. Since the switches table is empty, it ll flood the frame to all other nodes in the network. In parallel the switch learns that Host A s MAC address is connected to port and stores this in its forwarding table. A is the only one who replies to the flooded copy it receives from the switches. From this response frame the switches learns that Host A is connected to port 4 and it enters this info in its table. To forward the packet to Host A it uses its forwarding table to determine which output port to use. No flooding necessary. g. (6 Points) In this problem it is your task to calculate the line speed packet rate (pps) for a 0Gbps interface. You should calculate the rate for the smallest possible Ethernet frame (46 bytes) and for the case that frames have an MTU size of 500 bytes. Remember that in addition to the MAC header (4 bytes) and CRC (4 bytes), there is an 8 byte MAC preamble, 2 byte interframe gap. Showing the equation to determine the pps is sufficient for this problem. You do not have calculate the actual value! A: Peak packet rate for smallest frame: (0*0 9 )bits/sec / (84 bytes * 8) = 4,880,952 pps 500 MTU: (0*0 9 )bits/sec / (538 * 8) = 82,744 pps