150 likes | 478 Views
General principles. Data Link Control. Coordinating between two end-systems across a Link to send/receive data correctly Who should send and when – Medium Access Coordinating sending and receiving – Line Discipline – involves Link establishment etc
E N D
General principles Data Link Control
Coordinating between two end-systems across a Link to send/receive data correctly Who should send and when – Medium Access Coordinating sending and receiving – Line Discipline – involves Link establishment etc What happens if received data is in error – Error control Error correction Retransmission Processing capacity & Buffer and sending and receiving processes – Flow Control Data Link Control
No Device should send unless it has ascertained that the receiver is ready to receive Link Establishment – logical check Two Basic Schemes Enquiry /Ack (peer to peer) Poll /Select (Master /Slave) Line Discipline
T R ENQ SIMPLE ENQ/ACK protocol (e.g., "peer-to-peer", dedicated line) Establish ACK data Transfer ACK data ACK ENQ - enquiry ACK - Acknowledgement EOT - end of transmission data ACK Terminate EOT
T R POLL POLL protocol (e.g., multipoint) Establish NAK Secondary stations POLL Transfer data ACK Primary data POLL - "have anything?"ACK - AcknowledgementEOT - end of transmission Address the secondary ? ACK EOT Terminate POLL
T R SEL SELECT protocol (e.g., multipoint) Establish NAK Secondary stations SEL Transfer ACK data Primary ACK SEL - "ready to receive?"ACK - AcknowledgementNAK - Negative AcknowledgementEOT - end of transmission data ACK Terminate EOT
How fast and How much data to send? Tx & rx speed physical layer Memory storage at sender and receiver Processing capacity at sender and receiver Two most popular schemes STOP & WAIT SLIDING WINDOW Flow Control
T R data STOP and WAIT WAIT TIME Establish ACK data WAIT TIME Transfer ACK data WAIT TIME ACK ACK - Acknowledgement EOT - end of transmission Frames can be numbered 0,1 data WAIT TIME ACK Terminate EOT
T R Data,0 SLIDING WINDOW(without error control) WAIT TIME Establish Data,1 Data,2 Data,3 WAIT TIME Transfer ACK,4 Data,4 WAIT TIME Data,5 data, n - data, frame sent ACK, n - ACK, expected frame EOT - end of transmission Data,6 WAIT TIME ACK, 7 Terminate EOT
T R Data 0 STOP and WAIT ARQ: lost frame TIME OUT!! Data 0 TIME OUT!! Data 0 ACK 1 ACK - Acknowledgement Data 1 ACK 0 ...
T R Data 0 STOP and WAIT ARQ: lost ACK TIME OUT!! ACK 1 TIME OUT!! Data 0 ACK 1 ACK - Acknowledgement ...
T R Data 0 STOP and WAIT ARQ: damaged frame WAIT TIME ACK 1 Data 1 WAIT TIME ACK 0 ERROR! Data 0 WAIT TIME NAK ACK - Acknowledgement NAK - Negative Acknowledgement Data 0 WAIT TIME ACK 1 ...
T R Data,0 SLIDING WINDOW ARQ: Go-Back-n:Damaged Frame Data,1 Data,2 Data,3 ERROR! ACK,3 Data,4 Data, n - data, sent frameACK, n - ACK, expected frameNAK, n - NAK, damaged frameEOT - end of transmission DiscardedDiscarded NAK,3 Data,5 Data,3 ACK, 3
T R Data,0 SLIDING WINDOW Go-Back-n:Lost Frame Data,1 Data,2 Data,3 LOST! Data,4 Data,5 DiscardedDiscarded NAK,3 Data, n - data, sent frameACK, n - ACK, expected frameNAK, n - NAK, damaged frameEOT - end of transmission Data,6 Data,3 ACK, 4
T R Data,0 SLIDING WINDOW Select-Reject:Lost Frame Data,1 Data,2 Data,3 LOST! Data,4 Data,5 NAK,3 Data,6 Data, n - data, sent frameACK, n - ACK, expected frameNAK, n - NAK, damaged frameEOT - end of transmission Data,3 ACK,7