Computer Networks · TEE · papers

Q4(a) · Alternating-bit data and ACK sequence

2023-01-27 · AI-only Sem V

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

Q4(a). Use the printed rdt3.0 alternating-bit sender/receiver: S0 sends data0; S3 accepts ACK0; S5 sends data1; S8 accepts ACK1; S2/S7 are timeout retransmissions; S1/S6 ignore corrupt or wrong ACKs. Receiver R0 accepts new data0 and sends ACK0; R2 accepts new data1 and sends ACK1; R3/R1 handle corrupt or duplicate data while waiting for 0/1 respectively. Timeline: data at t=0 arrives correctly at t=1; ACK arrives at sender t=2. New data sent t=2 arrives t=3, but its ACK is lost. Timeout just after t=4 resends that data, received at t=5; ACK reaches sender t=6. Data sent at t=6 is corrupted on arrival t=7, and its ACK reaches sender t=8. Give the interleaved numbers for data at t=2, ACK at t=3, timeout data after t=4, ACK at t=5, data at t=6, ACK at t=7. Justify. [10 marks]

Answer

Given

The complete timeline in the question, starting with data0 at t=0.

To find

Six interleaved DATA/ACK numbers.

Formula and why

Advance DATA sequence only after a correct matching ACK. On timeout resend the same sequence; on duplicate or corrupt data repeat the last successful ACK.

This keeps lost ACKs from causing duplicate application delivery.

Solution

The sequence bit labels the outstanding DATA packet. ACK0 confirms data0 and ACK1 confirms data1 in this printed FSM; these are not TCP cumulative byte numbers. An ACK loss does not advance the sender. A duplicate data packet is acknowledged again but not delivered twice.

EventNumberReason
t2 data1ACK0 has arrived; next DATA is1
t3 ACK1Receiver accepted data1
after t4 timeout data1ACK1 lost; sender resends1
t5 ACK1Duplicate data1: re-ACK1, do not redeliver
t6 data0ACK1 now arrives; wrap to0
t7 ACK1Data0 corrupt: receiver still expects0 and repeatsACK1

Answer: 1, 1, 1, 1, 0, 1. At t8 ACK1 is wrong for outstanding data0, so S1 ignores it; the next timeout retransmits0.