Mohamed G Gouda CS 326E Spring 2013 Midterm 3 ------------------------------------------------------------------------------- Open Notes 50 Minutes ------------------------------------------------------------------------------- 1. The DHCP protocol is invoked by a mobile client, when this client enters a network, so that the client gets an IP address from the DHCP server in this network. Recall that this protocol consists of 4 messages: Discover, Offer, Request, and Ack. Consider the case where 2 mobile clients C1 and C2 enter the same network around the same time. Both clients invoke DHCP around the same time to get IP addresses from the DHCP server of the network. Explain how DHCP prevents the two clients from getting the same IP address. Sol. When clients C1 and C2 enter the network, they will send Discover messages (around the same time) asking for IP addresses from the DHCP server. Each of these two messages has a sequence numbers that is selected at random by the sending client and so the sequence numbers in the two Discover messages will be different (with a very high probability). When the DHCP server receives each Discover message, it replies with an Offer message that contains a different IP address. The reply Offer message will have the same sequence number as the received Discover message. Although each of the two Offer messages will reach both clients, each client can examine the sequence numbers in the Offer messages and can tell which Offer message is a reply to its earlier Discover message. ------------------------------------------------------------------------------- 2. Let A be a router in an Autonomous System that uses the RIP protocol for its Intra-AS routing. Assume that the routing table of A has the following 4 entries: dst Smallest #hops Best neighbour for reaching dst for reaching dst w 16 C x 3 C y 2 B z 3 B Assume also that A does not receive any routing table from its neighbouring router B for a long time, say 90 Seconds. In this case, A concludes that B is down, and updates its own routing table to reflect the fact that B is down. Show how the above 4 entries will be changed in the updated routing table of A. Sol. dst Smallest #hops Best neighbour for reaching dst for reaching dst w 16 C x 3 C y 16 B z 16 B ------------------------------------------------------------------------------- 3. Consider an Autonomous System that uses OSPF for its intra-AS routing. Assume that this system has 6 routers (A through F) and 7 subnets (a through g). Assume that the local state of each router is as follows. A is connected to b and c. B is connected to a and c. C is connected to a,b, and g but g is down. D is connected to e and f. E is connected to d and f. F is connected to d,e, and g but g is down. Write down the routing tables of routers C and F. Sol. Routing table of C: dst best neighbour to reach dst a - (directly connected to C) b - (directly connected to C) c A (or B) g - (not reachable) Routing table of F: dst best neighbour to reach dst d - (directly connected to F) e - (directly connected to F) f D (or E) g - (not reachable) ------------------------------------------------------------------------------- 4. Let AS1 be an autonomous system that has the prefix pf and 2 gateways A and B. Also, let AS2 be an autonomous system that has 2 gateways C and D and 2 routers E and F. The two gateways A and C are connected by a subnetwork u, and the two gateways B and D are connected by a subnetwork x. Gateway C and router F are connected by a subnetwork v, gateway D and router E are connected by a subnetwork y, and the two routers F and E are connected by a subnetwork z. What route advertisements of prefix pf will router F receive? What entry of prefix pf will F enter in its BGP routing table? Sol. Router F will receive the following two route advertisements concerning prefix pf: (pf, u) and (pf, x) Router F will enter the following entry in its BGP routing table: (dst = pf, best neighbour for reaching dst = C) -------------------------------------------------------------------------------