CS 455/655: Introduction to Computer Networks Fall 2013 Sample Final Examination NAME: MATTA This exam is closed books and closed notes. Please write clearly and neatly. Be precise in your answers; do not just re-iterate what you know about the topic. Clearly state any assumptions you make. All questions are weighted equally. Answer all 5 questions. Problem 1 (IP addressing): Subnet B: 12 hosts Subnet A: 15 hosts Subnet C: 45 hosts R1 To public Internet via ISP Consider the network shown above, consisting of a single router, R1, with three subnets A, B and C, with 15, 12, and 45 hosts, respectively, on these subnets. Assign an address range to the hosts in subnets A, B, and C so that only a single aggregated address needs to be advertised by R1 to the public Internet, and that the size of the advertised aggregated address range is minimized. In a sentence or two, explain how you arrived at your answer. (Feel free to use variable names in addresses if the precise bit values are not important.) We need 15+12+45 = 72 addresses, i.e. we need to 27 addresses or 7 bits. So we have a common prefix length of 32-7=25 bits. Aggregated CIDR address: X.Y.Z.0/25 Subnet “A” CIDR address: We need 24 addresses, or 4 bits. CIDR address: X.Y.Z.0/28 Subnet “B” CIDR address: We need 24 addresses, or 4 bits. CIDR address: X.Y.Z.16/28 Subnet “C” CIDR address: We need 26 addresses, or 6 bits. CIDR address: X.Y.Z.64/26 Note that other solutions are possible. 1 NAME: MATTA Problem 2 (Distance-vector routing): E A B Consider the simple network shown above, in which A and B periodically exchange distance-vector routing information. Assume routers do not implement split horizon. All links have cost 1. After reaching convergence, suppose the A—E link fails. (a) Give a sequence of routing table updates that leads to a routing loop between A and B, for a destination at E. Before A advertises unreachability, node B advertises its distance of 2 to A, which A adopts. (b) Estimate the probability of the scenario in (a), assuming A and B send out routing updates at random times, each at the same average rate. Probability that B advertises before A = 0.5. (c) Estimate the probability of a loop forming if node A broadcasts an updated routing report after 1 second of discovering the A—E failure, and B regularly broadcasts every 60 seconds. Probability that B advertises within 1 second = 1/60. Now, consider the following extended topology, and again suppose after reaching convergence, the A—E link fails. Even if routers implement split horizon (without poison reverse), a routing loop between B and C, for a destination at E, can form—consider the following scenario: node A advertises a non-reachability update to B and C; before this non-reachability update arrives at B and C, B and C had already exchanged their distances, but these routing messages arrive at B and C after the non-reachability message from node A had arrived. C E A B (d) Describe how the situation in this extended scenario will evolve. Then, describe how the situation would evolve if routers use split horizon with poison reverse. Without Poison Reverse, a loop forms between B and C. With Poison Reverse, B and C advertise unreachability to each other and the loop breaks. 2 NAME: MATTA Problem 3 (BGP routing): (a) Suppose P, Q, and R are network service providers, with respective CIDR address allocations C1.0.0.0/8, C2.0.0.0/8, and C3.0.0.0/8 (using hexadecimal dotted notation with mask). Each provider’s customers initially receive address allocations that are a subset of the provider’s address space. P has the following customers: • PA, with allocation C1.A3.0.0/16, and • PB, with allocation C1.B0.0.0/12. Q has the following customers: • QA, with allocation C2.0A.10.0/20, and • QB, with allocation C2.0B.0.0/16. Assume there are no other providers or customers, and that each provider connects to both of the others. Suppose customer PA switches to provider Q and customer QB switches to provider R, resulting in the AS topology shown below. Use the CIDR longest match rule to give the routing table for P (only as representative) that allow PA and QB to switch without renumbering (i.e., keeping their initial address allocations). CIDR address next-hop (AS name) C2.0.0.0/8 C3.0.0.0/8 C1.A3.0.0/16 C2.0B.0.0/16 C1.B0.0.0/12 Q R Q // toward PA R // toward QB PB PA PB QA QB Q P R (b) Suppose customer PA is multi-homed, in that it has two Internet connections from the two providers, P and Q, as shown in figure below. (PA is taking its address assignment from P.) Q has a CIDR longest match routing entry for PA. Which inbound (incoming) traffic to PA might flow on the Q—PA connection, considering only traffic from domains P, Q, and H? Consider the two cases where Q does and does not advertise PA to the world using BGP. Recall shorter AS paths are preferred. PA Q does not advertise PA to the world: Only traffic from Q. Q advertises PA to the world: Q P X Y H Traffic from Q and H. 3 NAME: MATTA Problem 4 (Indirection and encapsulation): source à destination protocol type A à B TCP IP header TCP header + data data Consider the IP datagram carrying a TCP segment, shown above. Consider a situation where we want to route this datagram through an intermediate router C by encapsulating it within another datagram. (a) Draw the datagram as it travels to C and then as it travels out of C toward the final destination B—make sure to show the contents of the fields: source, destination, protocol type, and data (payload). source à destination source à destination protocol type data IP header To router C AàC | IP-in-IP | original datagram | protocol type IP header data From C, To destination B | AàB | TCP | TCP segment | (b) Describe how the datagram is processed at router C from when it arrives at C and until it comes out of C on its way toward the final destination B. At router C, IP demultiplexes the datagram to the “decapsulation” software, which removes the header and forwards the original datagram to the final destination. 4 NAME: MATTA Problem 5 (CSMA/CD protocol): (a) In CSMA/CD, after the fourth collision, what is the probability that the node chooses K = 3? What does the result K = 3 correspond to in terms of delay in microseconds on a 10 Mbps Ethernet? After the 4th collision, K is chosen uniformly from 0, …, 15. The probability that K=3 is then 1/16. K=3 corresponds to a delay of 512*3 bit times = (512*3)/10M= 153.6 µsec. (b) Suppose nodes A and B are on the same 10 Mbps Ethernet segment, and the propagation delay between the two nodes is 225 bit times. Suppose at time t = 0, B starts to transmit a frame. Suppose A also transmits at some t = x, but before completing its transmission it receives bits from B (hence, a collision occurs at A). Assuming node A follows the CSMA/CD protocol, what is the maximum value of x? x = 224 bit times /10M = 22.4 µsec. (c) Consider two nodes A and B on the same Ethernet segment, and suppose the propagation delay between the two nodes is 225 bit times. Suppose at time t = 0, both nodes A and B begin to transmit a frame. At what time do they detect the collision? Assuming both nodes transmit a 48-bit jam signal after detecting a collision1, at what time (in bit times) do nodes A and B sense an idle channel? How many seconds is this for a 10 Mbps Ethernet? 225 bit times = 22.5 µsec. (225 + 48) + 225 = 498 bit times = 49.8 µsec. 1 Note that once an adapter detects a collision, it stops transmitting its frame but continues to transmit a 48bit “jam signal” to ensure that collision is detected by other adapters. 5
© Copyright 2025 Paperzz