All new data link protocols are bit-oriented. It should be recalled that such protocols are defined bit patterns rather than transmission control characters, to signal the start and end of a frame. The receiver searches the received bit stream on a bit-to-bit basis, for the known start-of-frame and end-of-frame bit pattern. Three methods of signaling the start and end of a frame - known as frame delimiting - are:
In general, the first is used with high-level data link control (HDLC), while the other two are used with the logical link control (LLC) protocol.
The HDLC protocol is an international standard that has been defined by ISO for use on both point-to-point and multidrop data links. It supports full-duplex, transparent-mode operation and is now extensively used in both multipoint and computer networks.
HDLC has three operational modes:
In HDLC, the frames sent by the primary to the secondary station are known as commands and those from the secondary to the primary as responses .
Unlike BSC, in HDLC both data and control information is carried in a standard format frame, as shown below:
The frame flag is a special sequence of bits used to indicate the beginning and end of a frame. However, there is the a chance of this bit pattern occurring randomly within a frame and thus, to prevent this from happening, the transmitter automatically inserts a zero after any five consecutive ones - known as bit stuffing. The additional zero is discarded by the receiver.
The contents of the address field depend on the mode of operation. In NRM, every secondary station is assigned a unique address. Whenever, the primary station communicates with a secondary, the address field contains the address of the secondary.
Certain addresses known as group addresses can be assigned to more than one secondary station. All frames transmitted with a group address are received by all stations in that group - a broadcast address can be used to transmit a frame to all secondary stations on the link.
When a secondary station returns a response message to the primary, the address field always contains the unique address of that secondary. It should be made clear that in the case of large networks containing a large number of secondaries, the address field may be extended beyond eight bits.
The control field indicates whether a particular frame is an:
The P/F bit is known as the poll/final bit. It is used by a primary station to poll a secondary station or by a secondary station to indicate the final frame of a message.
The frame check sequence (FCS) is a 16-bit cyclic redundancy checksum for the complete frame contents enclosed between the two flag delimiters, other than stuffed zeroes. The receiver repeats the calculation and discards the frame if an error is found.
It is often helpful to list some of the frame types and to outline their functions. As mentioned previously three classes of frame are used:
Nr acts as an acknowledgment to the other station, indicating that all information frames numbered up to (Nr - 1) have been correctly received.
Lastly, HDLC and similar bit-oriented protocols offer a number of advantages over character-oriented protocols: