CS242 Computer Networks Handout # 16 Randy Shull November 9, 2017 Wellesley College Problem Set 8 Due: Start of Class, November 16 Reading: Kurose & Ross, Sections 4.1-4.4 Problem 1 [10]: Short answer in a couple of sentences. Answer each of the following questions a [2]: Routing/Forwarding That is the difference between routing and forwarding? b [2]: Routers Do routers have IP addresses? If so, how many? c [2]: IP Addresses What is the 32-bit binary equivalent of the IP address 223.1.3.27? d [2]: Interfaces Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP segment sent from the source host to the destination host will travel over how many interfaces? How many forwarding tables will be indexed to move the datagram from the source to the destination? e [2]: Packet Headers Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will be overhead, and what percentage will be application data? Problem 2 [4]: Switching Fabric In Section 4.2, we noted that there can be no input queuing if the switching fabric is n times faster than the input line rates, assuming n in put lines all have the same line rate. Explain why this should be so. 1
Problem 3 [6]: Forwarding Tables Consider the datagram network using 32-bit host addresses. Suppose a router has four links, number 0 3, and packets are to be forwarded to the link interfaces as follows: Destination Address Range Link Interface 11100000 00000000 000000000 00000000 11100000 11111111 11111111 11111111 0 11100001 00000000 00000000 00000000 11100001 00000000 11111111 11111111 1 11100001 00000001 00000000 00000000 11100001 11111111 11111111 11111111 2 otherwise 3 a [3]: Longest-Prefix Matching Provide a forwarding table that has four entries, uses longest-prefix matching, and forwards packets to the correct link interfaces. b [3]: Link Interfaces Describe how your forwarding table determines the appropriate link interface for datagrams with destination address: 11001000 10010001 01010001 01010101 11100001 00000000 11000011 00111100 11100001 10000000 00010001 01110111 Problem 4 [6]: Subnetworks Consider the topology shown in Figure 4.20 of the text (equivalent figure 4.17 from 6th edition reproduced below). Denote the three subnets with host (starting clockwise at 12:00) as Networks A, B, and C. Denote the subnets without hosts as Networks D, E, and F. 2
a [3]: Networks Addresses Assign network address to each of these six subnets, with the following constraints: All addresses must be allocated from 214.97.254/23; Subnet A should have enough addresses to support 250 interfaces; Subnet B should have enough addresses to support 120 interfaces; and subnet C should have enough address to support 120 interfaces. Of course, subnets D, E, and F should each be able to support two interfaces. For each subnet, the assignment should take the form a.b.c.d/x - e.f.g.h/y. b [3]: Forwarding Tables Using your answer to part (a), provide the forwarding tables (using longest prefix matching) for each of the three routers. Problem 5 [4]: Fragmentation Consider sending a 3000-byte datagram into a link that has an MTU of 500 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated? What are their characteristics? Problem 6 [6]: Dijksta s shortest-path algorithm Consider the following network. With the indicated link costs, use Dijkstas shortest-path 3
algorithm to compute the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to Table 4.3 in the text. Problem 7 [6]: Distance vector algorithm Consider the network shown below, and assume that each node initially knows the costs to each of its neighbors. Consider the distance vector algorithm and show the distance table entries at node z. Problem 8 [3]: BGP Describe how loops in paths can be detected in BGP. Problem 9 [14]: Intra-AS versus inter AS-routing 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 4
intra-as routine protocol. Suppose ebgp and ibgp are used for the inter- AS routing protocol. Initially suppose there are no physical link between AS2 and AS4. a [2] Router 3c learns about prefix x from which routing protocol: OSPF, b [2] Router 3a learns about prefix x from which routing protocol: OSPF, c [2] Router 1c learns about prefix x from which routing protocol: OSPF, d [2] Router 1d learns about prefix x from which routing protocol: OSPF, e [2] Once router 1d learns about x it will put an entry (x, I) in its forwarding table. Will I be equal to I 1 or I 2 for this entry? Explain why in one sentence. f [2] Now suppose that there is a physical link between AS2 and AS4, shown by the dotted line. Suppose router 1d learns that x is accessible via AS2 as well as via AS3. Will I be set to I 1 or I 2? Explain why in one sentence. g [2] Now suppose that there is another AS called AS5, which lies on the path between AS2 and AS4 (not shown in the diagram). Suppose router 1d learns that x is accessible via AS2 AS5 AS4 as well as via AS3 AS4. Will I be set to I 1 or I 2? Explain why in one sentence. 5