Document 6606355

Transcription

Document 6606355
CS 132 / EECS 148: Computer Networks – Fall 2014 Problem Set 4 Deadline: 11/21 (turn in at the start of lecture) Please show all work for credit. Problem 1 a. What is the 32-­‐bit binary equivalent of the IP address 223.1.3.27? b. Consider a datagram network using 8-­‐bit host addresses. Suppose a router uses longest prefix matching. For each of the four interfaces, give the range of destination host addresses and the number of addresses in the range for the following table: c. Consider a router that interconnects three subnets: Subnet 1, Subnet 2 and Subnet 3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet 1 is required to support at least 60 interfaces, Subnet 2 is to support at least 90 interfaces, and Subnet 3 is to support at least 12 interfaces. Provide three network addresses (of the form A.B.C.D/X) that satisfy these constraints. Problem 2 – Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. Suppose an ISP owns the block of addresses of the form 128.119.40.64/26. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets? Problem 3 a. Consider sending a 2400-­‐byte datagram into a link that has an MTU of 700 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated? What are the values in the various fields in the IP datagram(s) generated related to fragmentation? b. Suppose datagrams are limited to 1500 bytes (including header) between source Host A and destination Host B. Assuming a 20-­‐byte IP header, how many datagrams would be required to send an MP3 consisting of 5 million bytes? Explain how you computed your answer. Problem 4 – Consider the network setup below given in the book. Suppose that the ISP instead assigns the router the address 24.34.112.235 and that the network address of the home network is 192.168.1.0/24. a. Assign new addresses to all interfaces in the home network. b. Suppose each host has two ongoing TCP connections, all to port 80 at host 128.119.40.186. Provide the six corresponding entries in the NAT translation table. Problem 5 – Consider the following network. With the indicated link costs, use Dijkstra’s shortest-­‐path 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 book. Problem 6 – 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 after the algorithm converges.