---------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2017 Homework 3 ---------------------------------------------------------------------------- 1. Consider a network that has four routers A, B, C, D and five subnetwoks u, v, w, x, y. Router A is attached to subnetworks u, w, y. Router B is attaached to subnetworks u, w, x. Router C is attached to subnetworks v, w, x. Router D is attached to subnetworks v, w, y. Assume that the routers in this network use the RIP protocol to maintain their routing tables. Also assume that from the start router B is "dead". Compute the initial routing tables for routers A, C, D in this network. ------------------------------------------------------------------------------ 2. Consider the network in Problem 1 above. Compute the final routing tables for routers A, C, D in this network. (Hint: The routing tables for routers in a network are final iff when any router R in this network receives the routing table T of a neighboring router and uses the received routing table T to update its own routing table then the routing table of R remains unchanged.) ------------------------------------------------------------------------------ 3. The main scenario of the DHCP protocol between a client C and a server S is as follows: C --> S : Discover message {C needs an IP address} C <-- S : Offer message {S offers address 1.2.3.4} C --> S : Request message {C requests address 1.2.3.4} C <-- S : Ack message {S approves the request} Consider an alternative scenario of this protocol where message loss causes S to receive the Discover message, then send the Offer message, but never receive the Request message. What can S and C do to tolerate the effects of message loss in this case. ------------------------------------------------------------------------------- 4. The main scenario of the DHCP protocol between a client C and a server S is as follows: C --> S : Discover message {C needs an IP address} C <-- S : Offer message {S offers address 1.2.3.4} C --> S : Request message {C requests address 1.2.3.4} C <-- S : Ack message {S approves the request} Consider an alternative scenario of this protocol where message loss causes C to send the Discover message, then receive the Offer message, and send the Request message, but never receive the Ack message. What can S and C do to tolerate the effects of message loss in this case. ---------------------------------------------------------------------------------- Solutions: ---------------------------------------------------------------------------------- 1. Initial Table A Initial Table C Initial Table D --------------- --------------- --------------- | u | 1 | - | | v | 1 | - | | v | 1 | - | ------------- ------------- ------------- | w | 1 | - | | w | 1 | - | | w | 1 | - | ------------- ------------- ------------- | y | 1 | - | | x | 1 | - | | y | 1 | - | ------------- ------------- ------------- ---------------------------------------------------------------------------------- 2. Final Table A Final Table C Final Table D ------------- ------------- ------------- | u | 1 | - | | v | 1 | - | | v | 1 | - | ------------- ------------- ------------- | w | 1 | - | | w | 1 | - | | w | 1 | - | ------------- ------------- ------------- | y | 1 | - | | x | 1 | - | | y | 1 | - | ------------- ------------- ------------- | v | 2 |C/D| | u | 2 | A | | u | 2 | A | ------------- ------------- ------------- | x | 2 | C | | y | 2 |A/D| | x | 2 | C | ------------- ------------- ------------- ---------------------------------------------------------------------------------- 3. There are two possible message losses that cause S never to receive a Request message. First an Offer message is lost, and in this case C waits for an Offer message that will never arrive. Second a Request message is lost and in this case C waits for an Ack message that will never arrive. In these two cases, S waits for a Request message that will never arrive. To tolerate the effect of message loss, both C and S time-out after a long wait and return to the initial state of the protocol, where C is still in need for an IP address from S, and where S withdraws its Offer of the IP address (1.2.3.4) to C. -------------------------------------------------------------------------------- 4. There are two possible message losses that cause C never to receive an Ack message. First a Request message is lost, and in this case S waits for a Request message that will never arrive and C waits for an Ack message that will never arrive. Then both C and S time-out after a long wait and return to the initial state of the protocol, where C is still in need for an IP address from S, and where S withdraws its Offer of the IP address (1.2.3.4) to C. Second an Ack message is lost and in this case C waits for an Ack message that will never arrive, then C times out after a long wait and returns to its initial state where it is still in need for an IP adress from S. Also in this case, S finishes its execution of the protocol and assumes wrongly that C has gotten the IP address 1.2.3.4. Then after an hour, S assumes correctly that it has gotten back the IP address 1.2.3.4. --------------------------------------------------------------------------------