Synchronous Protocols Asynchronous Protocols

www.pragsoft.com Chapter 3: The Data Link Layer 37

3.1 Link Protocol Types

Data link protocols are divided into two basic categories: synchronous and asynchronous. These are described below. It is important not to confuse synchronization at the data link layer with synchronization at the physical layer. These two are distinct and essential in their own right: physical layer synchronization ensures that the transmitter and the receiver share a common clock signal so that bit boundaries can be detected; data link layer synchronization ensures that user data is not confused with control data.

3.1.1. Synchronous Protocols

Synchronous protocols operate by delimiting user data with unique bit patterns which the receiver uses to detect where the user data begins and where it ends. Synchronous protocols may be character-oriented or bit-oriented. In a character-oriented protocol, user data consists of a sequence of characters and is delimited by two unique control characters SYN and EOT. The biggest disadvantage of character-oriented protocols is that they are based on specific character sets e.g., ASCII or EBSDIC and are therefore character-set dependent. In a bit-oriented protocol, no specific character set is assumed. The unit of transmission is a frame, which consists of user data an arbitrary bit sequence, control data, address data, error checksum, and two delimiting bit patterns at either end of the frame. Figure 3.28 illustrates the frame structure for HDLC protocols discussed later in this chapter. Figure 3.28 HDLC frame structure. Field Description 01111110 Start flag: marks the beginning of the frame. Address Address of the host for which the frame is intended. Control Record frame type, frame sequence, flow control, etc. Data Contains the actual user data and is a bit sequence of arbitrary length. Checksum A checksum field for error detection. 01111110 End flag: marks the end of the frame. The delimiting bit pattern used is 01111110 and is called a flag. To avoid this bit pattern occurring in user data, the transmitter inserts a 0 bit after every five 38 Communication Networks Copyright © 2005 PragSoft consecutive 1 bits it finds. This is called bit stuffing; its effect is canceled by the receiver, which removes every 0 bit that occurs after every five consecutive 1 bits. Bit-oriented protocols are by comparison more recent than other protocols and have dominated the market. To acknowledge their importance, most of this chapter is devoted to the description of this class of protocols.

3.1.2. Asynchronous Protocols

Asynchronous protocols are character-oriented and operate by having the transmitter surround each character with a start and a stop bit. These two bits indicate to the receiver where the character starts and where it ends. The receiver extracts the user data by removing the start and stop bits.

3.1.3. Master-Slave Protocols