# Q3(a) · rdt3.0 error recovery

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q3a

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3a/

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

### Q3(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. List possible transition sequences following an initial rdt\_send call with no messages initially in the channel, allowing later message corruption and error recovery. [5 marks]

### Answer

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.

| Case | Possible ordered transitions | Explanation |
| --- | --- | --- |
| No error | S0,R0,S3 | DATA0 and ACK0 both arrive |
| Corrupt data0 | S0,R3,S1,S2,R0,S3 | Receiver repeatsACK1; sender ignores it, times out, resends0 |
| Lost data0 | S0,S2,R0,S3 | No receiver event for the lost packet |
| Corrupt ACK0 | S0,R0,S1,S2,R1,S3 | Receiver has delivered0; duplicate0 getsACK0 without redelivery |
| Lost ACK0 | S0,R0,S2,R1,S3 | No sender event for a lost ACK; timeout triggers retry |

After recovery, S5 sends data1 and the symmetric transitions S7/R2/R3/S8 apply as appropriate. These are representative possible traces; repeated losses/corruptions can repeat the retry loops arbitrarily often. No single finite list can enumerate every possible error history.
