This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. RossChapter 4 - Review QuestionsHomework Problems and QuestionsSections 4.1- 4.41. What are the two main functions of a datagram-based network layer? What additional functions does aVC-based network layer have?2. List and describe the ATM network service models.3. Compare and contrast link-state and distance-vector routing algorithms.4. Discuss how a hierarchical organization of the Internet has helped to millions of users.5. Is it necessary that every autonomous system use the same intra-auto: system routing algorithm? Why orwhy not?Section 4.56. What is the 32-bit binary equivalent of the IP address 188.8.131.52?7. Consider a LAN to which 10 host interfaces and three router interface attached. Suppose all three LANsuse class C addresses. The IN addre the 13 devices will be identical in which of the first 32 bits?8. Consider a router with three interfaces. Suppose all three interfaces use class C addresses. Will the IPaddresses of the three interfaces necessarily have the same first eight bits?9. Suppose there are three routers between source and destination hosts. Ignoring fragmentation, an IPsegment sent from source host to destination host will travel over how many interfaces? How many routingtables will be indexed to move the datagram from source to destination?10. Suppose an application generates chunks of 40 bytes of data every 20 msec. and each chunk getsencapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will beoverhead and what percentage will be application data?11. Consider sending a 3000 byte datagram into a link that has an MTU of 500 bytes. Suppose the originaldatagram is stamped with the identification number 422. How many fragments are generated? What are theircharacteristics?1Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. Ross12. Consider Figure 4.27. Starting with the original table in D, suppose that D receives from A the followingadvertisement:_______________________________________________________________________________________Destination NetworkNext RouterNumber of Hops to DestinationZWX....C....1011....Will the table in A change? If so how?13. Contrast and compare the advertisements used by RIP and OSPF.14. RIP adv ertisements typically announce the number of hops to various destinations. BGP updates, on theother hand, announce the ___________________________(fill in the blank) to the various destinations.15. Why are different inter-AS and intra-AS protocols used in the Internet?Section 4.616. Describe three different types of switching fabrics commonly used in packet switches.17. Why are buffers needed at the output ports of switches? Why are buffers needed at the input port ofswitches?Section 4.718. Compare and contrast the IPv4 and the IPv6 header fields. Do they have am fields in common?19. It has been said that when IPv6 tunnels through IPv4 routers, IPV6 tre IPv4 tunnels as link-layerprotocols. Do you agree with this statement why not?Section 4.820. What is an important difference between implementing the multicast a via multiple unicasts, and asingle network (router) supported multicast group?21. True or False: When a host joins a multicast group, it must change its IP adress to be that of themulticast group it is joining.22. What are the roles played by the IGMP protocol and a wide-area multicast routing protocol?23. What is the difference between a group-shared tree and a source-based tree in the context of multicastrouting?2Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. Ross24. True or False: In reverse path forwarding, a node will receive multiple of the same packet. True orFalse: In reverse path forwarding, a node may forward multiple copies of a packet over the same outgoinglink.25. Classify each of the following multicast routing algorithms as either a based tree approach or agroup-shared tree approach: DVMRP, MOSPF, CBT, PIM Sparse Mode, PIM Dense Mode.Problems1. Let us consider sorne of the pros and cons of a connection-oriented versus connectionless architecture.a. Suppose that in the network layer, routers were subjected to "stressfull conditions that might causethem to fail fairly often. At a high level, what actions would need to be taken on such router failure. Doesthis argue for a connection-oriented or a connectionless environment?b. Suppose that in order to provide a guarantee regarding the level of performance (e.g., delay) that wouldbe seen along a source-to-destintion path, the network requires a sender to declare its peak traffic rate. Ifthe declared peak traffic rate and the existing declared traffic rates that have been declared are such thatthere is no way to get traffic from the source to the destination that meets the required delayrequirements, the source is not allowed access to the network. Would such an approach be more easilyaccomplished within a connection-oriented or connectionless paradigm?2. In Figure 4.4, enumerate the paths from A to F that do not contain any loops.,3. Consider the following network. With the indicated link costs, use Dijkstra`s shortest path algorithm tocompute the shortest path from F to all networknodes. Show how the algorithm works by computing a tablesimilar to Table 4.2.H2144BG31912DF114C1E33AExercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. Ross4. Consider the network shown below and assume that each node initially knows the costs to each of itsneighbors. Consider the distance vector algorithm and show the distance table entries at node E.1AB52E21510CD15. Consider a general topology (i.e., not the specific network shown above) and a synchronous version of thedistance vector algorithm. Suppose that at each iteration, a node exchanges its minimum costs with itsneighbors and receives their minimum costs. Assuming that the algorithm begins with each node knowingonly the costs to its immediate neighbors, what is the maximum number of iterations required until thedistributed algorithm converges? your answer.6. Consider the network fragment shown below. X has only two attached minimum-cost W and Y. W has aminimum-cost path to destination A of 5 and Y has a minimum-cost path to A of 6. The complete paths fromW and Y to A (and between W and Y) are not shown. All link costs in the network have stricly positiveinteger values.W1XY4a. Give X's distance table (row) entries for destinations X, Y, and A.b. Give a link-cost change for either c(X,W) or c(X,Y) such that X will inform its neighbors of a newminimum-cost path to A as a result of execting lines 15 and 24 of the distance vector algorithm.c. Give a link-cost change for either c(X, W) or c(X,Y) such that X will not inform its neighbors of a newminimum-cost path to A as a result of execut lines 15 and 24 of lhe distance vector algorithm.7. Compute the distance tables for X, Y, and Z shown in the rightmost column of Figure 4.7. After thecomputation of the new distance tables, which nodes send which updated values to which neighbors?8. Consider the three-node topology shown in Figure 4.7. Rather than having the link costs shown in Figure4.7, the link costs are c(X,Y) = 5, c(Y,Z) = 6, c(Z,X) = 2. Compute the distance tables after the initializationstep and after each iteration of a synchronous version of the distance vector algorithm (as we did in ourearlier discussion of Figure 4.7.)4Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. Ross9. Consider the eight-node network (with nodes labeled A-H) above. Show the minimal-cost spanning treerooted at A that includes (as end hosts) nodes C, D, E, and G. Informally argue why your spanning tree is aminimal-cost spanning tree.10. We saw in Section 4.8 that there is no network-layer protocol that can be used to identify the hostsparticipating in a multicast group. Given this, how can multicast applications learn the identities of the hoststhat are participating a multicast group?11. Consider the two basic approaches identified toward achieving multicast: unicast emulation andnetwork-layer multicast. Consider a single sender and 32 receivers. Suppose the sender is connected to thereceiver through a binary tree of routers. What is the cost of sending a multicast packet, in the case ofunicast emulation and network-layer multicast, for this topology? Here, each time a packet (or copy of apacket) is sent over a single link, it incurs a unit of "cost. What topology for interconnecting the sender,receivers, and routers will bring the cost of unicast emulation and true network-layer multicast as far apart aspossible.? You can choose as many routers as you'd like.12. Design (give a pseudocode description of) an application-level protocol that maintains the host addressesof all hosts participating in a multicast group. Specifically identify the network service (unicast or multicast)that is used by your protocol, and indicate whether your protocol is sending messages in-band or out-of-hand(with respect to the application-data flow among the multicast group participants), and why.13. Consider the topology from Figure 4.50. Suppose the link cost from B to D changes from 1 to 10. Findthe Steiner tree that connects all of the shaded routers. (Note: You are not being asked here to program asolution to the Steiner tree problem. Instead, you should be able to construct the minimumcost tree byinspection and informally convince yourself that it is the minimum tree). If you were asked (you are notbeing asked to actually do so!), how would you prove that your tree is indeed a minimum cost tree?14. Center-based routing. Consider the topology shown in Figure 4.50. Suppose node C is chosen as thecenter in a center-based multicast routing algorithm. Assuming that each attached router in the multicastgroup uses its least-cost path to node C to send join messages to C, draw the resulting center-based multicastrouting tree. Is the resulting tree a minimumcost Steiner tree? Justify your answer.I5. Least unicast-cost path routing. Consider Figure 4.50. Suppose that node E is chosen as the source.Compute the least unicast-cost path multicast routing tre from E to multicast routers A, B, and F.16. Reverse path forwarding. Consider the topology and link costs shown in Figure 4.50 and suppose thatnode E is the multicast source. Using arrows like those shown in Figure 4.53, indicate links over whichpackets will be forwarded using RPF, and links over which packets will not be forwarded, given that node Eis the source.17. Suppose that the cost of transmitting a multicast packet on a link is completely independent of the cost oftransmitting a unicast packet on a link. Will reverse path forwarding still work in this case? Justify youranswer.18. Traffic concentration in center-based trees. Consider the simple topology shown in Figure 4.50. Supposethat each of the multicast routers receive one unit of traffic per unit of time from an attached host. Thistraffic must be forwarded to the other three multicast routers. Suppose that node C is chosen as the centernode in a conter-based, multicast routing protocol (soe homework problem above). Given the resultingrouting tree, compute the rate of traffic on cach link in the topology. (Compute the total amount of traffic oneach link, regardless of the direction of the traffic flow). Suppose next that RPF is used to build foursource-specific routing trees rooted at each of the routers A, B, E, F. Recompute the rate of traffic on each of5Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. Rossthe links in this second scenario. In this example, does a conter-based tree or source-specific tree tend toconcen traffic?19. Suppose that a network has G multicast groups, each with S group members (hosts), each of which canbe a sender. Under DVMRP, each router must thus maintain up to S pieces of routing information (theoutgoing link on the shortest reverse path to the sender, for each of the S senders) for each group. Thus, inthe worst case, each router must maintain S*G pieces of routing information, when taking all groups intoaccount. What is the worst-case amount of routing information needed by MOSPF, PIM Sparse Mode, andPIM Dense Mode? Justify your answers.20. Birthday problem. What is the size of the multicast address espace? Suppose now that two differentmulticast groups randomly choose a mulficast address. What is the probability that they choose the sameaddress? Suppose now that 1000 multicast groups are ongoing at the same time and chose their multicastgroup addresses at random. What is the probability that they interfere with each other?21. Recall that in our discussion of multicast tunneling, we said that an IP multicast datagram is carriedinside of an IP unicast datagram. How does the IP router at the end of the multicast tunnel know that theunicast datagram contains an IP multicast datagram (as opposed to simply being na IP unicast datagram thatshould be forwarded along)?Discussion Questions1. Suppose AS X and Z are not directly connected but instead connected by AS Y. Further suppose that Xhas a peering agreement with Y, and that Y has a peering agreement with Z. Finally, suppose that Z wants totransit all of Y's traffic but does not want to transit X's traffic. Does BGP allow Z to implement this policy?2. In Section 4.7, we indicated that deployment of IPv6 has been slow to date. Why has it been slow? Whatis needed to accelerate its deployment? (See article by L. Garber.)3. In Section 4.8.1 we saw that the multicast abstraction can be implemented by having a sender open anindividual connection to each of the receivers. What are the drawbacks of this approach compared to theapproach that provides native multicast support at the network layer? What are the advantages of thisapproach?4. In Section 4.8 we identified a number of multicast applications. Which of these applicatons arewell-suited for the minimalist Internet multicast service model? Why? Which applications are notparticularly well-suited for this service model?5. Given the CBT soft-state mechanism for maintaining a tree, why do you think these is a separate FLUSH_TREE message? What would happen if the FLUSH_TREE message were lost?6Exercises- CHAPTER 4 - Computer Networking: A Top-Down Approach Featuring the InternetJames F. Kurose & Keith W. RossProgramming AssignmentIn this third programamming assignment, you will be writing a "distributed set of procedures thatimplement a distributed asynchronous distance vector routing for the network shown beloow:013731212You are to write the following routines that will execute asynchronously within the emulated environmentprovided for this assignment. For node 0, you will write the routines:rtinit0( ) This routine will be called once at the beginning of the emulation. Rtinit0( ) has no arguments. Itshould initialize your distance table in node 0 to reflect the direct costs of I, 3, and 7 to nodes 1, 2, and 3,respectively. In the figure above, all links are bi-directional and the costs in both directions are identical.After initializing the distance table, and any other data structures needed by your node 0 routines, itshould then send its directly connected neighbors (in this case, 1, 2, and 3) the cost of its minimum-costpaths to all other network nodes. This minimum cost information is sent to neighboring nodes in arouting update packet by calling the routine tolayer2( ), as described in the full assignment. The formalof the routing update packet is also described in the full assignmentrtupdate( ) (struct rtpkt *rcvdpkt). This routine will be called when node 0 receives a routing packet thatwas sent to it by one if its directly connected neighbors. The parameter *rcvdpkt is a pointer to thepacket that was received. rtupdate0( ) is the heart" of the distance vector algorithm. The values itreceives in a routing up, date packet from some other node i contain i's current shortest-path costs to allother network nodes. rtupdate0( ) uses these received values to update its own distance table (asspecified by the distance vector algorithm). If its own minimum cost to another node changes as a resultof the update, node 0 informs its directly connected neighbors of this change in minimum cost bysending them a routing packet. Recall that in the distance vector algorithm, only directly connectednodes will exchange routing packets. Thus, nodes 1 and 3 will communicate with each other.Similar routines are defined for nodes 1, 2, and 3. Thus, you will write eight proce in all: rtinit0( ), rtinit1( ),rtinit2( ), rtinit3( ), rtupdate0( ), rtupdate1( ), rtupdate2( ), rtupdate3( ). These routines will togetherimplement a distributed, asynchronous com of the distance tables for the topology and costs shown in thefigure on the previous page.You can find the full details of the programming assignment, as well as C code that you will need to createthe simulated hardware/software environment at http://ww.awl.com/kurouse-ross.7...
View Full Document
- Spring '08