CS/ECE 438: Communication Networks Spring 2014 Midterm Examination Wednesday March 19th, 11:00 to 12:15 PM Welcome to the midterm examination! Please read everything on this page before you begin. The midterm contains 8 problems. The value of each problem is indicated below and at the start of each question. You may skip one of problems {2,3,4,5}, OR two of {6,7,8}. You must do problem 1. Show all work and reasoning by writing both work and solution legibly, and box all answers. If the course staff cannot read a solution, no credit will be given. Please write legibly. If we cannot read your answer, then it is wrong! The exam will end promptly at 12:15 p.m. by the clock in the auditorium, or, in the absence or failure of such a clock, by the proctor's watch. Please cease writing immediately when time is called. Print your name and ID number neatly in the space provided. Good luck! NAME: NETID: PROBLEM POINTS POSSIBLE 1 28 2 16 3 16 4 16 5 16 6 8 7 8 8 8 Total 100 SCORE 1 1. High level questions(28 points) a. You are the administrator of an Ethernet network for dorms on a university campus. There was a sale in town on cheap hardware, where some crappy vendor cheaped out and instead of assigning MAC addresses properly, used the same 40-bit prefix and just cycled through the lower bits. End result: you have just discovered that a number of newly deployed machines on your network have duplicate addresses. i. Perhaps merge these two into “You set this equipment up on the network without being aware of the problem. Briefly describe what symptoms might show up. ii. Give a good temporary workaround you would use. b. Suppose you ran an ISP network. What would be some reasons to disable traceroutes on your network? c. Currently hosts in the Internet have multiple "names": the IP address, the MAC address, and the DNS name. Imagine an "alternate reality" where the designers of the Internet had decided that each host should have only one name: the DNS name. The MAC address is replaced in the MAC header with the DNS name. IP routers now do lookups on DNS names, etc. Give at least one benefit and at least one downside to this design approach. d. Why are IP addresses assigned as a function of the topology? Are MAC addresses also assigned as a function of the topology -- if not, why not? e. Define “hub”, “switch” and “router” – what is the difference between these devices? Under what circumstances would you prefer a hub to a switch? f. Do ISPs typically configure export from providers to peers? Why or why not? g. Why is a consistent export clause important in service-level agreements? h. What is the BGP decision process? Why do operators wish to exercise control over this process? How exactly do operators influence the process to achieve their goals? 2 You could write your answer to Question 1 here if the space of former page is insufficient. 3 2. Error detection(16 points) a. The USB protocol uses a CRC with the polynomial x^5 + x^2 + 1. Calculate the CRC of the bit string 10011001. You need to fully show your work to get credits. In other words, credits won’t be given if only answers are presented. b. Assume bit string 1011101111000 is received (using the same generator G as in a), determine if error could be detected or not. c. Consider a frame consisting of four bits. Assume that the probability of error is 10^(-3), which is independent for each bit. What is the probability that the frame is received correctly? d. Continuing with the above four bit case and use the single parity check, calculate the probability of you determining there are error(s) given the received single parity? Assume the appended single parity is always received correctly. a. 10011001 11100 b. The remainder 11111, error is detected c. (1 - 10^4)^4 4 4 d. ( ) ∗ (10−3 ) ∗ (1 − 10−3 )3 + ( ) ∗ (10−3 )3 ∗ (1 − 10−3 ) 1 3 4 3. Distance vector(16 points) This question deals with distance vector routing on the network shown below. Assume that the distances shown in the figure do not change over time except as specified in the problem. The nodes operate in lockstep, in two-phase rounds. In phase one, a node updates its distance vector according to any changes it heard about in the previous round. In phase two, a node sends out its new distance vector, if its distance vector changed during phase one. At the start of round 1, all nodes' distance vectors contain only the links to their neighbors. (They all send out their distance vectors in phase 2 of round 1.) The CS department at UIUC bought new Sun Fire V210 servers. They decided to run a distancevector protocol for routing between these servers (even though it is a rather small network). They are currently configured as the picture below, with respective edge costs. The CS staff asked for your help. Write down each step of building the distance- vector routing table for ‘Eve’ so they can compare it to the output of their implementation. You can use abbreviations e.g., ‘A’ for Adam and ‘E’ for Eve. The initial routing table at node A is: a. Show the initial routing table of node E: Destination Cost Next Hop A ∞ --- B ∞ --- 5 C 11 C D 17 D b. Show the routing table of node E after one iteration of the algorithm: Destination Cost Next Hop A 32 D B 29 C C 11 C D 16 C c. Show the routing table of node E after two iterations of the algorithm: Destination Cost Next Hop A 31 C B 28 C C 11 C D 16 C d. In some failure situations, the administrator notices that it takes an exceptionally long time for the routing protocol to stabilize in this network. (i) What problem with the distance vector protocol is the cause? count-to-infinity (ii) The administrator is told that BGP does not suffer from this problem. What prevents BGP from having this problem? path-vector 6 4. Link-state routing(16 points) This question deals with link state routing on the network shown below. Assume that the distances shown in the figure do not change over time. Again, this problem uses rounds as in problem 3. At the start of the first round, nodes only know of the links to their neighbors. In the first phase of a round, nodes send their neighbors their own Link State Packet (LSP) and all LSPs they have received. Node x's LSP contains “this LSP is from x, and x's neighbors are … with costs ...”. In the second phase, the nodes calculate shortest paths based on their current knowledge. a. List the LSP’s (by host name) held by host A at the beginning of rounds 1,2,3,4. b. Note that although the measured distances in the figure are the same in both directions, the link state algorithm may NOT assume such to be the case when calculating routes. With this fact in mind, show host A’s routing table as a list of (destination, next host, distance) 3-tuples after route recalculation at the beginning of rounds 1,2,3,4. a. round 1: F, B round 2: F, B, G, C round 3: F, B, G, C, D round 4: F, B, G, C,D,E,H (also get full points if you write: round 1: A, round 2: A F B round 3: A F B G C round 4: A F B G C D ) b. 7 Round 1: B C D ∞ E ∞ F ∞ G H ∞ 5 ∞ 1 Round 2 B C D E ∞ 4 ∞ F G 5 3 F G 4 3 F G 4 3 F G 4 3 H ∞ 1 Round3 B C D E ∞ 4 ∞ H ∞ 1 Round4 B C 4 D E 8 ∞ H ∞ 1 B also correct if you go one round further and include: C D E 4 8 9 H 11 1 8 5. Forwarding table and Classless Inter-domain Routing (CIDR) (16 points) Suppose a router has built up the routing table shown below. The first four lines are for CIDR addresses, with “/22” indicating a mask of 22 1's followed by 10 0's. Net/Masklength 128.174.252.0/22 128.174.242.128/25 128.174.252.0/23 128.174.242.0/25 128.174.242.7 Default NextHop R1 Interface 1 R2 Interface 0 Interface 2 R3 a. How many individual IP addresses match each of the Net/Masklength pairs, including the IP addresses for the network address and the broadcast address? For simplicity, ignore the fact that there is some overlap. The number of host address possible is determined by the number of bits available for host addressing (i.e. not used in the network mask). So the formula would be 2x (where x = 32 bits <net mask length>). Net/Masklength 128.174.252.0/22 128.174.242.128/25 128.174.252.0/23 128.174.242.0/25 128.174.242.7 Hosts 210 = 1024 hosts 27 = 128 hosts 29 = 512 hosts 27 = 128 hosts 20 = 1 host b. The router can deliver packets directly over interfaces 0, 1 or 2, or it can forward to routers R1, R2, or R3 according to the table below. Specify the next hop for each of the following destinations. Remember that if a destination matches more than one line of the table, the longest match is used. Net/Masklength 128.174.252.0/22 128.174.242.128/25 128.174.252.0/23 128.174.242.0/25 128.174.242.7 default NextHop R1 Interface 1 R2 Interface 0 Interface 2 R3 Binary address (net mask in BOLD) 10000000 10101110 11111100 00000000 10000000 10101110 11110010 10000000 10000000 10101110 11111100 00000000 10000000 10101110 11110010 00000000 10000000 10101110 11110010 00000111 i. 128.174.254.252 Binary address: 10000000 10101110 11111110 11111100 Matches Entry 1: Next Hop R1 ii. 128.174.251.134 9 Binary address: 10000000 10101110 11111011 10000110 No Match: Next Hop R3 iii. 128.174.242.7 Binary address: 10000000 10101110 11110010 00000111 Matches Entries 4 and 5: Next Hop Interface 2 (Entry 5 is longer match) iv. 128.174.242.135 Binary address: 10000000 10101110 11110010 100000111 Matches Entry 2: Next Hop Interface 1 v. 128.174.255.0 Binary address: 10000000 10101110 11111111 00000000 Matches Entry 1: Next Hop R1 10 11 6. Channel rate and shared media(8 points) You are entrusted with the design of a network to interconnect a set of geographically distributed hosts within your corporation. You have decided to use a copper-based, switched network. The technology has the following properties: 5MHz signal bandwidth, 511 SNR at transmitter. What link bandwidth is possible according to Shannon's Law for this network? C = B*log2(1+S/N) = 5MHz * log2(512) = 45Mbps Using the copper-based network with an 8-point QAM encoding, what modulation rate (baud) is necessary to obtain the bandwidth found in part a)? 8 point – 3 bits 45Mbps / (3 bits/symbol) = 15 Mbaud 12 7. Interdomain routing(8 points) Consider the network shown below. Suppose AS3 and AS2 are running OSPF for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP for their intra-AS routing protocol. Suppose eBGP and iBGP are used for the inter-AS routing protocol. Initially suppose there is no physical link between AS2 and AS4. a. b. c. d. Router 3c learns about prefix x from which routing protocol: OSPF, RIP, eBGP, or iBGP? Router 3a learns about x from which routing protocol? Router 1c learns about x from which routing protocol? Router 1d learns about x from which routing protocol? a. eBGP b. iBGP c. eBGP d. iBGP 13 8. Policy dispute(8 points) This question deals with policy dispute which was discussed in class. Consider the network shown below. Suppose we are concerned with Prefix P in ISP D. The link prices connecting each pair of ISPs are presented in the above figure as well the local preference of ISP A, ISP B, and ISP C. Describe what would happen if we run BGP on this topology. If you need to draw arrows on the graph to illustrate your opinion, please draw them clearly to help us identify. Just a suggestion, it’s probably helpful for us to understand your answer better if you perform your analysis based on rounds or stages. But you are definitely not required to do so. First, ISP D advertise its distance to Prefix P to ISP A, B, and C. ISP A, B, and C learned the direct connections to ISP D to connect to Prefix P. And each ISP (A, B and C) advertises their distance to other ISPs. Second, after receiving new routes, ISP A, B, and C discard the direct connections and chose their neighbors (e.g. A chose C) in order to connect to ISP D since policies are used to choose routes in BGP. This leads to the problem that there are no direct routes to ISP D anymore. Next, each ISP advertises their updated routes. Eventually, loops appeared in each ISP. For example, A-C-B-A-D-P. BGP kills a route when there is a loop. So the update will be advertised, and each ISP will finally go back with only choosing direct connections. And the above processes are going to repeat. 14