SlideShare a Scribd company logo
Data Communications - Data Link Control Protocols Key Points
Flow Control Flow control :  Ensuring the sending entity does not overwhelm the receiving entity with data Preventing buffer overflow Transmission time Time taken to emit all bits into medium Propagation time Time for a bit to traverse (merentasi) the link
Model of Frame Transmission (mengelirukan)
Stop and Wait Flow Control The simplest form of flow control Source transmits frame Destination receives frame and replies with acknowledgement (ready to accept another frame) Source waits for ACK before sending next frame Destination can stop flow by not send ACK As long as there are no ACK from dest., source do not sends frame Works well for a message sent in a few large frames
Fragmentation Large block of data may be split into small frames Limited buffer size Errors detected sooner (when whole frame received) On error, retransmission of smaller frames is needed Prevents one station occupying medium for long periods (causing long delays at other sending station) With multiple frames for a single message    inadequate Only one frame at a time can be transit Stop and wait becomes inadequate when the bit length of the link is greater than the frame length (a>1)
Bit length of link B=R x d/V B =  length of the link in bits , this is the number of bits present  on the link at an instance in time when a stream of bits fully occupies the link R = data rate of the link, in bps d = length, or distance of the link in meter V = velocity of propagation, in m/s Propagation delay a = B/L L =  number of bits in the frame (length of the frame in bits)
Stop and Wait Link Utilization length of link > length of frame (1 frame/time =Inefficient) length of link < length of frame
Example
Sliding Windows Flow Control Allow multiple frames to be in transit (improve efficiency ) Receiver has buffer W long Transmitter can send up to W frames without ACK from receiver Each frame is numbered (sequence of order) Receiver sends ACK includes number of next frame expected Transmitter maintains list of sequence no. to send, Receiver maintains list of sequence no. to receive. Sequence number bounded by size of field (k) Frames are numbered modulo 2 k  – numbered 0 to k-1 Eg: if 2 k =8(3 bits), frames are numbered 0,1,2,3,4,5,6,7,0,1,2,3…..7,0..
Sliding Window Diagram- Sender Assume using 2 3 = 8,no. = 0,1,2,3,4,5,6,7,0… Each time  a frame  is sent   window  shrink  (# of frames may be transmitted) Each time  ACK  is received   window  grows  (to end side (total of 7 frames)) acknowledged Sent but not yet acknowledged
Sliding Window Diagram-receiver ACK must includes F0 (RR 0) “ Receiver has received all frames up to F7  and is ready to receive F0.” Each time  a frame  is received    window  shrink  (# of frames available) Each time  ACK  is sent     window  grows  (to end side (total of 7 frames)) *RR = Ready Receive
Example Sliding Window A may transmits 7 frames, beginning with F0 A transmits F0,F1,F2 (no ACK)   A shrunk its window to 4 frames, maintains copy of  F0,F1,F2   A may transmits 4 frames, beginning with F3 B transmits RR 3 frames (received frames up to F2, ready to receive 7 more frames starts from F3) B grows back to 7 frames, starts from F3 A discards copy of  F0,F1,F2 A transmits F3,F4,F5,F6 B returns  RR 4 (ACK F3, allows A  transmits from F4 – F2) By the time RR 4 reaches A, A already transmitted F4,F5,F6,So A can only transmits 4 frames starts from F7. B may receives 7 frames, beginning with F0 B shrunk its window to 4 frames (available frames)
Sliding Window Enhancements Receiver can acknowledge frames without permitting further transmission (Receive Not Ready, RNR) EG: RNR 5 = “I have received all frames up through no. 4 but unable to accept any more at this time” Must send a normal acknowledge to restart transmission If duplex,  2 stations exchange data, both maintain 2 windows (to transmit and to receive) To support this requirement, use piggybacking If no data to send, use acknowledgement frame (RR @ RNR) If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)
Error Control Mechanisms of detection and correction of errors  Types of errors Lost frames Damaged frames Automatic repeat request (ARQ) – to turn an unreliable data link to a reliable one ARQ mechanisms: Error detection parity check, CRC, etc. Positive acknowledgment Dest. ACK source received error-free frames. Retransmission after timeout Source retransmits frame not ACK Negative acknowledgement and retransmission Dest. ACK source received error- detected frames. Source retransmits frame
Automatic Repeat Request (ARQ) Three versions of ARQ have been standardized: Stop and wait Go back N Selective reject (selective retransmission)
(a) Stop and Wait Source transmits single frame Wait for ACK If receiver received frame damaged, discard it Transmitter has timeout (transmitter occupied with timer) If no ACK within timeout, retransmit frame If ACK damaged (but arrived), transmitter will not recognize it Transmitter will retransmit Receiver gets two copies of frame Use ACK0 and ACK1
Stop and  Wait - Diagram # of frame :  Labeled alternately 0 and 1 ACK0 :  Receiver received frame 1, Ready to receive frame 0. ACK1 :   Receiver received frame 0, Ready to receive frame 1.
Stop and Wait - Pros and Cons Simple Inefficient
(b) Go Back N (1) Based on sliding window If no error, ACK as usual with next frame expected Use window to control number of outstanding frames If error, reply with rejection (REJ) Discard that frame and all future frames until error frame received correctly Transmitter must go back and retransmit that frame and all subsequent frames
Go Back N - Damaged Frame Receiver detects error in frame  i Receiver sends rejection- i  (REJ  i  ) Transmitter gets rejection- i Transmitter retransmits frame  i  and all subsequent
Go Back N - Lost Frame (1) Case 1: Frame  i   lost Transmitter sends  i+1 Receiver gets frame  i+1  out of sequence Receiver send reject  i  (REJ  i  ) Transmitter goes back to frame  i  and retransmits
Go Back N - Lost Frame (2) Case 2: Frame  i   lost and no additional frame sent Receiver gets nothing and returns neither acknowledgement nor rejection Transmitter times out and sends acknowledgement frame with P bit set to 1.  ( RR(P bit =1) ) Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame  i  ) .  (RR  i  ) Transmitter then retransmits frame  i
Go Back N –Damaged Acknowledgement (RR @ RNR@ REJ) Receiver gets frame  i  and send acknowledgement ( i+1 ) which is lost  (RR  i+1 ) is sent to transmitter but lost in transmission Acknowledgements are cumulative, so next acknowledgement ( i+n ) may arrive before transmitter times out on frame  i If transmitter times out, it sends acknowledgement with P bit set as before ( RR(P bit =1) ) This can be repeated a number of times before a reset procedure is initiated
Go Back N - Damaged Rejection *Same as for lost frame (2) Receiver gets nothing and returns neither acknowledgement nor rejection Transmitter times out and sends acknowledgement frame with P bit set to 1.  ( RR(P bit =1) ) Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame  i  ) .  (RR  i  ) Transmitter then retransmits frame  i
Go Back N -  Diagram RR 2: REJ 4: RR(P bit=1)
(c) Selective Reject Also called selective retransmission Only rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Minimizes retransmission Receiver must maintain large enough buffer More complex login in transmitter
Selective Reject - Diagram
High Level Data Link Control The important data link control is High Level Data Link Control (HDLC) ISO 33009, ISO 4335 Widely used, basis for some other data link control protocols
HDLC Basic Characteristics Stations type: Primary station Controls operation of link Frames issued are called commands Maintains separate logical link to each secondary station Secondary station Under control of primary station Frames issued called responses Combined station May issue commands and responses
HDLC Link Configurations Link configurations: Unbalanced One primary and one or more secondary stations Supports full duplex and half duplex Balanced Two combined stations Supports full duplex and half duplex
HDLC Transfer Modes (1) Data transfer modes of operation: Normal Response Mode (NRM) Asynchronous Balanced Mode (ABM) Asynchronous Response Mode (ARM)
HDLC Transfer Modes (1) Normal Response Mode (NRM) Unbalanced configuration Primary initiates transfer to secondary Secondary may only transmit data in response to command from primary Used on multi-drop lines Host computer as primary Terminals as secondary
HDLC Transfer Modes (2) Asynchronous Balanced Mode (ABM) Balanced configuration Either station may initiate transmission without receiving permission Most widely used No polling overhead
HDLC Transfer Modes (3) Asynchronous Response Mode (ARM) Unbalanced configuration Secondary may initiate transmission without permission form primary Primary responsible for line rarely used
Frame Structure HDLC uses synchronous transmission (frames) header trailer END!!
Key Points Why do we need data link control protocol? Because of the possibility of transmission errors Because the receiver may need to regulate the rate of the data arrive Because synchronization and interfacing techniques are insufficient by themselves So, we need a layer of control that provide  Flow control, error detection and error control
Key Points -2 Flow control Enables a receiver to regulate the flow of data from a sender so that the receiver’s buffers do not overflow. Error control Achieved by retransmission of damaged frames that have not been acknowledged or for which the other side requests a retransmission High-level data link control (HDLC) Widely used data link control protocol.
Sliding Window Diagram

More Related Content

PPT
14 data link control
arvindsarja
 
PDF
Chapter 7 - Data Link Control Protocols 9e
adpeer
 
PPTX
New framing-protocols
Nitesh Singh
 
PPT
Data Link Control Protocols
TechiNerd
 
PPSX
Flow Control
selvakumar_b1985
 
PPTX
Data link control & protocol concepts
Raji Lakshmi
 
PPT
Data link control
Iffat Anjum
 
PPTX
Unit 2 data link control
Vishal kakade
 
14 data link control
arvindsarja
 
Chapter 7 - Data Link Control Protocols 9e
adpeer
 
New framing-protocols
Nitesh Singh
 
Data Link Control Protocols
TechiNerd
 
Flow Control
selvakumar_b1985
 
Data link control & protocol concepts
Raji Lakshmi
 
Data link control
Iffat Anjum
 
Unit 2 data link control
Vishal kakade
 

What's hot (20)

PPT
5 digital datacomm
Hattori Sidek
 
PPT
Selective repeat protocol
Manusha Dilan
 
PPTX
Sliding window protocol(ARQ technique)
shilpa patel
 
PPT
Chapter 11
Faisal Mehmood
 
PDF
Importance of sliding window protocol
eSAT Journals
 
PPTX
Chapter 11: Data Link Control
JeoffnaRuth
 
PPT
Chapter 4 data link layer
Naiyan Noor
 
PDF
Importance of sliding window protocol
eSAT Publishing House
 
PPT
Chapter3
Nagarajan
 
PPT
Module15: Sliding Windows Protocol and Error Control
gondwe Ben
 
PPT
Framming data link layer
PREMAL GAJJAR
 
PPT
Sliding window protocol
Shehara Abeythunga
 
PPT
Mac sub layer
DIKSHA_LAHRANI
 
PPT
Flow & Error Control
tameemyousaf
 
PPTX
Flow control
maheshpoopathy poopathy
 
PPTX
Advance Repeat reQuest (ARQ)
Muhammad Irtiza
 
PPTX
Go Back N Arq1
guestb4ff06
 
PPT
8th lec flow and error control
Inocentshuja Ahmad
 
PPT
3a data link layer continued
kavish dani
 
PDF
Unit 4 data link layer
mekind
 
5 digital datacomm
Hattori Sidek
 
Selective repeat protocol
Manusha Dilan
 
Sliding window protocol(ARQ technique)
shilpa patel
 
Chapter 11
Faisal Mehmood
 
Importance of sliding window protocol
eSAT Journals
 
Chapter 11: Data Link Control
JeoffnaRuth
 
Chapter 4 data link layer
Naiyan Noor
 
Importance of sliding window protocol
eSAT Publishing House
 
Chapter3
Nagarajan
 
Module15: Sliding Windows Protocol and Error Control
gondwe Ben
 
Framming data link layer
PREMAL GAJJAR
 
Sliding window protocol
Shehara Abeythunga
 
Mac sub layer
DIKSHA_LAHRANI
 
Flow & Error Control
tameemyousaf
 
Advance Repeat reQuest (ARQ)
Muhammad Irtiza
 
Go Back N Arq1
guestb4ff06
 
8th lec flow and error control
Inocentshuja Ahmad
 
3a data link layer continued
kavish dani
 
Unit 4 data link layer
mekind
 
Ad

Viewers also liked (20)

PPT
Forouzan isdn
Mahesh Kumar Chelimilla
 
PPTX
Data link layer
Mukesh Chinta
 
PPT
Ch8 file processing
Hattori Sidek
 
PPT
Ch6 pointers (latest)
Hattori Sidek
 
PPT
9 lan
Hattori Sidek
 
PPT
Ch3 repetition
Hattori Sidek
 
PPT
Ch3 selection
Hattori Sidek
 
PPT
10 high speedla-ns
Hattori Sidek
 
PPT
Ch4 functions
Hattori Sidek
 
PPTX
Dcn data link_layer
mangal das
 
PPT
Ch7 structures
Hattori Sidek
 
PPT
Ch2 introduction to c
Hattori Sidek
 
PPT
13 atm
Hattori Sidek
 
PPT
Ch5 array nota
Hattori Sidek
 
PPT
Ch1 principles of software development
Hattori Sidek
 
PPT
8 spread spectrum
Hattori Sidek
 
PPT
12 wireless la-ns
Hattori Sidek
 
DOCX
AM Receivers
Fredrick Kendrick
 
PPT
11 circuit-packet
Hattori Sidek
 
Data link layer
Mukesh Chinta
 
Ch8 file processing
Hattori Sidek
 
Ch6 pointers (latest)
Hattori Sidek
 
Ch3 repetition
Hattori Sidek
 
Ch3 selection
Hattori Sidek
 
10 high speedla-ns
Hattori Sidek
 
Ch4 functions
Hattori Sidek
 
Dcn data link_layer
mangal das
 
Ch7 structures
Hattori Sidek
 
Ch2 introduction to c
Hattori Sidek
 
Ch5 array nota
Hattori Sidek
 
Ch1 principles of software development
Hattori Sidek
 
8 spread spectrum
Hattori Sidek
 
12 wireless la-ns
Hattori Sidek
 
AM Receivers
Fredrick Kendrick
 
11 circuit-packet
Hattori Sidek
 
Ad

Similar to 6 data linkcontrol (20)

PPT
07 data linkcontrol
chameli devi group of institutions
 
PPT
Data linkcontrol
Bablu Shofi
 
PPT
slide_for_HDLC_and_DLC_in_Chapter_Four.ppt
BlackHat41
 
PPT
a_presentation_on_hdlc_and_dlc_computer.ppt
BlackHat41
 
PPTX
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
SuhaniTalreja
 
PPTX
Unit IV_Flow.pptx
TejasRao8
 
PPT
Sliding window and error control
Adil Mehmoood
 
PPT
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
PPT
Data Link Control.ppt
Teshome48
 
PPT
07 data linkcontrol
Srinivasa Rao
 
PPTX
Different protocols for data communication networks
Nt Arvind
 
PPT
High Data Link Control Protocol in Data Link Layer
shailajacse
 
PDF
Cse3213 11 flow_errorcontrol_f2010
namokar
 
PPT
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
PPT
Lecture 20
fitnessbd
 
PPT
CN_unit2.ppt Data Link Layer characteristics, categories
VSrilakshmi2
 
PDF
Unit 2_ Flow & Error Control in computer networks
Balasubramanian699229
 
PPT
Arq protocol part 2
Aanandha Saravanan
 
PDF
Data link layer (Unit 2).pdf
BharatiPatelPhDStude
 
PPT
Presentation on dll
Alisha Korpal
 
Data linkcontrol
Bablu Shofi
 
slide_for_HDLC_and_DLC_in_Chapter_Four.ppt
BlackHat41
 
a_presentation_on_hdlc_and_dlc_computer.ppt
BlackHat41
 
Lecture 36-43_DATA_COMMUNICATION_PPT.pptx
SuhaniTalreja
 
Unit IV_Flow.pptx
TejasRao8
 
Sliding window and error control
Adil Mehmoood
 
session -7 - Sliding Window Protocol 1- N oisy Channels.ppt
nanisrikar276711
 
Data Link Control.ppt
Teshome48
 
07 data linkcontrol
Srinivasa Rao
 
Different protocols for data communication networks
Nt Arvind
 
High Data Link Control Protocol in Data Link Layer
shailajacse
 
Cse3213 11 flow_errorcontrol_f2010
namokar
 
09 Data Link LayerFlow Control.ppt
ShaliniKumariGupta1
 
Lecture 20
fitnessbd
 
CN_unit2.ppt Data Link Layer characteristics, categories
VSrilakshmi2
 
Unit 2_ Flow & Error Control in computer networks
Balasubramanian699229
 
Arq protocol part 2
Aanandha Saravanan
 
Data link layer (Unit 2).pdf
BharatiPatelPhDStude
 
Presentation on dll
Alisha Korpal
 

More from Hattori Sidek (14)

PPT
Chapter 4 frequency modulation
Hattori Sidek
 
PPT
Chapter 3 am receivers
Hattori Sidek
 
PPT
7 multiplexing
Hattori Sidek
 
PPT
4 signal encodingtechniques
Hattori Sidek
 
PPT
3. transmission media
Hattori Sidek
 
PPT
2[1].1 data transmission
Hattori Sidek
 
PPT
14 congestionin datanetworks
Hattori Sidek
 
PPT
01 pengenalan
Hattori Sidek
 
PPT
01 berkenalan
Hattori Sidek
 
PPT
Chapter 2 amplitude_modulation
Hattori Sidek
 
PPT
Comm introduction
Hattori Sidek
 
PPT
Chapter5 dek3133
Hattori Sidek
 
PPT
Chapter 6 edit
Hattori Sidek
 
PPT
Chapter 6 dc motor speed control
Hattori Sidek
 
Chapter 4 frequency modulation
Hattori Sidek
 
Chapter 3 am receivers
Hattori Sidek
 
7 multiplexing
Hattori Sidek
 
4 signal encodingtechniques
Hattori Sidek
 
3. transmission media
Hattori Sidek
 
2[1].1 data transmission
Hattori Sidek
 
14 congestionin datanetworks
Hattori Sidek
 
01 pengenalan
Hattori Sidek
 
01 berkenalan
Hattori Sidek
 
Chapter 2 amplitude_modulation
Hattori Sidek
 
Comm introduction
Hattori Sidek
 
Chapter5 dek3133
Hattori Sidek
 
Chapter 6 edit
Hattori Sidek
 
Chapter 6 dc motor speed control
Hattori Sidek
 

Recently uploaded (20)

PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
vedic maths in python:unleasing ancient wisdom with modern code
mistrymuskan14
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PPTX
Congenital Hypothyroidism pptx
AneetaSharma15
 
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
Marta Fijak
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
PDF
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
PPTX
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
PDF
Introducing Procurement and Supply L2M1.pdf
labyankof
 
PDF
The Picture of Dorian Gray summary and depiction
opaliyahemel
 
Landforms and landscapes data surprise preview
jpinnuck
 
vedic maths in python:unleasing ancient wisdom with modern code
mistrymuskan14
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
High Ground Student Revision Booklet Preview
jpinnuck
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Congenital Hypothyroidism pptx
AneetaSharma15
 
The Final Stretch: How to Release a Game and Not Die in the Process.
Marta Fijak
 
Understanding operators in c language.pptx
auteharshil95
 
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
Introducing Procurement and Supply L2M1.pdf
labyankof
 
The Picture of Dorian Gray summary and depiction
opaliyahemel
 

6 data linkcontrol

  • 1. Data Communications - Data Link Control Protocols Key Points
  • 2. Flow Control Flow control : Ensuring the sending entity does not overwhelm the receiving entity with data Preventing buffer overflow Transmission time Time taken to emit all bits into medium Propagation time Time for a bit to traverse (merentasi) the link
  • 3. Model of Frame Transmission (mengelirukan)
  • 4. Stop and Wait Flow Control The simplest form of flow control Source transmits frame Destination receives frame and replies with acknowledgement (ready to accept another frame) Source waits for ACK before sending next frame Destination can stop flow by not send ACK As long as there are no ACK from dest., source do not sends frame Works well for a message sent in a few large frames
  • 5. Fragmentation Large block of data may be split into small frames Limited buffer size Errors detected sooner (when whole frame received) On error, retransmission of smaller frames is needed Prevents one station occupying medium for long periods (causing long delays at other sending station) With multiple frames for a single message  inadequate Only one frame at a time can be transit Stop and wait becomes inadequate when the bit length of the link is greater than the frame length (a>1)
  • 6. Bit length of link B=R x d/V B = length of the link in bits , this is the number of bits present on the link at an instance in time when a stream of bits fully occupies the link R = data rate of the link, in bps d = length, or distance of the link in meter V = velocity of propagation, in m/s Propagation delay a = B/L L = number of bits in the frame (length of the frame in bits)
  • 7. Stop and Wait Link Utilization length of link > length of frame (1 frame/time =Inefficient) length of link < length of frame
  • 9. Sliding Windows Flow Control Allow multiple frames to be in transit (improve efficiency ) Receiver has buffer W long Transmitter can send up to W frames without ACK from receiver Each frame is numbered (sequence of order) Receiver sends ACK includes number of next frame expected Transmitter maintains list of sequence no. to send, Receiver maintains list of sequence no. to receive. Sequence number bounded by size of field (k) Frames are numbered modulo 2 k – numbered 0 to k-1 Eg: if 2 k =8(3 bits), frames are numbered 0,1,2,3,4,5,6,7,0,1,2,3…..7,0..
  • 10. Sliding Window Diagram- Sender Assume using 2 3 = 8,no. = 0,1,2,3,4,5,6,7,0… Each time a frame is sent  window shrink (# of frames may be transmitted) Each time ACK is received  window grows (to end side (total of 7 frames)) acknowledged Sent but not yet acknowledged
  • 11. Sliding Window Diagram-receiver ACK must includes F0 (RR 0) “ Receiver has received all frames up to F7 and is ready to receive F0.” Each time a frame is received  window shrink (# of frames available) Each time ACK is sent  window grows (to end side (total of 7 frames)) *RR = Ready Receive
  • 12. Example Sliding Window A may transmits 7 frames, beginning with F0 A transmits F0,F1,F2 (no ACK) A shrunk its window to 4 frames, maintains copy of F0,F1,F2 A may transmits 4 frames, beginning with F3 B transmits RR 3 frames (received frames up to F2, ready to receive 7 more frames starts from F3) B grows back to 7 frames, starts from F3 A discards copy of F0,F1,F2 A transmits F3,F4,F5,F6 B returns RR 4 (ACK F3, allows A transmits from F4 – F2) By the time RR 4 reaches A, A already transmitted F4,F5,F6,So A can only transmits 4 frames starts from F7. B may receives 7 frames, beginning with F0 B shrunk its window to 4 frames (available frames)
  • 13. Sliding Window Enhancements Receiver can acknowledge frames without permitting further transmission (Receive Not Ready, RNR) EG: RNR 5 = “I have received all frames up through no. 4 but unable to accept any more at this time” Must send a normal acknowledge to restart transmission If duplex, 2 stations exchange data, both maintain 2 windows (to transmit and to receive) To support this requirement, use piggybacking If no data to send, use acknowledgement frame (RR @ RNR) If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP)
  • 14. Error Control Mechanisms of detection and correction of errors Types of errors Lost frames Damaged frames Automatic repeat request (ARQ) – to turn an unreliable data link to a reliable one ARQ mechanisms: Error detection parity check, CRC, etc. Positive acknowledgment Dest. ACK source received error-free frames. Retransmission after timeout Source retransmits frame not ACK Negative acknowledgement and retransmission Dest. ACK source received error- detected frames. Source retransmits frame
  • 15. Automatic Repeat Request (ARQ) Three versions of ARQ have been standardized: Stop and wait Go back N Selective reject (selective retransmission)
  • 16. (a) Stop and Wait Source transmits single frame Wait for ACK If receiver received frame damaged, discard it Transmitter has timeout (transmitter occupied with timer) If no ACK within timeout, retransmit frame If ACK damaged (but arrived), transmitter will not recognize it Transmitter will retransmit Receiver gets two copies of frame Use ACK0 and ACK1
  • 17. Stop and Wait - Diagram # of frame : Labeled alternately 0 and 1 ACK0 : Receiver received frame 1, Ready to receive frame 0. ACK1 : Receiver received frame 0, Ready to receive frame 1.
  • 18. Stop and Wait - Pros and Cons Simple Inefficient
  • 19. (b) Go Back N (1) Based on sliding window If no error, ACK as usual with next frame expected Use window to control number of outstanding frames If error, reply with rejection (REJ) Discard that frame and all future frames until error frame received correctly Transmitter must go back and retransmit that frame and all subsequent frames
  • 20. Go Back N - Damaged Frame Receiver detects error in frame i Receiver sends rejection- i (REJ i ) Transmitter gets rejection- i Transmitter retransmits frame i and all subsequent
  • 21. Go Back N - Lost Frame (1) Case 1: Frame i lost Transmitter sends i+1 Receiver gets frame i+1 out of sequence Receiver send reject i (REJ i ) Transmitter goes back to frame i and retransmits
  • 22. Go Back N - Lost Frame (2) Case 2: Frame i lost and no additional frame sent Receiver gets nothing and returns neither acknowledgement nor rejection Transmitter times out and sends acknowledgement frame with P bit set to 1. ( RR(P bit =1) ) Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) . (RR i ) Transmitter then retransmits frame i
  • 23. Go Back N –Damaged Acknowledgement (RR @ RNR@ REJ) Receiver gets frame i and send acknowledgement ( i+1 ) which is lost (RR i+1 ) is sent to transmitter but lost in transmission Acknowledgements are cumulative, so next acknowledgement ( i+n ) may arrive before transmitter times out on frame i If transmitter times out, it sends acknowledgement with P bit set as before ( RR(P bit =1) ) This can be repeated a number of times before a reset procedure is initiated
  • 24. Go Back N - Damaged Rejection *Same as for lost frame (2) Receiver gets nothing and returns neither acknowledgement nor rejection Transmitter times out and sends acknowledgement frame with P bit set to 1. ( RR(P bit =1) ) Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) . (RR i ) Transmitter then retransmits frame i
  • 25. Go Back N - Diagram RR 2: REJ 4: RR(P bit=1)
  • 26. (c) Selective Reject Also called selective retransmission Only rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Minimizes retransmission Receiver must maintain large enough buffer More complex login in transmitter
  • 28. High Level Data Link Control The important data link control is High Level Data Link Control (HDLC) ISO 33009, ISO 4335 Widely used, basis for some other data link control protocols
  • 29. HDLC Basic Characteristics Stations type: Primary station Controls operation of link Frames issued are called commands Maintains separate logical link to each secondary station Secondary station Under control of primary station Frames issued called responses Combined station May issue commands and responses
  • 30. HDLC Link Configurations Link configurations: Unbalanced One primary and one or more secondary stations Supports full duplex and half duplex Balanced Two combined stations Supports full duplex and half duplex
  • 31. HDLC Transfer Modes (1) Data transfer modes of operation: Normal Response Mode (NRM) Asynchronous Balanced Mode (ABM) Asynchronous Response Mode (ARM)
  • 32. HDLC Transfer Modes (1) Normal Response Mode (NRM) Unbalanced configuration Primary initiates transfer to secondary Secondary may only transmit data in response to command from primary Used on multi-drop lines Host computer as primary Terminals as secondary
  • 33. HDLC Transfer Modes (2) Asynchronous Balanced Mode (ABM) Balanced configuration Either station may initiate transmission without receiving permission Most widely used No polling overhead
  • 34. HDLC Transfer Modes (3) Asynchronous Response Mode (ARM) Unbalanced configuration Secondary may initiate transmission without permission form primary Primary responsible for line rarely used
  • 35. Frame Structure HDLC uses synchronous transmission (frames) header trailer END!!
  • 36. Key Points Why do we need data link control protocol? Because of the possibility of transmission errors Because the receiver may need to regulate the rate of the data arrive Because synchronization and interfacing techniques are insufficient by themselves So, we need a layer of control that provide Flow control, error detection and error control
  • 37. Key Points -2 Flow control Enables a receiver to regulate the flow of data from a sender so that the receiver’s buffers do not overflow. Error control Achieved by retransmission of damaged frames that have not been acknowledged or for which the other side requests a retransmission High-level data link control (HDLC) Widely used data link control protocol.