Home Announcements Schedule Assignments

## IS250 Computer Based Communications Networks and Systems

Spring 2010

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.

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.

4. (2 points) [Comer 22.10] Assume two routers are misconfigured to form a routing loop for some destination D. Explain why a datagram destined for D will not go around the loop forever.

The TTL field in the datagram is decremented by one each time it 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 then be discarded.

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
packet 2: ID=124, LEN=700

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:
LEN: packet length
ID: packet identifier
MF: more fragments bit
Offset: fragment offset (in units of 8 bytes)

 A to R1 LEN ID MF Offset 300 123 1 0 120 123 0 35 300 124 1 0 300 124 1 35 140 124 0 70
 R1 to R2 LEN ID MF Offset 300 123 1 0 120 123 0 35 300 124 1 0 300 124 1 35 140 124 0 70
 R2 to B LEN ID MF Offset 196 123 1 0 124 123 1 22 120 123 0 35 196 124 1 0 124 124 1 22 196 124 1 35 124 124 1 57 140 124 0 70

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.

 Dir. Fields Old Value New Value out IP SRC:TCP SRC 192.168.0.1:30000 128.10.24.6:40001 out IP SRC:TCP SRC 192.168.0.2:30000 128.10.24.6:40002 in IP DEST: TCP DEST 128.10.24.6:40001 192.168.0.1:30000 in IP DEST: TCP DEST 128.10.24.6:40002 192.168.0.2:30000

192.168.0.1 uses endpoint addresses 192.168.0.1 and 1.2.3.4, while 1.2.3.4 uses endpoints 1.2.3.4 and 128.10.24.6.