Docsity

TCP Congestion Control Exam Solutions for CMSC 417 S05 - Prof. A.U. Shankar, Exams of Computer Systems Networking and Telecommunications

Toggle sidebar
bg1
cmsc 417 S05 Exam 1 name:
•Total points 30. Total time 70 mins. 3 problems over 3 pages. No book, no notes, no calculator.
•Sign here to have your exam scores listed on web by last five digits of your UID.
1. [10 pts]
Source TCP
Sink
TCP router queue
This problem deals with TCP congestion control in the scenario shown above. The router queue has a maximum
buffer capacity of 2 packets. Overflow at this queue is the only cause of packet loss. If a packet completes
transmission at the same time as another packet arrives, the transmission is completed just before the packet
arrives. No other traffic uses the link. The link buffer is initially empty.
•The source sends a very large file of size FKB. Packet payload is 1 KB. Source has initial cw (congestion
window size) of 1 packet. The source implements additive-increase multiplicative-decrease (no slow-start)
congestion control: cw is increased by 1when a window is acked, and set to ceiling(cw/2) upon timeout.
•Rtt and rto are constant at Tseconds (rto is just slightly higher rtt).
•The sink sends an ack for every packet received. It can buffer an unlimited number of packets.
Use the window-level model in Note 5 (not the packet-level model) and obtain the following as a function of Fand
T(the skeleton table below is for your convenience):
a. Transfer time (from start until everything is acked).
b. Goodput: number of packets delivered to sink user per second.
b. TxRate: number of packets transmitted by TCP source per second.
SOLUTION
time nr na cw chunks sent queue
0T0 0 1 0 0
1T1 1 2 1,2 1,2
2T3 3 3 3,4,5 3,4 (5 lost)
3T5 5 2 5,6 5,6
4T7 7 3 7,8,9 7,8 (9 lost)
5T9 9 2 9,10 9,10
Rows 4Tand 5Trepeat. So every 2Tseconds, 5 blocks sent and 4 received.
a. Transfer time = F∗T
2seconds
b. Goodput = 2
Tpackets/second
b. TxRate = 5
2∗Tpackets/second
Grading:
•6 points for evolution. 1 point for transfer time. 1 point for goodput. 2 points for TxRate.
•0 points for using packet-level model. Approx −5points for mixing packet-level and window-level models.
−3points for spacing packets in a window by T(instead of spacing windows by T).
•0 points for using slow-start.
• −2points for treating ceiling as floor.
• −2points for wrong cw evolution.
• −2points for mismatch between cw,na, and chunks sent.
1
pf3

Partial preview of the text

Download TCP Congestion Control Exam Solutions for CMSC 417 S05 - Prof. A.U. Shankar and more Exams Computer Systems Networking and Telecommunications in PDF only on Docsity!

cmsc 417 S05 Exam 1 name:

  • Total points 30. Total time 70 mins. 3 problems over 3 pages. No book, no notes, no calculator.
  • Sign here to have your exam scores listed on web by last five digits of your UID.
  1. [10 pts]

Source

TCP Sink

TCP

router queue

This problem deals with TCP congestion control in the scenario shown above. The router queue has a maximum buffer capacity of 2 packets. Overflow at this queue is the only cause of packet loss. If a packet completes transmission at the same time as another packet arrives, the transmission is completed just before the packet arrives. No other traffic uses the link. The link buffer is initially empty.

  • The source sends a very large file of size F KB. Packet payload is 1 KB. Source has initial cw (congestion window size) of 1 packet. The source implements additive-increase multiplicative-decrease (no slow-start) congestion control: cw is increased by 1 when a window is acked, and set to ceiling(cw/ 2 ) upon timeout.
  • Rtt and rto are constant at T seconds (rto is just slightly higher rtt).
  • The sink sends an ack for every packet received. It can buffer an unlimited number of packets.

Use the window-level model in Note 5 (not the packet-level model) and obtain the following as a function of F and T (the skeleton table below is for your convenience):

a. Transfer time (from start until everything is acked). b. Goodput: number of packets delivered to sink user per second. b. TxRate: number of packets transmitted by TCP source per second.

SOLUTION

time nr na cw chunks sent queue

0 T 0 0 1 0 0 1 T 1 1 2 1,2 1, 2 T 3 3 3 3,4,5 3,4 (5 lost) 3 T 5 5 2 5,6 5, 4 T 7 7 3 7,8,9 7,8 (9 lost) 5 T 9 9 2 9,10 9, Rows 4T and 5T repeat. So every 2T seconds, 5 blocks sent and 4 received.

a. Transfer time =

F ∗ T

seconds

b. Goodput =

T

packets/second

b. TxRate =

2 ∗ T

packets/second

Grading:

  • 6 points for evolution. 1 point for transfer time. 1 point for goodput. 2 points for TxRate.
  • 0 points for using packet-level model. Approx − 5 points for mixing packet-level and window-level models. − 3 points for spacing packets in a window by T (instead of spacing windows by T).
  • 0 points for using slow-start.
  • − 2 points for treating ceiling as floor.
  • − 2 points for wrong cw evolution.
  • − 2 points for mismatch between cw, na, and chunks sent.
  1. [10 pts]

TCP client TCP server

The TCP client establishes a connection to the server, sends a 4KB file, and then closes the connection. Assume the following:

  • The channels between the client and server are perfect, with constant delays TCS from client to server and TSC from server to client (no other delays).
  • The client implements TCP Tahoe congestion control (slow-start, additive increase, multiplicative decrease), Packet payload is 1 KB. Initial cw (congestion window size) is 1 packet, and initial sst (slow-start threshold) is 6 packets.
  • The sink sends an ack for every packet received. It can buffer an unlimited number of packets.

Complete the chart below showing the sequence of messages sent and received in this connection, starting at time 0 (when the client sends the SYN message) and ending when the server and client are both closed (each closes upon receiving a FIN-ACK).

Obtain (in terms of TCS and TSC) the time when the file is completely transferred to the server.

Obtain (in terms of TCS and TSC) the time when the server becomes closed.

SOLUTION

(ACK of D 0)

TCP client TCP server

(SYN, ACK of SYN)

(SYN)

(FIN, D 3)

(D 1), (D 2)

(ACK of FIN)

(ACK of SYN, D 0)

0

Tcs + Tsc

2Tcs + Tsc

3Tcs + 2Tsc

5Tcs + 4Tsc (server closed)

Tcs

2Tcs + 2Tsc

3Tcs + 3Tsc

(client closed) 4Tcs + 4Tsc

(FIN, ACK of (FIN, D 3)) 4Tcs + 3Tsc (file complete at server)

(ACK of D 1..2)

Grading:

  • 3 points for connection establishment (3-way handshake). 3 points for congestion window doubling. 3 points for closing (the two FIN handshakes). 1 point for server closing time.
  • − 1 point for sending FIN only after receiving ack for data 3. − 2 points for not having the FIN handshake initiated by server. − 2 points for sending responses to “secondary” messages (e.g., server ack to the client’s ack to the server’s syn-ack).
  • “Multi-function” messages (e.g., (FIN, D3)) can be split into “single-function” messages (e.g., (D3) and (FIN)). The timing is not affected because there are no delays other than TCS and TSC.