+ packet sequence number (1s or 0s) rdt 2.1 rdt 2.0 – Sender transmits packet sequence number so receiver knows it’s duplicate and can discard. Can handle 1) corrupted ACK; and 2) corrupted packet ACK0/ACK1 instead of ACK/NAK rdt 2.2 – Channel may: 1) Flip bits; 2) Packet loss; 3) Long packet delay; 4) WILL NOT reorder rdt 3.0 – Utilization Formula Pipelining: Go-bank-N GBN Sender GBN Receiver Up to N unacknowledged packets in pipeline Acknowledge packets that arrive in order (window size N) only remember expectedSeqNum Insert sequence number in packet header Discard out-of-order packets and Sliding window tracks unacknowledged acknowledge last in-order packet packets means all packets up to M are “ACKM” Timeout for oldest unacknowledged received retransmit packet n and all subsequent packets in the window Pipelining: Selective Repeat SR Sender SR Receiver Maintains timer for each unacknowledged Individually acknowledges all correctly packet received packets when timeout, retransmit only that packet Buffer out-of-order packets Note: Sender & Receiver window may not always be synchronized sender is unable to proceed until ACK (see below) SR Sender Behaviour SR Receiver Behaviour Data from application layer: pkt(n) in forward window If next sequence number available in window, Send ACK(n) send If out-of-order, buffer timeout(n) If advance window to next Resend pkt(n), restart packet ACK(n) is within window pkt(n) in rear window [base-N, base-1] Mark pkt(n) as received ACK(n) If n is the smallest, advance window to next otherwise (i.e., pkt too far forward or back) unacknowledged number Ignore (can cause window sync problems) Summary Defence Mechanism Problem rdt1.0 rdt2.0 rdt2.1/2.2 rdt3.0 Timeout & retransmission Packet Delay Y Sequence Number Duplicate data Y (1s & Y (1s & 0s) 0s) Acknowledgement Packet Loss/Corruption Y Y Y Checksum Corruption Y Y Y
rdt 2.1 – rdt 2.0 + packet sequence number (1s or 0s) Sender transmits packet sequence number so receiver knows it’s duplicate and can discard. Can handle 1) corrupted ACK; and 2) corrupted packet rdt 2.2 – ACK0/ACK1 instead of ACK/NAK rdt 3.0 – Channel may: 1) Flip bits; 2) Packet loss; 3) Long packet delay; 4) WILL NOT reorder Utilization Formula Pipelining: Go-bank-N GBN Sender GBN Receiver Up to N unacknowledged packets in pipeline (window size N) Insert sequence number in packet header Sliding window tracks unacknowledged packets Timeout for oldest unacknowledged retransmit packet n and all subsequent packets in the window Acknowledge packets that arrive in order only remember expectedSeqNum Discard out-of-order packets and acknowledge last in-order packet “ACKM” means all packets up to M are received Pipelining: Selective Repeat SR Sender SR Receiver Maintains timer for each unacknowledged packet when timeout, retransmit only that packet Individually acknowledges all correctly received packets Buffer out-of-order packets Note: Sender & Receiver window may not always be synchronized sender is unable to proceed until ACK (see below) SR Sender Behaviour SR Receiver Behaviour Data from application layer: If next sequence number available in window, send timeout(n) Resend pkt(n), restart ACK(n) is within window Mark pkt(n) as received If n is the smallest, advance window to next unacknowledged number pkt(n) in forward window Send ACK(n) If out-of-order, buffer If advance window to next packet pkt(n) in rear window [base-N, base-1] ACK(n) otherwise (i.e., pkt too far forward or back) Ignore (can cause window sync problems) Summary Defence Mechanism Problem rdt1.0 rdt2.0 rdt2.1/2.2 rdt3.0 Timeout & retransmission Packet Delay Y Sequence Number Duplicate data Y (1s & 0s) Y (1s & 0s) Acknowledgement Packet Loss/Corruption Y Y Y Checksum Corruption Y Y Y
CS2105%20-%20Revision.docx