Example Data Link Protocols: Bit-Oriented & Character-Oriented Protocols
Example Data Link Protocols: Bit-Oriented & Character-Oriented Protocols
Savera Tanwir
1
HDLC
High Level Data-link Control
ISO 13239
Bit-oriented data link layer protocol
Provides both connectionless and connection-oriented
services to Network Layer
Can be used for point-point as well as point-multipoint
(usually for wireless) connections
Framing
HDLC can operate on both synchronous & asynchronous
links
Each frame begins and ends with a frame delimiter bit-
pattern – 01111110
When no frames are being transmitted on a synchronous link,
the frame delimiter is continuously transmitted
It generates a continuous bit pattern used by modems to train and
synchronize their clocks
2
Types of Stations
Primary terminal
Responsible for operation control over the link
It issues the frames which are called commands
Secondary terminal
operates under the control of the primary
Frames issues, are responses only
Primary is linked with secondaries by multiple logical links
Combined terminal
Has the features of both primary and secondary terminals
It issues both commands and responses
Address Field
Contains address of the Slave/Secondary station
Control Field
Used for Seq #, ACKs and other control features etc.
Data Field
Variable length, but has an upper limit depending on the network
Checksum Field
CRC-16 of Address, Control and Data fields (x16 + x12 + x5 + 1)
Minimum frame contains three fields and total 32 bits,
excluding the flags on either side
3
Frame Types
Three kinds of frames in HDLC
Information Frames
To transport user data (both normal data & piggybacked control
data)
Supervisory Frames
To transport control data only
used whenever piggybacking is impossible or inappropriate
Unnumbered Frames
To transport link management and control information
Control field of
(a) An information frame.
(b) A supervisory frame.
(c) An unnumbered frame.
4
I-Frame Format
Seq Field
Three bits to denote the seq # of the frame
Poll/Final Flag
It is used to signal which side is ‘talking’
When a primary station has finished transmitting a series of frames, it
sets the Poll bit to obtain a response from a secondary station, thus
giving control to the secondary station
At this time the secondary station may reply to the primary station
When the secondary station finishes transmitting its frames, it sets the
Final bit and control returns to the primary station
Next Field
Three bits to denote the seq # of the piggybacked +ve ACK
S-Frame Format
Type Field
Used to distinguish the 4 types of S-Frames
Receive Ready (RR)
00 – +ve ACK and cancels a previous RNR
Receive Not Ready (RNR)
10 – +ve ACK plus receiver cannot receive more I-frames
Reject (REJ)
01 – Signals NAK for Go-Back-N protocol
Selective Reject (SREJ)
11 – Signals NAK for Selective Repeat protocol
Next Field
Three bits to denote the Seq # of the ACK or NAK
5
U-Frame Format
Command/response Meaning
SNRM Set normal response mode
6
The Data Link Layer in the
Internet
A home personal computer acting as an internet host.
7
PPP Advantages and Benefits
1. Specification of the encapsulated protocol, to
allow multiple Layer 3 protocols to be
multiplexed on a single link
2. Error detection for each transmitted frame
through the use of a CRC code in each frame
header
3. A robust mechanism for negotiating link
parameters, including the maximum frame size
permitted
8
PPP Components
The PPP standard itself describes three “main”
components of PPP:
PPP Encapsulation
The primary job of PPP is to take higher-layer messages
such as IP datagrams and encapsulate them for
transmission over the underlying physical layer link
9
Link Control Protocol (LCP)
LCP is responsible for setting up, maintaining, testing,
negotiating and terminating the data-link connection
between devices
10
Connection Establishment
“A host machine (PC) calling ISP for internet connectivity”
Time
11
Connection Release
“When data transfer is over”
12
Frame Format of PPP
Control field
Controls services offered to the network layer
Protocol field
Kind of packet in the payload e.g. LCP, NCP, IP, IPX, AppleTalk etc.
0 — Refers to Network layer protocols like IP, IPX etc.
1 — Refers to negotiation protocols e.g., LCP, NCP
Payload field
Variable length, up to some max. size negotiated by LCP at setup time
Default is 1500 bytes
CRC Checksum
13
LCP Overview
LCP is used to negotiate data link protocol options
during ESTABLISH phase
Deals with the way for the initialization process to make a
proposal and for the responding process to accept or
reject it
Allows testing of line quality
Network Layer protocol configuration negotiation (NCP
comes in here)
Handles connection termination
14
LCP frame types
11 types defined in RFC 1661
15
Authentication Protocols
Password Authentication Protocol (PAP)
A simple authentication protocol with a two-step process
16
Challenge Handshake Authentication
Protocol (CHAP)
It is a three-way hand-shaking authentication
protocol that provides more security than PAP
Password is kept secret and never sent online
17
Acknowledgements
Ali Sajjad’s lecture slides
18