Basic Concepts From Computer Networks
2.4 The high data link control (HDLC) protocol
This protocol is widely used and it is the basis for many other important data link protocols. It was derived from IBM’s data link protocol synchronous data link control
(SDLC). It was later on modified and standardized by ISO as the high data link control
(HDLC) protocol. HDLC was designed to satisfy different types of stations, link configurations, and transfer modes. The following three types of stations were defined:
primary, secondary, and combined. A primary station is responsible for controlling the operation of the link, a secondary station operates under the control of a primary station, and a combined station has the features of both the primary and the secondary station.
Information
Address FCS
Flag
8 bits 8 bits 8 or 16 bits !!! variable 16 or 32 bits 8 bits Flag Control
Figure 2.8: The HDLC frame
Also, the following types of link configurations were defined: unbalanced and balanced. An unbalanced configuration consists of one primary and one or more secondary stations and it supports both full-duplex and half-duplex transmission. A balanced configuration consists of two combined stations and it supports both full-duplex and half-duplex transmission. Based on these station types and configurations, the following three data transfer modes were defined: normal response time mode (NRM), asynchronous balanced mode (ABM), and asynchronous response mode (ARM). NRM is used with an unbalanced configuration. The primary station initiates data transfers to the secondary stations, and a secondary station may only transmit data in response to a command from the primary. NRM is used in multi-drop lines connecting terminals to a host. ABM is used with a balanced configuration, and it is the most widely used transfer mode for a full-duplex point-to-point link. Either combined station may initiate a transmission without receiving the permission from the other combined station. Finally, ARM is based on an unbalanced configuration and it is rarely used.
HDLC is a bit-oriented protocol and it uses the frame structure shown in figure 2.8. A single format is used for all data and control exchanges. The frame is delimited by a flag which contains the unique pattern 01111110. If frames are transmitted back-to-
back, a single flag may be used to indicate the end of one frame and the beginning of the next one. Obviously, the pattern 01111110 can be easily encountered within a frame, in which case, it will be interpreted as the end of the frame. In order to avoid this from happening, a technique known as bit stuffing is used. The sender always inserts an extra 0 after the occurrence of five consecutive 1’s. The receiver monitors the bit stream looking for five consecutive 1’s. When this pattern appears, the receiver examines the sixth bit. If it is a 0, it is deleted from the bit stream. If it is a 1 and the seventh bit is a 0, the receiver interprets the bit pattern as a delimiting flag. If the sixth bit is a 1 and the seventh bit is also a 1, then it is an error.
1 2 3 4 5 6 7 8 0 N(S) P/F N(R) 1 P/F N(R) 1 M P/F M 0 1 I-frame S-frame U-frame S
Figure 2.9: The control field of the HDLC frame
The second field in the HDLC frame is the address field. This is an 8-bit field used in multi-drop lines and it is used to identify the secondary station to which the frame is transmitted. It is not necessary in a point-to-point link.
The third field in the HDLC frame is the control field. It is an 8-bit field, extendible to a 16-bit field, and its structure is shown in figure 2.9. It is used to identify the following three types of frame: information frame (I-frame), supervisory frame (S- frame), and unnumbered frame (U-frame). An I-frame is used to carry data and ARQ control information, an S-frame is used to carry only ARQ control information, and a U- frame is used to provide supplemental link control functions. If the first bit of the control field is 0, then the frame is an I-frame. Otherwise, depending on the value of the second bit, it may be an S-frame or a U-frame. The meaning of the remaining sub-fields is as follows:
N(R): receive sequence
S: supervisory function bits
M: unnumbered function bits
P/F: poll/final bit.
During a typical exchange of information between two stations, say A and B, both stations receive and send data. This means that there are two separate ARQ mechanisms, one for the data sent from A to B and another for the data sent from B to A. The fields N(R) and N(S) in the I-frame are used to carry information for both the ARQ mechanisms piggy-backed on the frames carrying data. N(R) is used by station A to indicate to station B the current status of the ARQ from B to A, and N(S) is used by station A to indicate the sequence number of the frame that it is transmitting to B. S- frames are used when no I-frames are exchanged and also to carry supplementary control information.
The information field is only present in the I-frames and in some U-frames. The FCS is calculated using a 16-bit CRC. A 32-bit CRC is optional.
2.5 Synchronous time division multiplexing (TDM)
Time division multiplexing permits a data link to be utilized by many sender/receiver pairs, as shown in figure 2.10. A multiplexer combines the digital signals from N incoming links into a single composite digital signal, which is transmitted to the demultiplexer over a link. The demultiplexer breaks out the composite signal into the N individual digital signals and distributes them to their corresponding output links. In the
multiplexer, there is a small
M U X D E M U X N input links N output links link 1 2 N 1 2 N