DCN · Assignment 2 MM = 20

Data Communication Network

Assignment 2 · 7 Problems · Subnetting, TCP Congestion Control, UDP/RTP & Throughput

Question 1 IPv4 Subnetting

A network 192.168.1.0/24 is divided into 4 subnets. Find the new subnet mask and number of hosts per subnet.

Bits borrowed 4 subnets = 2² → borrow 2 bits → new prefix = /26
Subnet mask 11111111.11111111.11111111.11000000 = 255.255.255.192
Hosts / subnet Host bits h = 32 − 26 = 6 → 2⁶ − 2 = 64 − 2 = 62
New Subnet Mask 255.255.255.192 (/26)
Usable Hosts / Subnet 62
Question 2 Class B Subnetting

The address of a Class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet?

Class B split 16 network bits, 16 default host bits → subnet bits s = 6, remaining host bits h = 16 − 6 = 10
Max subnets 2⁶ = 64 (or 2⁶ − 2 = 62 excluding all-0s & all-1s per RFC 950)
Max hosts 2¹⁰ − 2 = 1024 − 2 = 1,022 per subnet
Max Subnets 64 (62 per RFC 950)
Max Hosts / Subnet 1,022
Question 3 TCP Slow Start

Consider the effect of using slow start on a line with a 10 msec RTT and no congestion. The receiver window is 24 KB and the maximum segment size is 2 KB. How long does it take before the first full window can be sent?

Parameters RTT = 10 ms, rwnd = 24 KB, MSS = 2 KB → Full window = 24 / 2 = 12 MSS
Time (ms) RTT # cwnd (MSS) Window Sent (KB)
0012 KB
10124 KB
20248 KB
303816 KB
40412 (capped)24 KB (Full)

Note: If an initial threshold of ssthresh = rwnd/2 = 6 MSS is assumed, cwnd grows 1 → 2 → 4 → 6 → 7 → 8 → 9 → 10 → 11 → 12 MSS (9 RTTs = 90 ms).

Time to First Full Window 40 ms (4 RTTs)
Question 4 TCP AIMD

Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of slow start phase is 2 MSS and the threshold at the start of first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of tenth transmission.

Tx # Start cwnd Phase / Event End cwnd ssthresh
12 MSSSlow Start (×2)4 MSS8
24 MSSSlow Start (×2)8 MSS8
38 MSSCongestion Avoidance (+1)9 MSS8
49 MSSCongestion Avoidance (+1)10 MSS8
510 MSSTimeout → ssthresh = 10/2, cwnd = 11 MSS5
61 MSSSlow Start (×2)2 MSS5
72 MSSSlow Start (×2)4 MSS5
84 MSSSlow Start (capped at ssthresh)5 MSS5
95 MSSCongestion Avoidance (+1)6 MSS5
106 MSSCongestion Avoidance (+1)7 MSS5
cwnd at End of 10th Transmission 7 MSS
Question 5 Timeout Recovery

Suppose that the TCP congestion window is set to 18 KB and a timeout occurs. How big will the window be if the next four transmission bursts are all successful? Assume that the MSS is 1 KB.

On timeout ssthresh = 18 / 2 = 9 KB, cwnd resets to 1 MSS = 1 KB
Burst Sent (Start cwnd) Rule New cwnd
11 KBSlow Start (×2)2 KB
22 KBSlow Start (×2)4 KB
34 KBSlow Start (×2)8 KB
48 KBCapped at ssthresh (9 KB)9 KB
Window After 4 Successful Bursts 9 KB (9 MSS)
Question 6 UDP & RTP Rates

A video application uses UDP to transmit packets of 1,200 bytes at 800 packets/sec. Sender: 192.168.10.15, port 5000; Receiver: 172.16.5.20, port 6000.

a) Sockets Source = 192.168.10.15:5000 · Destination = 172.16.5.20:6000
b) Payload rate 1,200 B × 8 bits × 800 pps = 7,680,000 bps = 7.68 Mbps
c) +8 B UDP hdr (1,200 + 8) B × 8 bits × 800 pps = 7,731,200 bps = 7.7312 Mbps
d) +12 B RTP hdr (1,200 + 8 + 12) B × 8 bits × 800 pps = 7,808,000 bps = 7.808 Mbps
(a) Sockets 192.168.10.15:5000 → 172.16.5.20:6000
(b) UDP Payload 7.68 Mbps
(c) With UDP Hdr 7.7312 Mbps
(d) With RTP + UDP 7.808 Mbps
Question 7 TCP Throughput

A TCP connection has RTT = 80 ms, receiver window = 64 KB, and segment size = 1,000 bytes (cumulative ACKs, no packet loss).

a) Max segments rwnd = 64 × 1,024 = 65,536 B → ⌊65,536 / 1,000⌋ = 65 segments (64 if 1 KB = 1,000 B)
b) Max throughput (65,536 × 8 bits) / 0.08 s = 6,553,600 bps = 6.5536 Mbps
c) 5 MB file time 5 MB = 5 × 1,024² B = 5,242,880 B → (5,242,880 × 8) / 6,553,600 = 6.4 s
d) cwnd (4 RTTs) Initial = 4 segs → 4 × 2⁴ = 64 segments (4 → 8 → 16 → 32 → 64; ≤ 65 rwnd)
(a) Max Segments 65 segments
(b) Throughput 6.5536 Mbps
(c) 5 MB Time 6.4 s
(d) After 4 RTTs 64 segments