46 Communication Networks
Copyright © 2005 PragSoft
To synchronize, the transmitter repeatedly sends a SYN character which the receiver looks for. Once the receiver has detected the SYN character, the two
stations handshake to confirm that they are synchronized and can start exchanging data. Information is exchanged in character blocks. Figure 3.32 shows a sample
block.
Figure 3.32 Sample BSC block. Field
Description
SYN Synchronization character.
SOH Start-of-Header character.
Header Used for control purposes.
STX Start-of-Text character.
Data Actual user data of variable length and arbitrary content.
ETX End-of-Text character.
Check Error checking chars.
A block starts with a SYN character. SOH marks the beginning of a header which contains additional control information, such as the block sequence number,
the address of the transmitter, the address of the receiver, etc. STX and ETX mark the beginning and end of user data, which is an arbitrary sequence of characters. A
redundancy check concludes the block.
Since control characters may also occur in user data, another control character, DLE Data Link Escape, is used to avoid their being interpreted as control codes. If
a control character occurs in user data, it is simply preceded by a DLE character. A literal DLE itself appears as two consecutive DLEs. The receiver treats a DLE as
meaning ‘accept the next character as literal’.
Error handling in BSC is fairly simple. If the receiver receives a corrupted block, it returns a NAK block which contains the sequence number of the offending block.
The transmitter then retransmits that block. Parity checking is also used on individual characters.
3.4.2. HDLC
The High-level Data Link Control HDLC is a more recent bit-oriented protocol which enjoys widespread acceptance throughout the world. It is specified by ISO
3309, ISO 4335, and ISO 7809 standards, and supports half- as well as full-duplex
www.pragsoft.com Chapter 3: The Data Link Layer
47
communication. Most vendors now tend to support this protocol or one of its derivatives in their networking products.
HDLC offers a master-slave arrangement in which the master station in charge of the link issues command frames and the slave stations reply with response frames.
It is also possible for a station to assume a hybrid identity master and slave so that it can both issue commands and send responses. HDLC offers three modes of
operation:
•
Normal Response Mode NRM. In this mode, a slave station is unable to
initiate a transmission; it can only transmit in response to a command from the master station. The master station is responsible for managing the transmission.
This mode is typically used for multipoint lines, where a central station e.g., a host computer polls a set of other stations e.g., PCs, terminals, printers, etc..
•
Asynchronous Response Mode ARM. In this mode, a slave station can
initiate a transmission on its own accord. However, the master station is still responsible for managing the transmission. This mode is now largely obsolete.
•
Asynchronous Balanced Mode ABM. In this mode, all stations are of the
hybrid form with equal status. Each station may transmit on its own accord. This mode is best-suited to point-to-point configurations.
The HDLC frame structure is shown in Figure 3.28. The Address field and the Control field are one or two octets each. The Checksum field is two octets and
uses the CRC method. The Data field is of arbitrary length, and may be zero for some messages.
The structure of the control field depends on the type of frame, and may be one
of the three shown in Figure 3.33. Information frames are used for exchange of user data between two stations. They may also be used for acknowledging receipt of
data in a piggyback fashion. Supervisory frames are used for control purposes such as ACK and NAK frames and flow control. Unnumbered frames are used
for link control functions such as link connection and disconnection.
The role of Send and Receive sequence numbers were discussed earlier in the
chapter. The PollFinal PF bit is used in a HDLC master-slave arrangement. When set by the master station, it acts as a polling request to the slave station. When set by
the slave station, it marks the last transmitted frame in response to a poll. The Supervisory code consists of two bits and determines the type of supervisory
commands maximum of four commands or four responses. The Unnumbered code consists of five bits and determines the type of unnumbered commands
maximum of 32 commands or 32 responses.
Figure 3.33 Frame types and associated control field structures. Information Frame
Supervisory Frame Unnumbered Frame
48 Communication Networks
Copyright © 2005 PragSoft
1 1
1 Send
1 2
Sequence Supervisory
Unnumbered 3
Number Code
Code 4
PF PF
PF 5
Receive Receive
6 Sequence
Sequence Unnumbered
7 Number
Number Code
Figure 3.34 summarizes some of the supervisory and unnumbered commands and responses. The supervisory frames use the receive sequence number for
acknowledgment and rejection, as discussed earlier. There are a number of HDLC-related protocols, often referred to as HDLC
subsets. These include:
•
The Link Access Procedure LAP is based on the SARM command of HDLC. Under LAP, the transmitting station sends a SARM to the receiving
station. The latter responds with a UA. At its discretion, the receiving station may interpret the receiving of a SARM command as a request for transmission in the
opposite direction, in which case the roles are reversed.
•
The Link Access Protocol Balanced LAP-B is an ABM subset of HDLC designed for use with X.25 see Chapter 4. It is used for establishing a link
between a DCE and a DTE. LAP-B does not support the SREJ command, and only supports a limited number of the unnumbered commands.
•
The Link Access Protocol, D channel LAP-D is an HDLC subset designed for use with ISDN. It will be described in Chapter 11.
•
The Logical Link Control LLC is an HDLC subset designed as a part of the IEEE 802 series of standards for use with LANs. It will be described in Chapter
10.
3.5. Further Reading