SlideShare a Scribd company logo
Data Link Control Protocols
CEN 220/CIS 192 Advanced Data Communications and Networking
Data and Computer Communications, W. Stallings 9/E, Chapter 7
Data Link Control Protocols
“Great and enlightened one,” said Ten-teh, as soon as his
stupor was lifted, “has this person delivered his message
competently, for his mind was still a seared vision of snow
and sand and perchance his tongue has stumbled?”
“Bend your ears to the wall,” replied the Emperor, “and be
assured.”
—Kai Lung's Golden Hours,
Earnest Bramah
Data Link Control Protocols
When sending data, to achieve control, a layer of
logic is added above the physical layer

data link control or a data link control protocol
To manage exchange of data over a link:

frame synchronization

flow control

error control

addressing

control and data

link management
Flow Control
Ensure sending entity does not overwhelm receiving entity

prevent buffer overflow
Influenced by:

transmission time
• time taken to emit all bits into medium

propagation time
• time for a bit to traverse the link
Assumption is all frames are successfully received with no
frames lost or arriving with errors
Model of Frame Transmission
Stop and Wait
Simplest form of flow
control
Works well for a
message sent in a few
large frames

stop and wait becomes
inadequate if large
block of data is split
into small frames by
source
Stop and Wait Link Utilization
Sliding Windows Flow Control
Allows multiple numbered frames to be in transit

receiver has buffer W long

transmitter sends up to W frames without ACK

ACK includes number of next frame expected

sequence number is bounded by size of field (k)
• frames are numbered modulo 2k
• giving max window size of up to 2k – 1

receiver can ACK frames without permitting further
transmission (Receive Not Ready)

must send a normal acknowledge to resume
If have full-duplex link, can piggyback acks
Sliding Window Diagram
Sliding Window Example
Error Control Techniques
Detection and
correction of errors
such as:
lost frames
-a frame fails
to arrive at
the other side
damaged frames
-frame arrives
but some of
the bits are in
error
Automatic Repeat Request (ARQ)
Collective name for error control mechanisms
Effect of arq is to turn an unreliable data link into a
reliable one
Versions of arq are:

stop-and-wait

go-back-N

selective-reject
Stop and Wait ARQ
Source transmits single frame
Waits for ack
• no other data can be sent until destination’s reply arrives
If frame received is damaged, discard it
 transmitter has timeout
 if no ACK within timeout, retransmit
If ack is damaged, transmitter will not recognize
 transmitter will retransmit
 receiver gets two copies of frame
 use alternate numbering and ACK0 / ACK1
Stop and Wait ARQ
Go-Back-N ARQ
Most commonly used error control
Based on sliding-window
Use window size to control number of outstanding frames
If no error, ack as usual
If error, reply with rejection

destination will discard that frame and all future
frames until frame in error is received correctly

transmitter must go back and retransmit that frame
and all subsequent frames
Go Back N - Handling
Damaged frame

error in frame i so receiver rejects frame i

transmitter retransmits frames from i
Lost frame

frame i lost and either
• transmitter sends i+1 and receiver gets frame i+1 out
of sequence and rejects frame i
• or transmitter times out and sends ACK with P bit set
which receiver responds to with ACK i

transmitter then retransmits frames from i
Go Back N - Handling
Selective-Reject (ARQ)
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 logic in transmitter

less widely used
Useful for satellite links with long propagation
delays
Go-Back-N vs.
Selective
Reject
High Level Data Link Control (HDLC)
HDLC Transfer Modes
HDLC Frame Structure

uses synchronous transmission

transmissions are in the form of frames

single frame format used
Flag Fields and Bit Stuffing
Delimit frame at both ends with 01111110
Receiver hunts for flag sequence to synchronize
Bit stuffing used to avoid confusion with data
containing flag sequence 01111110

0 inserted after every sequence of five 1s

if receiver detects five 1s it checks next bit

if next bit is 0, it is deleted (was stuffed bit)

if next bit is 1 and seventh bit is 0, accepted as flag

if sixth and seventh bits 1, sender is indicating abort
Address Field
Identifies secondary station that transmitted or
will receive frame
Usually 8 bits long
May be extended to multiples of 7 bits

leftmost bit indicates if is the last octet (1) or not (0)
Address 11111111 allows primary to broadcast
Control Field
Different frame types

Information - data transmitted to user (next layer up)
• flow and error control piggybacked on information frames

Supervisory - ARQ when piggyback is not used

Unnumbered - supplementary link control functions
First 1-2 bits of control field identify frame type
Control Field
Use of poll/final (p/f) bit depends on context
In command frame p bit set to 1 to solicit (poll)
response from peer
In response frame f bit set to 1 to indicate
response to soliciting command
Sequence number usually 3 bits

can extend to 8 bits as shown below
Information & Frame Check Sequence
(FCS) Fields
HDLC Operation
Consists of exchange of i-frames, s-frames and u-frames
Involves three phases
HDLC Operation Example
HDLC Operation Example
Summary
Data link protocols
– frame synchronization
– flow control
● stop-and-wait, sliding window
● ACK frame
● error control
– lost frame, damaged frame
– stop-and-wait, go-back-N, selective-reject ARQs
HDLC
– NRM, ABM,ARM

More Related Content

PPTX
Wlan architecture
PPT
HiperLAN.ppt
PPT
ATM Networking Concept
PPTX
Framing in data link layer
ODP
UMTS, Introduction.
PPTX
Unit 1 introduction to computer networks
PPT
Flow & Error Control
PPTX
Leaky bucket A
Wlan architecture
HiperLAN.ppt
ATM Networking Concept
Framing in data link layer
UMTS, Introduction.
Unit 1 introduction to computer networks
Flow & Error Control
Leaky bucket A

What's hot (20)

PPTX
Point to-point protocol (ppp)
PPT
Transportlayer tanenbaum
PPTX
difference between hub, bridge, switch and router
PPT
Umts system architecture
PDF
Data Communication & Networking Notes
PPT
Comprehensive survey on routing protocols for IoT
PPTX
Unit 4 - Network Layer
PPT
Transport layer (computer networks)
DOC
Mobile Computing I-Unit Notes
PPTX
Data link layer
PPTX
Error detection and correction
PPTX
EC8791 consumer electronics-platform level performance analysis
PPTX
Computer Networks - Error Detection & Error Correction
PPTX
Network Security
PPTX
SENSOR NETWORK PLATFORMS AND TOOLS
PPT
Unit 3 Network Layer PPT
PPTX
Congestion control
PPTX
PPTX
Data link layer
PPTX
Unit 4 -2 energy management in adhoc wireless network
Point to-point protocol (ppp)
Transportlayer tanenbaum
difference between hub, bridge, switch and router
Umts system architecture
Data Communication & Networking Notes
Comprehensive survey on routing protocols for IoT
Unit 4 - Network Layer
Transport layer (computer networks)
Mobile Computing I-Unit Notes
Data link layer
Error detection and correction
EC8791 consumer electronics-platform level performance analysis
Computer Networks - Error Detection & Error Correction
Network Security
SENSOR NETWORK PLATFORMS AND TOOLS
Unit 3 Network Layer PPT
Congestion control
Data link layer
Unit 4 -2 energy management in adhoc wireless network
Ad

Similar to Chapter 7 - Data Link Control Protocols 9e (20)

PPT
PPTX
Data link control & protocol concepts
PPTX
Data Link Layer_Data Communications&Computer Neworks.pptx
PPTX
Different protocols for data communication networks
PPT
CN_unit2.ppt Data Link Layer characteristics, categories
PPT
09 Data Link LayerFlow Control.ppt
PPT
Data Link Layer Protocols in Wide Access Network.ppt
PPTX
DATA LINK CONTROL.pptx
PDF
Ch05_OSI_Reference_Model - Compressed.pdf
PPTX
Computer Networks (Computer Engineering) Unit-3 Data Link Layer & its Protoco...
PPT
Data Link Control Protocols
PPT
application layers
PPT
Lect21 09-11
PPTX
Unit IV_Flow.pptx
PPT
Flow Control (1).ppt
PPT
5 DLL-LLC- Book
PPT
data-link layer protocols
PPT
slide_for_HDLC_and_DLC_in_Chapter_Four.ppt
PPT
stop and wait
PPTX
Chapter 11: Data Link Control
Data link control & protocol concepts
Data Link Layer_Data Communications&Computer Neworks.pptx
Different protocols for data communication networks
CN_unit2.ppt Data Link Layer characteristics, categories
09 Data Link LayerFlow Control.ppt
Data Link Layer Protocols in Wide Access Network.ppt
DATA LINK CONTROL.pptx
Ch05_OSI_Reference_Model - Compressed.pdf
Computer Networks (Computer Engineering) Unit-3 Data Link Layer & its Protoco...
Data Link Control Protocols
application layers
Lect21 09-11
Unit IV_Flow.pptx
Flow Control (1).ppt
5 DLL-LLC- Book
data-link layer protocols
slide_for_HDLC_and_DLC_in_Chapter_Four.ppt
stop and wait
Chapter 11: Data Link Control
Ad

More from adpeer (8)

PDF
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
PDF
Chapter 9 - Spread Spectrum 9e
PDF
Chapter 1 - Data Communications, Data Networks, and the Internet
PDF
Chapter 2 - Protocol Architecture, TCP/IP, and Internet-Based Applications 9e
PDF
Chapter 4 - Transmission Media 9e
PDF
Chapter 5 - Signal Encoding Techniques 9e
PDF
Chapter 6 - Digital Data Communication Techniques 9e
PDF
Chapter 8 - Multiplexing 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 9 - Spread Spectrum 9e
Chapter 1 - Data Communications, Data Networks, and the Internet
Chapter 2 - Protocol Architecture, TCP/IP, and Internet-Based Applications 9e
Chapter 4 - Transmission Media 9e
Chapter 5 - Signal Encoding Techniques 9e
Chapter 6 - Digital Data Communication Techniques 9e
Chapter 8 - Multiplexing 9e

Recently uploaded (20)

PDF
My India Quiz Book_20210205121199924.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
HVAC Specification 2024 according to central public works department
PDF
advance database management system book.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
International_Financial_Reporting_Standa.pdf
PPTX
20th Century Theater, Methods, History.pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Complications of Minimal Access-Surgery.pdf
My India Quiz Book_20210205121199924.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Empowerment Technology for Senior High School Guide
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
What if we spent less time fighting change, and more time building what’s rig...
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Computer Architecture Input Output Memory.pptx
HVAC Specification 2024 according to central public works department
advance database management system book.pdf
Introduction to pro and eukaryotes and differences.pptx
International_Financial_Reporting_Standa.pdf
20th Century Theater, Methods, History.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Complications of Minimal Access-Surgery.pdf

Chapter 7 - Data Link Control Protocols 9e

  • 1. Data Link Control Protocols CEN 220/CIS 192 Advanced Data Communications and Networking Data and Computer Communications, W. Stallings 9/E, Chapter 7
  • 2. Data Link Control Protocols “Great and enlightened one,” said Ten-teh, as soon as his stupor was lifted, “has this person delivered his message competently, for his mind was still a seared vision of snow and sand and perchance his tongue has stumbled?” “Bend your ears to the wall,” replied the Emperor, “and be assured.” —Kai Lung's Golden Hours, Earnest Bramah
  • 3. Data Link Control Protocols When sending data, to achieve control, a layer of logic is added above the physical layer  data link control or a data link control protocol To manage exchange of data over a link:  frame synchronization  flow control  error control  addressing  control and data  link management
  • 4. Flow Control Ensure sending entity does not overwhelm receiving entity  prevent buffer overflow Influenced by:  transmission time • time taken to emit all bits into medium  propagation time • time for a bit to traverse the link Assumption is all frames are successfully received with no frames lost or arriving with errors
  • 5. Model of Frame Transmission
  • 6. Stop and Wait Simplest form of flow control Works well for a message sent in a few large frames  stop and wait becomes inadequate if large block of data is split into small frames by source
  • 7. Stop and Wait Link Utilization
  • 8. Sliding Windows Flow Control Allows multiple numbered frames to be in transit  receiver has buffer W long  transmitter sends up to W frames without ACK  ACK includes number of next frame expected  sequence number is bounded by size of field (k) • frames are numbered modulo 2k • giving max window size of up to 2k – 1  receiver can ACK frames without permitting further transmission (Receive Not Ready)  must send a normal acknowledge to resume If have full-duplex link, can piggyback acks
  • 11. Error Control Techniques Detection and correction of errors such as: lost frames -a frame fails to arrive at the other side damaged frames -frame arrives but some of the bits are in error
  • 12. Automatic Repeat Request (ARQ) Collective name for error control mechanisms Effect of arq is to turn an unreliable data link into a reliable one Versions of arq are:  stop-and-wait  go-back-N  selective-reject
  • 13. Stop and Wait ARQ Source transmits single frame Waits for ack • no other data can be sent until destination’s reply arrives If frame received is damaged, discard it  transmitter has timeout  if no ACK within timeout, retransmit If ack is damaged, transmitter will not recognize  transmitter will retransmit  receiver gets two copies of frame  use alternate numbering and ACK0 / ACK1
  • 15. Go-Back-N ARQ Most commonly used error control Based on sliding-window Use window size to control number of outstanding frames If no error, ack as usual If error, reply with rejection  destination will discard that frame and all future frames until frame in error is received correctly  transmitter must go back and retransmit that frame and all subsequent frames
  • 16. Go Back N - Handling Damaged frame  error in frame i so receiver rejects frame i  transmitter retransmits frames from i Lost frame  frame i lost and either • transmitter sends i+1 and receiver gets frame i+1 out of sequence and rejects frame i • or transmitter times out and sends ACK with P bit set which receiver responds to with ACK i  transmitter then retransmits frames from i
  • 17. Go Back N - Handling
  • 18. Selective-Reject (ARQ) 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 logic in transmitter  less widely used Useful for satellite links with long propagation delays
  • 20. High Level Data Link Control (HDLC)
  • 22. HDLC Frame Structure  uses synchronous transmission  transmissions are in the form of frames  single frame format used
  • 23. Flag Fields and Bit Stuffing Delimit frame at both ends with 01111110 Receiver hunts for flag sequence to synchronize Bit stuffing used to avoid confusion with data containing flag sequence 01111110  0 inserted after every sequence of five 1s  if receiver detects five 1s it checks next bit  if next bit is 0, it is deleted (was stuffed bit)  if next bit is 1 and seventh bit is 0, accepted as flag  if sixth and seventh bits 1, sender is indicating abort
  • 24. Address Field Identifies secondary station that transmitted or will receive frame Usually 8 bits long May be extended to multiples of 7 bits  leftmost bit indicates if is the last octet (1) or not (0) Address 11111111 allows primary to broadcast
  • 25. Control Field Different frame types  Information - data transmitted to user (next layer up) • flow and error control piggybacked on information frames  Supervisory - ARQ when piggyback is not used  Unnumbered - supplementary link control functions First 1-2 bits of control field identify frame type
  • 26. Control Field Use of poll/final (p/f) bit depends on context In command frame p bit set to 1 to solicit (poll) response from peer In response frame f bit set to 1 to indicate response to soliciting command Sequence number usually 3 bits  can extend to 8 bits as shown below
  • 27. Information & Frame Check Sequence (FCS) Fields
  • 28. HDLC Operation Consists of exchange of i-frames, s-frames and u-frames Involves three phases
  • 31. Summary Data link protocols – frame synchronization – flow control ● stop-and-wait, sliding window ● ACK frame ● error control – lost frame, damaged frame – stop-and-wait, go-back-N, selective-reject ARQs HDLC – NRM, ABM,ARM