advertisement

Solutions to Practice Problems Practice Problem 15.1 Consider the network shown below, where the numbers on the edges indicate the cost of using that edge. For example, the cost of using the link from Router A to Router B is 1, whereas the cost of using the link from Router A to Router D is 4. (a) Draw the routing table for Router A. B C 3 1 2 A 1 F 1 4 4 1 D E Solution: Destination B C D E F Next Hop B B B B B Total Cost 1 3 3 2 5 (b) If all routers have the correct routing tables, what is the path that an IP packet travels from Node A to Node F? (Note that to state a path, you just need to state the sequence of routers encountered along the path; for example, one possible path from Router A to Router F is A-D-E-F. Solution: A – B – E – C – F (c) What is the total cost of the path you selected in Part (b) above? Solution: 5 2 Practice Problem 15.2 Given the following network map with the weights of edges between routers: (a) Construct the Link State Packet (LSP) that Router C would send to Router B. Solution: C Router B F G Weight 5 4 3 (b) After Router G runs Dijkstra's Algorithm, what would be the optimal route from router G to router B, and what would be the total cost of this route? Solution: G – F – E – B at a total cost of 7 3 Practice Problem 15.3 You are Router J. Notice that you have four neighbors: A, I, H and K. Your delay to A is 8, your delay to I is 10, your delay to H is 12 and your delay to K is 6. You receive the distance vectors shown below on the right (the first column is the received distance vector from Router A, the second is from Router I, the third from Router H and the last column is the received distance vector from Router K. Distance Vector Routing Write down your new estimates of distances to all nodes, and annotate your distance vector showing the next router on the best path to each destination. e Vector Routing From, Tanenbaum, Computer Networks, 3rd ed Figure Solution:5-9.(a) A subnet. (b) Input from A, I, H, K, and the new routing table forTotal J. Delay Destination Next Hop Networks: Routing A B C D E F G H I J K L 4 21 Practice Problem 15.4 In the event that router G experienced a fatal power supply failure, which protocol would be best suited to recovering from this failure and sharing correct routing information? (a) Link State Routing (b) Distance Vector Routing (c) Both protocols are robust and would be unaffected by this anomaly. Solution: (a) 5