You are on page 1of 26

Lecture

HDLC

5/1/2011 1
Objectives
 HDLC
o Stations
o Link configurations
o Transfer Mode
o Frame Structure

5/1/2011 2
High-Level Data Link Control (HDLC)

 HDLC was defined by ISO 3009, ISO 4335 for use on both point-to-point and
multipoint data links.
 It supports full-duplex communication
 Other similar protocols are
o Synchronous Data Link Control (SDLC) by IBM
o Advanced Data Communication Control Procedure (ADCCP) by ANSI
o Link Access Procedure, Balanced (LAP-B) by CCITT, as part of its X.25
packet-switched network standard

5/1/2011 3
HDLC Overview
Broadly HDLC features are as follows:

 Reliable protocol
o selective repeat or go-back-N
 Full-duplex communication
o receive and transmit at the same time
 Bit-oriented protocol
o use bits to stuff flags occurring in data
 Flow control
o adjust window size based on receiver capability
 Uses physical layer clocking and synchronization to send and receive
frames

5/1/2011 4
HDLC Overview
 Defines three types of stations
o Primary
o Secondary
o Combined
 Defines three types of data transfer mode
o Normal Response mode (NRM)
o Asynchronous Response mode (ARM)
o Asynchronous Balanced mode (ABM)
 Three types of frames
o Unnumbered
o Information
o Supervisory

5/1/2011 5
HDLC
The three stations are :
 Primary station
o Has the responsibility of controlling the operation of data flow of the
link.
o Handles error recovery.
o Frames issued by the primary station are called commands.

 Secondary station
o Operates under the control of the primary station.
o Frames issued by a secondary station are called responses.
o The primary station maintains a separate logical link with each
secondary station.

 Combined station
o Acts as both as primary and secondary station.
o Does not rely on other for sending data

5/1/2011 6
HDLC Link Configurations

The two configurations are :


 Unbalanced
o One primary and one or more secondary stations
o Supports full duplex and half duplex
 Balanced
o Two combined stations
o Supports full duplex and half duplex

5/1/2011 7
HDLC Transfer Modes (NRM)

 Normal Response Mode (NRM)


o Unbalanced configuration
o Primary initiates transfer to secondary
o Secondary may only transmit data in response to command from primary
o Used on multi-drop lines
o Host computer as primary
o Terminals as secondary

5/1/2011 8
HDLC Transfer Modes (NRM)

5/1/2011 9
HDLC Transfer Modes (ARM)

 Asynchronous Response Mode (ARM)


o Unbalanced configuration
o Secondary may initiate transmission without permission form primary
o Primary is responsible for line
o Reduces overhead as no frames need to be sent to allow secondary
nodes to transmit
o Transmission proceeds when channel is detected idle , used mostly in
point-to-point-links
o rarely used

5/1/2011 10
HDLC Transfer Modes (ABM)

 Asynchronous Balanced Mode (ABM)


 Balanced configuration
 Either station may initiate transmission without receiving permission
 Most widely used
 No polling overhead

5/1/2011 11
HDLC Transfer Modes (ABM)

5/1/2011 12
HDLC
 There are three different classes of frames used in HDLC
o Unnumbered frames used in link setup and disconnection, and hence
do not contain ACK.
o Information frames which carry actual information. Such frames can
piggyback ACK in case of ABM
o Supervisory frames which are used for error and flow control
purposes and hence contain send and receive sequence numbers

5/1/2011 13
Frame Structure Diagram

5/1/2011 14
Flag Fields

 Delimit frame at both ends


 01111110
 May close one frame and open another
 Receiver hunts for flag sequence to synchronize
 Bit stuffing is used to avoid confusion with data containing 01111110
o 0 inserted after every sequence of five 1s
o If receiver detects five 1s it checks next bit
o If 0, it is deleted
o If 1 and seventh bit is 0, accept as flag
o If sixth and seventh bits 1, sender is indicating abort

5/1/2011 15
Bit Stuffing

 Example with possible errors

5/1/2011 16
Bit Stuffing

 Example with possible errors

5/1/2011 17
Address Field

 Identifies secondary station that sent or will receive frame


 Usually 8 bits long
 May be extended to multiples of 7 bits
 Left most bit of each octet indicates that it is the last octet (1) or not (0)
of the address field
 All ones (11111111) is broadcast

5/1/2011 18
Control Field

 Different for different frame type


o Information - data to be transmitted to user (next layer up)
 Flow and error control piggybacked on information frames
o Supervisory - ARQ when piggyback not used
o Unnumbered - supplementary link control
 First one or two bits of control filed identify frame type
 Remaining bits explained later

5/1/2011 19
Control Field

5/1/2011 20
Supervisory Frame
 There are four different supervisory frames
o SS=00, Receiver Ready (RR), and N(R) ACKs all frames received up to
and including the one with sequence number N(R) - 1
o SS=10, Receiver Not Ready (RNR), and N(R) has the same meaning as
above
o SS=01, Reject; all frames with sequence number N(R) or higher are
rejected, which in turns ACKs frames with sequence number N(R) -1 or
lower.
o SS=11, Selective Reject; the receive rejects the frame with sequence
number N(R)

5/1/2011 21
Unnumbered Frame
 The unnumbered frames can be grouped into the following categories:
o Mode-setting commands and responses
o Recovery commands and responses
o Miscellaneous commands and responses

5/1/2011 22
Poll/Final Bit

 Use depends on context


 Command frame
o P bit
o 1 to solicit (poll) response from peer
 Response frame
o F bit
o 1 indicates response to soliciting command

5/1/2011 23
Information Field

 Only in information and some unnumbered frames


 Must contain integral number of octets
 Variable length

5/1/2011 24
Frame Check Sequence Field

 FCS
 Error detection
 Normal code is 16 bit CRC
 Optional 32 bit CRC (Frame length, Line reliability)

5/1/2011 25
References
[1] William Stallings, Data and Computer Communications, Prentice Hall, New
Jersey, 6th ed, 2000, ISBN 0-13-086388-2.
[2] James F. Kurose and Keith W. Ross, Computer Networking A Top-Down
Approach Featuring the Internet, …………………………….

5/1/2011 26

You might also like