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 email@example.com.
1. [Modified from Comer 21.11] Suppose you are an ISP that owns a /22 address block, 22.214.171.124/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:
126.96.36.199/26 (which would cover the range 188.8.131.52 to 184.108.40.206)
220.127.116.11/26 (which would cover the range 18.104.22.168 to 22.214.171.124)
126.96.36.199/26 (which would cover the range 188.8.131.52 to 184.108.40.206)
220.127.116.11/26 (which would cover the range 18.104.22.168 to 22.214.171.124)
(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
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: 126.96.36.199
(b) What is the next hop for a packet with destination IP address: 188.8.131.52
(c) What is the next hop for a packet with destination IP address: 184.108.40.206
(d) Using CIDR notation, how would you represent a network with the range of addresses 220.127.116.11 to 18.104.22.168?
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.
The TTL field in the datagram is decremented by one each time
is forwarded by a router. Thus, a datagram in a routing loop will
eventually have its TTL field decremented to 0, and the datagram will
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.
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?
7. (2 points) Consider the NAPT translation table below, which
is a corrected version of Figure 23.13 of the
(p.399). From the perspective of the host 192.168.0.1, what are the IP
of the two endpoints of the TCP connection between itself and the web
located on the Internet? From the perspective of the web server, what
the IP addresses of the two endpoints of the TCP connection? Assume
that the IP address of the web server is 22.214.171.124.
192.168.0.1 uses endpoint addresses 192.168.0.1 and 126.96.36.199, while
188.8.131.52 uses endpoints 184.108.40.206 and 220.127.116.11.