You are on page 1of 2

In the name of God

Sharif University of Technology


Department of Computer Engineering
CE 443: Computer Networks
Mehdi Kharrazi Farvardin 21st, 1389

Homework 1
Solutions

Part I
1. Let’s assume that you are an ISP which has been assigned 6 Class B addresses (i.e. IP range
from 128.20.0.0 to 128.25.0.0). You have 5 customers, each requiring 2K, 3K, 10K, 50K, and
100K IP addresses. What address space would you assign to each customer? What percentage
of this assigned IP range is wasted? Assume than you have a new customer (your 6th customer)
requiring 1K IP addresses, what IP range will you assign to this new customer?
Solution:
As stated in class, assume that the ISP can not break the class B addresses to smaller ranges,
then we will have:

• 2K −→ 1 class B −→ 128.20.0.0 −→ wastage = 65536 − 2000 = 63536


• 3K −→ 1 class B −→ 128.21.0.0 −→ wastage = 65536 − 3000 = 62536
• 10K −→ 1 class B −→ 128.22.0.0 −→ wastage = 65536 − 10000 = 55536
• 50K −→ 1 class B −→ 128.23.0.0 −→ wastage = 65536 − 50000 = 15536
• 100K −→ 2 class B −→ 128.24.0.0 to 128.25.0.0 −→ wastage = 2×65536−100000 = 31072

Wastage in the assigned space = (63536+62536+55536+15536+31072)


6∗65536 = 58.04%
We will not be able to assign any IP range to the 6th customer.

2. We are trying to send out 900 Bytes of data from node A to node E. We have the following
topology: A—B—C—D—E. Assume that the link connecting A to B has a MTU of 1020
Bytes, B to C has a MTU of 470 Bytes, C to D has a MTU of 520 Bytes, and D to E has a
MTU of 320 Bytes. Assume that the IP header is 20 Bytes. How many packets will be received
by E? For each received packet provide the following information in each of the following fields:
ID, Fragmentation bit, Fragmentation offset.
Solution:

Packet Payload(B) ID DF MF Offset


A to B:
1 900 x 0 0
Packet Payload(B) ID DF MF Offset
1 448 x 0 1 0
B to C:
2 448 x 0 1 56
3 4 x 0 0 112
CE 443 — Farvardin 21st, 1389 Homework 1Solutions 2

Packet Payload(B) ID DF MF Offset


1 448 x 0 1 0
C to D:
2 448 x 0 1 56
3 4 x 0 0 112
Packet Payload(B) ID DF MF Offset
1 296 x 0 1 0
2 152 x 0 1 37
D to E:
3 296 x 0 1 56
4 152 x 0 1 93
5 4 x 0 0 112

3. Draw the congestion window as a function of time (Consider linear increase and multiplicative
decrease plus slow start). Assume initial window size is 1 mss (at round 0). A triple duplicate
ACK occurs at round 2 and 13, a packet loss happens at round 9 and 17. Draw the curve up
to round 22.

4. Assume that TCP only allows window sizes up to 64KB. Suppose that you are running TCP
over a 100Mbps link with a latency of 100ms to transfer a 5-MB file, and the TCP receive
window is 64KB. If TCP sends 0.5-KB packets (assuming no congestion and no lost packets):
• How many RTTs does it take until slow start opens the send window to 64KB? Solution:
0.5KB ∗ 2i ≤ 64KB ⇒ i = 7RT T s required.
• How many RTTs does it take to send the file? Solution: For the first 7 RTTs we have
(.5 + 1 + 2 + 4 + 8 + 16 + 32) = 63.5KB, and after that we have 64KB of data sent in
20
−63.5∗210
each RTT. Hence we have 5M B−63.5KB
64KB = 5∗2 64∗2 10 = 79.0078 ≈ 80 ⇒ we require
80 + 7 = 87RT T s to transmit a 5MB file.
• If the time to send the file is given by the number of required RTTs multiplied by the link
latency, what is the effective throughput for the transfer? What percentage of the link
5M B∗8
bandwidth is utilized? Solution: 87∗100ms = 40M b 4.59
8.7s = 4.59M bps. Therefore 100 = 4.59%
utilization.

You might also like