Sie sind auf Seite 1von 21

High-level Data Link Control (HDLC)

HDLC is a bit-oriented protocol for communication over point-to-point and multipoint links.

It implements the ARQ mechanisms

HDLC Terminologies

most important data link control protocol


specified as ISO 3009, ISO 4335 basis for other data link control protocols

Station types:
Primary controls operation of link Secondary under control of primary station Combined issues commands and responses

Link configurations
Unbalanced - 1 primary,1 or multiple secondary Balanced - 2 combined stations

HDLC transfer modes Normal response mode (NRM) :


configuration is unbalanced. We have one primary station and multiple secondary stations. A primary station can send commands; a secondary station can only respond. The NRM is used for both point-to-point and multiplepoint links. Asynchronous balanced mode (ABM). In asynchronous balanced mode (ABM), the configuration is balanced. The link is point-to-point, and each station can function as a primary and a secondary

Normal response mode-NRM

Asynchronous balanced mode-ABM

HDLC Frame

Uses synchronous transmission Transmissions are in the form of frames Single frame format used

HDLC Frames Types


Three types 1) Information frames (I-frames):
Transport user data and control information (ACK & NAK) with piggybacking

2) Supervisory frames (S-frames): only to transport control information. When no piggybacking is used. 3) Unnumbered frames (U-frames): U-frames are used for carrying system management. Information carried by U-frames is intended for the- link management (e.g. link set up, release)

Frame format

Frame fields

Flag field: The flag field is an 8-bit sequence 01111110 that identifies both the start & the end of a frame. Bit stuffing used to avoid confusion with data containing flag sequence 01111110.
0 inserted after every sequence of five 1s

Address Field
1) Identifies secondary station that transmitted or will receive frame usually 8 bits long may be extended to multiples of 7 bits 2) leftmost bit indicates if is the last octet (1) or not (0). 3) Address 11111111 allows primary to broadcast 4) One byte can identify up to 128 stations (l bit is reserved)

Control field. The control field is a 1- or 2-byte segment of the frame used for flow and error control.

Information field. The information field contains the user's data from the network layer or management information. Its length can vary from one network to another. FCS field. The frame check sequence (FCS) is the HDLC error detection field. It can contain either a 2- or 4-byte CRC.

Control field

Control Field for I-Frames


The first bit defines the type. If the first bit of the control field is 0, this means the frame is an I-frame. The next 3 bits, called N(S), define the sequence number of the frame. The last 3 bits, called N(R), correspond to the acknowledgment number when piggybacking is used. The single bit between N(S) and N(R) is called the P/F bit.. It has meaning only when it is set (bit = 1) and can mean poll or final. 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

Control Field for S-Frames

Used for flow and error control whenever piggybacking is either impossible or inappropriate The last 3 bits, called N(R), corresponds to the ACK number or NAK number depending on the type of S-frame.

The 2 bits called code is used to define the type of S-frame itself. With 2 bits, we can have four types of S-frames

Types of S-frames
A) code-00-Receive ready (RR): acknowledges the
receipt of a safe & sound frame or group of frames. In this case, the value N(R) field defines the acknowledgment number.

B) code-10 Receive not ready (RNR):


It acknowledges the receipt of a frame or group of frames, and it announces that the receiver is busy and cannot receive more frames. It acts as a kind of congestion control mechanism by asking the sender to slow down. its a RR frame with special feature

C) code-01 Reject (REJ): It is a NAK that can be used in Go-Back-N ARQ to improve the efficiency of the process by informing the sender, before the sender time expires, that the last frame is lost or damaged. The value of N(R) is the negative acknowledgment number.

D) code-11Selective reject (SREJ): This is a NAK frame used in Selective Repeat ARQ. Note that the HDLC Protocol uses the term selective reject instead of selective repeat. The value of N(R) is the negative acknowledgment number.

Control Field for U-Frames


Unnumbered frames are used to exchange session management and control information between connected devices.

2-bit prefix before the P/F bit and a 3-bit suffix after the P/F bit. Together, these two segments (5 bits) can be used to create up to 32 different types of U-frames.

HDLC Operation
Consists of exchange of I-frames, S-frames and U-frames Involves three phases
Initialization either side may request by issuing one of the six set-mode commands Data Transfer with flow and error control using both I and S-frames (RR, RNR, REJ, SREJ) Disconnect when fault noted or at request of higher-layer user sends a disconnect (DISC) frame

HDLC Operation Example

HDLC Operation Example

Das könnte Ihnen auch gefallen