Sometimes the packets arrive, but much later than expected. This almost never happens on local area networks but can happen on the Internet where packets travel through thousands of gateways and where routes constantly shift to accommodate changes in load. If R gets two packets with the same sequence number, it must keep only one of them, or else it will incorrectly duplicate some of the bits in the bit stream. But it should ACK every packet or else S may think that packet is never getting through and it will keep resending it. It is up to R to correctly piece together all the arriving packets in the sequence that S originally sent them and not to duplicate any part of it. Fig. 23.8.4 gives a taste of how complicated this is. Notice that packet 3 was destroyed in transit so the receiver must send a NAK back to the sender, requesting a retransmission. Also notice that packet 4 was sent out of order, after packets 5 and 6. In order to conserve time on the wire, the receiver is asked to piece together a coherent data stream from all these bits and pieces.
|