Basics Of Data Communication: Part 6


High-level Data Link Control (HDLC)

It is the most important data link control protocol is HDLC. It is not only widely used, but also it is the basis for many other important data link control protocols, which use the same or similar formats and the same mechanisms as employed in HDLC.

Characteristics of HDLC

To satisfy a variety of applications, HDLC defines three types of stations, two link configurations and three data-transfer modes of operation.

The three station types are:

  1. Primary Station

    It has responsibility for controlling the operation of the link. Frames issued by the primary are called commands.
  2.  
  3. Secondary Station

    It has responsibility for controlling operations under the control of the primary station. Frames issued by a secondary are called responses. The primary maintains a separate logical link with each secondary station on the line.
     
  4. Combined Station

    It combines the features of primary and secondary stations. A combined station may issue both commands and responses.

The two link configurations are:
  1. Unbalanced Configuration

  2. It consists of one primary and one or more secondary stations and supports both full-duplex and half-duplex transmission.
     
  3. Balanced Configuration

    It consists of two combined stations and supports both full-duplex and half-duplex transmission.


The three data transfer modes are:

  1. Normal Response Mode (NRM)

    It is used with an unbalanced configuration. The primary may initiate data transfer to a secondary but a secondary may only transmit data in response to a command from the primary.
     
  2. Asynchronous Balanced Mode (ABM)

    It is used with an balanced configuration. Either combined station may initiate transmission without receiving permission from the other combined station.
     
  3. Asynchronous Response Mode (ARM)

    It is used with an unbalanced configuration. The secondary may initiate transmission without explicit permission of the primary. The primary still retains responsibility for the line, including initialization, error recovery and logical disconnection.

HDLC Frame Structure


HDLC is most important data link control protocol. It uses synchronous transmission. Any transmission is held in the form of frames and a single frame format suffices for all types of data and control exchange.

Here is the list of frame structure part:
  1. Flag Fields

    It delimits the frame at both ends with the unique pattern 01111110. A single flag may be used as the closing flag for one frame and the opening flag for the next. On both sides of the user-network interface, receivers are continuously hunting for the flag sequence to synchronize on the start of a frame. While receiving a frame, a station continues to hunt for that sequence to determine the end of the frame. However, it is possible that the pattern 01111110 will appear somewhere inside the frame, thus destroying frame-level synchronization. To avoid this, a procedure known as bit stuffing is used.
  2.  
  3. Address Field

    The address field identifies the primary or secondary stations involvement in the frame transmission or reception. Each station on the link has a unique address. In an unbalanced configuration, the A field in both commands and a response refers to the secondary station. In a balanced configuration, the command frame contains the destination station address and the response frame has the sending station's address.
     
  4. Control Field

    HDLC uses the control field to determine how to control the communications process. This field contains the commands, responses and sequences numbers used to maintain the data flow accountability of the link, defines the functions of the frame and initiates the logic to control the movement of traffic between sending and receiving stations. There three control field formats:
     
    • Information Transfer Format (I-Frame)

      The frame is used to transmit end-user data between two devices.
    •  
    • Supervisory Format (S-Frame)

      The control field performs control functions such as acknowledgment of frames, requests for re-transmission, and requests for temporary suspension of frames being transmitted. Its use depends on the operational mode being used.
       
    • Unnumbered Format (U-Frame)

      This control field format is also used for control purposes. It is used to perform link initialization, link disconnection and other link control functions.
       
  5. Information Field

    This field presents only Information Frame (I-Frame) and Unnumbered-Frame (U-Frame). The field can contain any sequence of bits but must consist of integral number octets. The length of the information field is variable up to some system-defined maximum.
     
  6. FCS (Frame Check Sequence) Field

    It is an error-detecting code, calculated from the remaining bits of the frame, exclusive of flags. The normal code is the 16-bit CRC (Cyclic Redundancy Check). An optional 32-bit FCS, using CRC-32, may be employed if the frame length or the line reliability dictates this choice.

HDLC Operation


HDLC operation consists of the exchange of I-Frame, S-Frame and U-Frame between two or more stations. The operation of HDLC involves three most important phases. First, one side or another initializes the data link so that frames may be exchanged in an orderly fashion. During this phase, the options that are to be used are agreed upon. After initialization, the two sides exchange user data and the control information to exercise flow and error control. Finally, one of the two sides signals the termination of the operation.

Initialization

This is done by either side by issuing one of the six set-mode commands as described in Frame Structure. This command serves three purposes:
  • It signals the other side that initialization is required.
  • It specifies which of the three modes (NRM, ABM, ARM) is required.
  • It specifies whether 3 or 7 bit sequence numbers are to be used.
If the other side accepts this request, then the HDLC module on that end transmits an unnumbered acknowledged (UA) frame back to the initiating side. If the request is rejected then a disconnected mode (DM) frame is sent.

Data Transfer

When the initialization has been requested and accepted, then a logical connection is established. Both sides may begin to send user data in I-frames. Flow control and error control are provided by using the N(s) and N(r) fields (send/receive sequence number). A station numbers the frames it sends sequentially modulo 8 or 128, depending on whether 3- or 7-bit sequence numbers are used, and places the sequence number in N(s). When a station receives a valid I-frame, it acknowledges that frame with its own I-frame by setting the N(r) field to the number of the next frame it expects to receive. This is known as piggi-backed acknowledgment, since the acknowledgment rides back on an I-frame. Acknowledgments can also be sent on a supervisory frame.

The use of sequence numbers accomplishes three important functions:
  • Flow Control

    A station is only allowed to send 7 frames (3-bit sequence number) or 127 frames (7-bit sequence number) without an acknowledgment. No more frames may be sent until some of the outstanding frames are acknowledged. Thus, if the receiver is slow to acknowledge, the sender's output is restricted.
  •  
  • Pipelining

    More than one frame may be in transit at a time; this allows more efficient use of links with high propagation delay, such as satellite links.
     
  • Error Control

    If a frame is received in error, a station can send a negative acknowledgment via a supervisory frame to specify which frame was received in error. This may be done in one of two ways. In the go-back-N() approach, the sending station retransmits the rejected frame plus all subsequent frames that have been transmitted since the rejected frame. In the selective-repeat approach, the sending station retransmits only the frame received in error.
Supervisory Frames:-

There are four types of S-frames. The receive-ready (RR) frame is used to acknowledge the last I-frame received by indicating the next I-frame expected. The RR is used when there is no reverse use data traffic (I-frames). Receive-not-ready (RNR) acknowledges an I-frame, as with RR, but also asks the peer entity to suspend transmission of I-frames. When the entity that issued the RNR is again ready, it sends an RR. REJ indicates that the last I-frame received has been rejected and that retransmission of all I-frames beginning with number N(r) is required. Selective reject (SREJ) is used to request retransmission of just a single frame.

Disconnect

Either HDLC module can initiate disconnect, either on its own initiative if there is some sort of fault, or at the request of its higher-layer user. HDLC issues disconnect by sending disconnect (DISC) frame. The other side must accept disconnect by replying with an acknowledgement.



Note:
Continue in Next Part.


HAVE A HAPPY CODING!
 

Up Next
    Ebook Download
    View all
    Learn
    View all