-------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2017 Midterm 3 -------------------------------------------------------------------------- 1. A network consists of four routers A, B, C, D and four subnetworks u, v, w, x. Router A is attached to subnetworks u and v. Router B is attached to subnetworks u and x. Router C is attached to subnetworks v and w. Router D is attached to subnetworks w and x. Assume that the routers in this network use the RIP protocol to route packets. Also assume that the current routing table of router C is as follows: (u, 3, D) (v, 1, -) (w, 1, -) (x, 2, A) when router C received the following routing table from the neighboring router A. (u, 1, -) (v, 1, -) (w, 2, C) (x, 2, B) In this case, router C uses the received routing table to update its own routing table. What is the updated routing table of router C? --------------------------------------------------------------------------- 2. A switched Ethernet consists of two switches S1 and S2, one router R and three hosts A, B, C. Hosts A and B are attached to switch S1. Switch S1 is attached to switch S2. Switch S2 is attached to host C and router R. Assume that this network uses the ARP protocol, without ARP tables, to resolve IP addresses into MAC addresses. How many distinct frames need to be constructed and transferred in this network in order to transfer a packet from its original source host A to its ultimate destination host C? Explain your answer. --------------------------------------------------------------------------- 3 and 4. Cosider a switch S in a switched Ethernet SE. Switch S in this network has three interfaces denoted i1,i2, i3 and the following switch table: ------------------------------------------------ (dst MAC address | Interface to reach dst | TTL) ------------------------------------------------ ( m1 | i3 | ) ------------------------------------------------ Answer any two of the following three questions: (a) What does S do when it receives on i1 a frame whose MAC src is m2 and whose MAC dst is m1? (b) What does S do when it receives on i3 a frame whose MAC src is m1 and whose MAC dst is m3? (c) What does S do when it receives on i3 a frame whose MAC src is m4 and whose MAC dst is m1? ---------------------------------------------------------------------------- Solutions: ---------------------------------------------------------------------------- 1. The updated routing table of router C is as follows: (u, 2, A) (v, 1, -) (w, 1, -) (x, 3, A) ----------------------------------------------------------------------------- 2. Three frames are needed to transfer the packet from host A to host C. First, one ARP Query frame is broadcasted over the switched Ethernet from A to every other computer. Second, one ARP Response frame is sent over the switched Ethernet from C to S2, then from S2 to S1, and then from S1 to A. Third, one frame encapsulating the packet is sent over the switched Ethernet from A to S1, then from S1 to S2, and then from S2 to C. ----------------------------------------------------------------------------- 3 and 4 (a). S forwards the frame to i3, and S adds entry (m2, i1, max TTL) to its switch table ----------------------------------------------------------------------------- 3 and 4 (b). S forwards copies of the frame to interfaces i1 and i2, and S replaces TTL with max TTL in entry (m1, i3, TTL) in its switch table ------------------------------------------------------------------------------ 3 and 4 (c). S discards the frame S adds entry (m4, i3, max TTL) to its switch table ------------------------------------------------------------------------------