|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Assignment 4 Solutions Assignment 4 is due at 2pm (before start of
class) on Thursday 3/18. Please see grading
policy on course
homepage for additional details regarding early/late submissions. Please submit your answers in plain text (no attachments) to i250hw@ischool.berkeley.edu. 1. [Modified from Comer 21.11] Suppose you are an ISP that owns a /22 address block, 128.32.0.0/22. You have four new customers who need 60 IP addresses each. (a) (4 points) Propose an allocation for each of the customers, expressing the allocation using CIDR notation. First, a sanity check -- since the prefix size is 22 bits, that means the host-id's are 10 bits long, and the ISP can support 2^10 or 1024 computers (ignoring reserved addresses). So we can accommodate four customers with 60 computers each. 60 computers can fit within a /26 block. A possible allocation might be: 128.32.0.0/26 (which would cover the range 128.32.0.0 to 128.32.0.63) 128.32.0.64/26 (which would cover the range 128.32.0.64 to 128.32.0.127) 128.32.0.128/26 (which would cover the range 128.32.0.128 to 128.32.0.191) 128.32.0.192/26 (which would cover the range 128.32.0.192 to 128.32.0.255) (b) (2 points) What would be the corresponding netmask (in dotted decimal notation) for each of the customers? If each customer is given a /26 block, then each of them should have a netmask with 26 1's, followed by 6 0's, which is 255.255.255.192 in dotted decimal notation. 2. (4 points) A routing table contains the following four entries: Destination IP Next Hop ============== ======== 128.32.0.0/16 A 128.32.226.0/23 B 128.32.226.0/24 C 128.32.226.0/25 D The router employs the "longest-prefix match" method for determining the appropriate next hop for each packet that it receives. (a) What is the next hop for a packet with destination IP address: 128.32.226.187 C (b) What is the next hop for a packet with destination IP address: 128.32.227.187 B (c) What is the next hop for a packet with destination IP address: 128.32.228.187 A (d) Using CIDR notation, how would you represent a network with the range of addresses 128.32.227.80 to 128.32.227.95? 128.32.227.80/28 3. (2 points) [Comer 22.7] If a datagram contains one 8-bit option and one 8-bit data value, what values will be found in the header fields H LEN and TOTAL_LENGTH? The option field will be padded to 32 bits long. Therefore, the H LEN field will have a value of 6, and the TOTAL LENGTH field will have a value of 25.
5. (6 points) Hosts A and B are connected via three networks and two routers (R1 and R2). Host A wants to send two IP packets to Host B. Each network has its own MTU as shown in the figure. The identification and length of the packets are as follows: packet 1: ID=123, LEN=400 Assume IP headers are 20 bytes long for both packets.
Show how the packets are fragmented along the way by filling out the table with selected fields from the IP header. Use one entry for each fragment. Legend:
6. (1 point) [Comer 23.23] In Figure 23.11, the ISP has
assigned one IP address to the site. Which is the assigned address? 128.210.24.6 7. (2 points) Consider the NAPT translation table below, which
is a corrected version of Figure 23.13 of the
textbook
(p.399). From the perspective of the host 192.168.0.1, what are the IP
addresses
of the two endpoints of the TCP connection between itself and the web
server
located on the Internet? From the perspective of the web server, what
are
the IP addresses of the two endpoints of the TCP connection? Assume
that the IP address of the web server is 1.2.3.4.
|
![]() |