Data Link Layer:
UNIT-III
Data Link Control
2
Outline
 Framing
 Byte vs. bit oriented protocols
 Data Link Control
 Flow control
 Error control
 Protocols
3
Framing
 Process of wrapping data with certain info before
sending out
 A frame typically consists of
 Flag: indication for start and end of a frame
 Header: source/destination addresses, as well as other
control information
 Data from the upper layer
 Trailer: error detection/correction code
4
Byte vs. Bit Oriented
 Framing in byte-oriented protocols
 Framing in bit-oriented protocols
5
Byte Stuffing
 Process of adding extra byte whenever there is
an escape or a flag character in the data
6
Bit Stuffing
 Process of adding extra bit to ensure flag
sequence does not appear in the data
01111110
7
Flow Control and Error Control
 Flow control
 A set of procedures that tells the sender how
much data can be sent before waiting for
acknowledgment
 Error control
 Includes both error detection and correction
 Allows receiver to inform sender of lost or
duplicate frames
 Mostly based on Automatic Repeat Request
(ARQ)
8
Data Link Protocols
9
Protocols for Noiseless Channel
 Assuming channel is error free
 Not realistic…
 No need for error control
10
"Simplest" Mechanism
 Assuming
 Noiseless channel
 Unlimited buffer and speed for the receiver
11
"Simplest" : Pseudo Code
 Sender
 Receiver
12
"Simplest": Flow Diagram
13
Stop-and-Wait Mechanism
 Still noiseless channel
 Receiver has limited buffer
 Requires flow control
 Sender sends one frame at a time and
wait for an acknowledgment
14
Stop-and-Wait: Overview
15
Stop-and-Wait: Pseudo Code
 Sender side
16
Stop-and-Wait: Pseudo Code
 Receiver side
17
Stop-and-Wait: Flow Diagram
18
Noisy Channel
 Realistic
 Error can and will happen
 Require error control
 Mechanisms:
 Stop-and-Wait ARQ
 Go-Back-N ARQ
 Selective Repeat ARQ
19
Stop-and-Wait ARQ
 Sender keeps a copy of sent frame until
successful delivery is ensured
 Receiver responds with an ack when it
successfully receives a frame
 Both data and ack frames must be
numbered
 When sender does not receive an ack
within certain time, it assumes frame is
lost, then retransmits the same frame.
20
Stop-and-Wait ARQ
21
Flow Diagram: Normal Operation
Time
Sender Receiver
Time
S = 0
S = 1
R = 0
R = 1
R = 0
Deliver
Deliver
22
 Thinking Corner
 Why data frames need to be numbered?
23
Flow Diagram: Lost Frame
Time
Sender Receiver
Time
S = 0 R = 0
R = 1
R = 0
S = 1
Timeout
Deliver
Deliver
24
Flow Diagram: Lost ACK
Time
Sender Receiver
Time
S = 0 R = 0
R = 1
R = 0
S = 1
Timeout S = 1
S = 0
R = 0
Frame 0 expected;
discard
Deliver
Deliver
25
 Thinking Corner
 Why ACK frames need to be numbered?
26
Flow Diagram: Delayed ACK
Sender Receiver
S = 0 R = 0
R = 1
R = 0
Timeout
S = 1
S = 0
R = 1
Frame 0 expected;
discard
Deliver
Timeout
Deliver
27
Bidirectional Transmission
 Data are transferred both ways
 ACK are "piggybacked" with data frames
28
Example
 Assuming a communication system where:
 Stop-and-Wait ARQ is used
 Bandwidth of the link is 1 Mbps
 Propagation delay is 10 ms
 One-way data flow
 Questions
 What is the bandwidth-roundtrip-delay product?
 If the system data frames are 1000 bits in length,
what is the utilization percentage of the link?
29
Improving Link Utilization
 Previous example demonstrates major
disadvantage of Stop-and-Wait ARQ
 Prefer to send more frames before waiting
for ACK
 Example:
 Recalculate the link utilization if we allow up
to 15 frames to be sent before waiting for an
ACK
30
Go-Back-N ARQ
 Allows multiple frames to be sent before
waiting for ACK
 These frames must be numbered differently
 Frame numbers are called Sequence numbers
 Frames must be received in the correct
order
 If a frame is lost, the lost frame and all of
the following frames must be
retransmitted
31
Sequence Numbers
 Frame header contains m bits for
sequence number
 That allows up to 2m different frame
numbers
 How big should m be?
32
Sending Window
 Sending more than one frame at once requires
sender to buffer multiple frames
 Known as "sending window"
 Any of these frames in the window can be lost
33
"Sliding" Window
 Once the first frames in the window is ACKed
 ACKed frames are removed from the buffer
 More frames are transmitted
 Result: The window slides to the right
34
Receiving Window
 Receiver expects one frame at a time
35
Send vs. Receive Windows
36
Go-Back-N: Window Sizes
 For m-bit sequence numbers
 Send window size: at most 2m-1
 Up to 2m-1 frames can be sent without ACK
 Receive window size: 1
 Frames must be received in order
37
Go-Back-N: Normal Operation
38
Go-Back-N: Lost Frame
ACKs are
cumulative
39
Lost ACK: Window Size < 2m
40
 Thinking Corner
 What is a problem if send window is
greater than 2m-1?
41
Lost ACK: Window Size = 2m
42
 Thinking Corner
 Stop-and-Wait is a special case of Go-
Back-N.
 What is the send window size in Stop-and-
Wait?
43
Selective Repeat ARQ
 Go-Back-N always discards out-of-order
frames
 Losing one frame may result in retransmission
of multiple frames
 Very inefficient in noisy link
 Selective Repeat ARQ allows frames to be
received out of order
 Therefore, receive window > 1
44
Send and Receive Windows
 Sender and receiver share window space
equally
 For m-bit sequence numbers
 Send window: up to 2m-1
 Receive window: up to 2m-1
45
Send Window
46
Receive Window
47
Negative ACK
 Used by receiver to indicate missing frame
48
Selective Repeat: Window Size
Data Link Control Protocols:
HDLC and PPP
50
HDLC
 High-level Data Link Control
 Bit-oriented protocol
 Support both
 Point-to-point links
 Multipoint links
51
Normal Response Mode
 "NRM" mode
 Used in both point-to-point and multi-point link
52
Asynchronous Balance Mode
 "ABM"
 Supports only point-to-point links
 Each station is both primary and
secondary
53
HDLC Frames
 Information frame (I-frame)
 Supervisory frame (S-frame)
 Unnumbered frame (U-frame)
Frame Check Sequence
(error detection code)
54
Control Field Format
 N(S) – Frame sequence number
 N(R) – Ack sequence number
 P/F
 Poll (primary  secondary)
 Final (secondary  primary)
55
U-Frame Codes
56
Connection and Disconnection
57
Data Transfer: No Error
58
Data Transfer: With Error
59
PPP
 Point-to-Point Protocol
 Byte-oriented protocol
 Most common protocol for point-to-point
access
 Dial-up access
 ADSL
 GPRS/EDGE/3G
60
PPP Frame Format
 Escape byte: 01111101
 Control field uses HDLC's U-frame format
 No flow or error control
61
PPP Transition States
62
Multiplexing in PPP
63
PPP Stack
 Link Control Protocol (LCP)
 Authentication Protocol (AP)
 Network Control Protocol (NCP)
64
LCP: Link Control Protocol
 Responsible for establishing, maintaining,
configuring, and terminating links
65
PPP Authentication
 Two protocols are supported:
 Password Authentication Protocol (PAP)
 Challenge Handshake Authentication Protocol
(CHAP)
66
PAP
67
CHAP
68
NCP: Network Control Protocol
 A set of control protocols to allow data from the
network layer to be encapsulated into a PPP
frame
 One common protocol: IPCP
(Internetwork Protocol Control Protocol)
 Allow negotiation at the network layer
69
Data Encapsulation
70
Example: PPP Session
71
Example: PPP Session (cont'd)

More Related Content

PPT
12. Protocol_Framing Byte vs. bit oriented protocols Data Link Control Flow c...
PPT
Flow Control (1).ppt
PDF
14-Error Detection Techniques-22-01-2025.pdf
PPTX
Data link control & protocol concepts
PPTX
Different protocols for data communication networks
PPT
TCP Part I How does it work - module13-tcp1.ppt
PPTX
Transport layer in OSI Layers in detail.pptx
PPTX
08 - COMS 525 Internet Protocols and TCPIP - TCP 1.pptx
12. Protocol_Framing Byte vs. bit oriented protocols Data Link Control Flow c...
Flow Control (1).ppt
14-Error Detection Techniques-22-01-2025.pdf
Data link control & protocol concepts
Different protocols for data communication networks
TCP Part I How does it work - module13-tcp1.ppt
Transport layer in OSI Layers in detail.pptx
08 - COMS 525 Internet Protocols and TCPIP - TCP 1.pptx

Similar to document.pdf (20)

PPT
application layers
PPT
Lect21 09-11
PPT
Data Link Control.ppt
PPT
PPT
PPT
Transmission control protocol _
PPTX
Datalink control(framing,protocols)
PPT
Transmission control protocol ...............................
PPTX
Week5 lec3-bscs1
PPT
CN_unit2.ppt Data Link Layer characteristics, categories
PPT
JNTUHS-18-12-2024 - Copy.ppt computer networks notes
PPTX
New framing-protocols
PPT
09 Data Link LayerFlow Control.ppt
PPT
Data_Link_Layer.ppt
PPT
Data Link Layer of OSI Model responsibilities
PDF
Chapter 7 - Data Link Control Protocols 9e
PDF
PCCN DATA LINK LAYER UNIT 4 NOTES
PPT
Module15: Sliding Windows Protocol and Error Control
PPTX
Reliablt transmission
PPTX
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
application layers
Lect21 09-11
Data Link Control.ppt
Transmission control protocol _
Datalink control(framing,protocols)
Transmission control protocol ...............................
Week5 lec3-bscs1
CN_unit2.ppt Data Link Layer characteristics, categories
JNTUHS-18-12-2024 - Copy.ppt computer networks notes
New framing-protocols
09 Data Link LayerFlow Control.ppt
Data_Link_Layer.ppt
Data Link Layer of OSI Model responsibilities
Chapter 7 - Data Link Control Protocols 9e
PCCN DATA LINK LAYER UNIT 4 NOTES
Module15: Sliding Windows Protocol and Error Control
Reliablt transmission
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
Ad

Recently uploaded (20)

PDF
First part_B-Image Processing - 1 of 2).pdf
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
PDF
Design of Material Handling Equipment Lecture Note
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PPTX
ai_satellite_crop_management_20250815030350.pptx
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
PRASUNET_20240614003_231416_0000[1].pptx
PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
PDF
Java Basics-Introduction and program control
First part_B-Image Processing - 1 of 2).pdf
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
Design of Material Handling Equipment Lecture Note
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
August -2025_Top10 Read_Articles_ijait.pdf
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
ai_satellite_crop_management_20250815030350.pptx
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PRASUNET_20240614003_231416_0000[1].pptx
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
CyberSecurity Mobile and Wireless Devices
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
Java Basics-Introduction and program control
Ad

document.pdf