---------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2018 Homework 3 ---------------------------------------------------------------------------- 1. (4 points) Consider a network that has four routers A, B, C, and D and has four subnetworks w, x, y, z: Router A is attached to subnetworks w and x Router B iS attached to subnetworks x and y Router C is attached to subnetworks y and z Router D is attached to subnetworks z and w The routers use RIP to maintain their routing tables. Write the initial routing tables of A, B, and C. Assume that A sends its initial routing table to B which uses the received initial routing table to update its own routing table. Write the updated routing table of B. Then assume that B sends its updated routing table to C which uses the received routing table to update its own routing table. Write the updated routing table of C. --------------------------------------------------------------------------- 2. (4 points) Consider a network that has four routers A, B, C, and D and has four subnetworks w, x, y, z: Router A is attached to subnetworks w and x Router B iS attached to subnetworks x and y Router C is attached to subnetworks y and z Router D is attached to subnetworks z and w Assume that subnetworks w and x have failed and that the four routers use OSPF to maintain their routing tables. Write the local states of routers A and B Write the global states of routers A and B Write the routing tables of routers A and B --------------------------------------------------------------------------- 3. (2 points) Consider a broadcast network (N, E) whose topology is a tree. The broadcast flooding protocol for this network can be made simpler than the broadcast flooding protocol for a network whose topology is a general graph. Describe the simple broadcast flooding protocol for a broadcast network (N, E) whose topology is a tree. --------------------------------------------------------------------------- Solutions --------------------------------------------------------------------------- 1. Initial Routing Table of A: ------------- | w | 1 | - | ------------- | x | 1 | - | ------------- Initial Routing Table of B: ------------- | x | 1 | - | ------------- | y | 1 | - | ------------- Initial Routing Table of C: ------------- | y | 1 | - | ------------- | z | 1 | - | ------------- Updated Routing Table of B: ------------- | w | 2 | A | ------------- | x | 1 | - | ------------- | y | 1 | - | ------------- Updated Routing Table of C: ------------- | w | 3 | B | ------------- | x | 2 | b | ------------- | y | 1 | - | ------------- | z | 1 | - | ------------- ----------------------------------------------------------------------- 2. Local State of A: X---w---A---x---X Local State of B: X---x---B---y Global State of A: same as local state of A Global State of B: X---x---B---y---C---z---D---w---X Routing Table of A: ----------------------- | w | failed ----------------------- | x | failed ----------------------- | y | nonreachable ----------------------- | z | nonreachable ----------------------- Routing Table of B: ----------------------- | w | failed ----------------------- | x | failed ----------------------- | y | no best ngh ----------------------- | z | C ----------------------- ----------------------------------------------------------------------------- 3. The simple broadcast flooding protcol consists of two steps: Step 1: a node u in network (N, E) generates a broadcast msg m and forwards a copy of m toevery neighboring node of u in (N, E). Step 2: When a node v in (N, E) receives a copy of m from a neighboring node w, node v forwards a copy of m to every neighboring node of v other than w. This protocol is simpler than the original protocol in two ways. First, broadcast messages have no sequence numbers. Second, no broadcast message specifies the node that generated the message. Thus each broadcast message is denoted (m), where m denotes the message content, instead of (m, u, seq). ------------------------------------------------------------------------------