How2Lab Logo
tech guide & how tos..

Data Link Control Protocols

Bit-oriented protocols are designed to satisfy a wide variety of data link requirements. These requirements include -

  1. Point-to-Point and multipoint links.

  2. Half-duplex (two-way alternate) and full-duplex (two-way simultaneous) operation.

  3. Primary-secondary (e.g.: host-terminal) and peer (e.g.: computer-computer) interaction.

  4. Links with large values of a (tprop / tframe), i.e. satellite links and links with small values of a, i.e. short-distance direct connect.

Some of the widely used data link control protocols are –

  • HDLC: High Level Data Link Control - developed by ISO – ISO 3309, ISO 4335.

  • ADCCP: Advanced Data Communication Control Procedures - developed by ANSI – ANSI X3.66.

    This protocol has been by-and-large adopted by the U.S. National Bureau of Standards for use on federal government procurements.

  • LAP-B: Link Access Procedure, Balanced - adopted by CCITT as part of its X.25 packet switched network standard.

  • SDLC: Synchronous Data Link Control - developed and used by IBM.

How these standards are interrelated?

SDLC is not exactly a standard, as after developing SDLC, IBM submitted it to ANSI and ISO for acceptance as US and International standards, respectively. ANSI modified it to become ADCCP. ISO modified it to become HDLC. CCITT then adopted and modified HDLC for its Link Access Procedure (LAP) as part of the X.25 network interface standard, and later modified it to LAP-B to make it more compatible with a later version of HDLC.

Basic Characteristics of these Data Link Control Protocols

To understand the basic characteristics, we look at the HDLC protocol, as a typical example. Note that all of the above four protocols are based on the same principles.

HDLC defines –

  • 3 types of stations
  • 2 link configurations
  • 3 data transfer modes of operation.

The 3 station types are –

  • Primary station: has the responsibility for controlling the operation of the link. Frames issued by the primary station are called commands.

  • Secondary station: operates under the control of the primary station. Frames issued by the secondary station(s) are called responses. The primary station maintains a separate logical link with each secondary station on the line.

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

The 2 link configurations are -

  • Unbalanced configuration: used in point-to-point and multipoint operation. This configuration consists of one primary and one or more secondary stations and supports both full-duplex and half-duplex transmission.

  • Balanced configuration: used only in point-to-point operation. This configuration consists of two combined stations and supports both full-duplex and half-duplex transmission.

The 3 data transfer modes of operation are -

  • Normal response mode (NRM): This is an unbalanced configuration. The primary may initiate data transfer to a secondary, but a secondary may only transmit data in response to a poll from the primary. The normal response mode is used on multi-drop lines, in which a number of terminals are connected to a computer. The computer polls each terminal for input. NRM is also often used on point-to-point links, particularly if the link connects a terminal or other peripheral to a computer.

  • Asynchronous balanced mode (ABM): This is a balanced configuration. Either combined station may initiate transmission without receiving permission from the other combined station. The asynchronous balanced mode makes more efficient use of a full-duplex point-to-point link, since there is no polling overhead.

  • Asynchronous response mode (ARM): This is an unbalanced configuration. In this mode, the secondary may initiate transmission without explicit permission of the primary (i.e., send a response without waiting for a command). The primary still retains responsibility for the line, including initialization, error recovery, and logical disconnection. The asynchronous response mode is rarely used. It is applicable to hub polling and other special situations in which a secondary may need to initiate transmission.

Frame structure

HDLC uses synchronous transmission. All transmissions are in frames, and a single frame format suffices for all types of data and control exchanges.

The figure below depicts the structure of the HDLC frame.

Flag8 bits (Both flags)
AddressOne or more octets, i.e. 8 bits x N where N= No. of octets (not an IP address)
Control8 or 16 bits
Informationvariable, i.e. ≥ 0
Frame check sequence (FCS)16 or 32 bits

The flag, address and control fields that precede the data field are known as header. The FCS and flag fields following the data field are referred to as trailer.

Flag Fields

Flag fields delimit the frame at both ends with the unique pattern 01111110. A single flag may also be used as the closing flag for one frame and the opening flag for the next. All active stations attached to the link are continuously hunting for the flag sequence to synchronize on the start of the frame. While receiving a frame, a station continues to hunt for that sequence to determine the end of the frame.

However, since the HDLC frame allows arbitrary bit patterns, there is no assurance that the pattern 01111110 will not appear somewhere inside the frame, thus destroying frame-level synchronization. To avoid this problem, a procedure known as bit stuffing is used. The transmitter will always insert an extra 0 bit after each occurrence of five 1’s in the frame (with the exception of the flag fields).

After detecting the starting flag, the receiver monitors the bit stream. When a pattern of five 1’s appears, the sixth bit is examined. If this bit is 0, it is deleted. If the sixth bit is a 1 and the seventh bit is a 0, the combination is accepted as a flag. If the sixth and seventh bits are both 1, the sending station is signaling an abort condition.

Original pattern: 111111111111011111101111110

After bit-stuffing: 11111 0 11111 0 11011111 0 1011111 0 10

With the use of bit stuffing, arbitrary bit patterns can be inserted into the data field of the frame. This property is known as data transparency.

Bit-stuffing is not foolproof and has its own pitfalls like -

  • A 1-bit error leading to merging of two frames into one.
  • A 1-bit error leading to splitting of a frame into two frames.

Address Field

The address field is used to identify the secondary station that transmitted or is to receive the frame. This field is not needed for point-to-point links, but is always included for the sake of uniformity. An address is normally eight bits long but, by prior agreement, an extended format may be used in which the address length is a multiple of seven bits.

Out of the 8 bits, 7 bits are used to represent the address. The 8th (least significant) bit in each octet is used to indicate whether it is the last octet of the address field or not. For the last octet, this bit will be 1. For other octets it will be 0.

The single octet address of 11111111 is interpreted as the all-stations address in both basic and extended formats. It is used to allow the primary to broadcast a frame for reception by all secondaries.

Control Field

This field identifies the function and purpose of the frame. HDLC defines 3 types of frames, each with a different control field format.

  1. Information frames (I – frames) carry the data to be transmitted for the station, known as user data. Additionally, flow and error control data, using the ARQ mechanism, may be piggybacked on an information frame.

  2. Supervisory frames (S – frames) provide the ARQ mechanism when piggybacking is not used.

  3. Unnumbered frames (U – frames) are often used for control purposes. It can also be used to carry data when unreliable connectionless service is called for.

Information Field

The information field is present only in I-frames and some unnumbered frames. The field can contain any sequence of bits. Its length is undefined in the standard, but is generally limited by each implementation to a specified maximum. The length is usually a multiple of eight bits.

Frame Check Sequence Field

The frame check sequence is applied to the remaining bits of the frame, exclusive of flags, i.e., it is applied to the Address bits, Control bits and the Information bits. The FCS is normally a 16-bit CRC. Optionally, a 32-bit FCS (CRC-32) may be employed.

Operation of HDLC

The operation of HDLC consists of the exchange of I-frames, S-frames and U-frames between a primary and a secondary or between two primaries. The various commands and responses defined for these frame types are listed below.

Information (I)

Used to exchange user data

Supervisory (S)

Commands and responses:

Receive Ready (RR)Positive acknowledgement - ready to receive I-frame
Receive Not Ready (RNR)Positive acknowledgement - not ready to receive I-frame
Reject (REJ)Negative acknowledgement - go back N
Selective Reject (SREJ)Negative acknowledgement - selective reject

Unnumbered (U)

Commands and responses:

Set Normal Response Mode (SNRM)/
Set Extended Response Mode (SNRME)
Set mode extended => 2-octet control field
Set Asynchronous Response Mode (SARM)/
Set Asynchronous Extended
Response Mode (SARME)
Set mode extended => 2-octet control field
Set Asynchronous Balanced/
Extended mode (SABM/ SABME)
Set mode extended => 2-octet control field
Set initialization mode (SIM)Initialize link control functions in addressed station
Disconnect (DISC)Terminate logical link connection
Unnumbered acknowledgement (UA)Acknowledges acceptance of one of the above set-mode commands
Disconnected mode (DM)Secondary is logically disconnected.
Request disconnect (RD)Request for DISC command
Request initialization mode (RIM)Initialization needed-request for SIM
Unnumbered information (UI)Used to exchange control information
Unnumbered poll (UP)Used to solicit control information
Reset (RSET)Used for recovery.
Exchange Identification (XID)Used to request/ report identity and status
Test (TEST)Exchange identical information fields for testing
Frame reject (FRMR)Reports receipt of unacceptable frame

Let us understand the HDLC operation a little deeper by looking at the roles of these three types of frames.

Information Frames

The basic operation of HDLC involves the exchange of information frames (I-frames) containing user data. Each I-frame contains the sequence number of the transmitted frame as well as a piggybacked positive acknowledgement. The acknowledgement is the sequence number of the next frame expected. A maximum window size of 7 or 127 is allowed.

IInformation0N(S)P/FN (R)
SSupervisory10SP/FN (R)
N (S)=Send sequence number
N (R)=Receive sequence number
S=Supervisory function bits
M=Unnumbered function bits
P/F=Poll/final bit

The I-frame also contains a poll/ final (P/ F) bit. The bit is a poll bit for commands (from primary) and a final bit for responses (from secondary). In normal response mode (NRM), the primary issues a poll giving permission to send by setting the poll bit to 1, and the secondary sets the final bit to 1 on the last I-frame of its response. In asynchronous response mode (ARM) and asynchronous balanced mode (ABM), the P/F bit is sometimes used to coordinate the exchange of S- and U-frames.

Supervisory Frames

The supervisory frame (S-frame) is used for flow and error control. Both go-back-N ARQ (REJ) and selective-reject ARQ (SREJ) are allowed. The latter is rarely implemented because of the buffering requirements. A frame may be positively acknowledged with a receive-ready (RR) when an I-frame is not available for piggybacking. In addition, a receive-not-ready (RNR) is used to accept a frame but request that no more I-frame be sent until a subsequent RR is used.

For the RR, RNR, and REJ frames, N(R) indicates the sequence number of the next expected I-frame. For SREJ, N(R) is the sequence number of the rejected frame.

The P/F bit on a supervisory frame may be employed as follows. The primary may set the P bit in an RR frame to poll the secondary. This is done when the primary has no I-frame upon which to piggyback the poll. The secondary responds with an I-frame if it has one. Otherwise, it sends an RR with the F bit set to indicate that it has no data to send.

Unnumbered Frames

Unnumbered frames are used for a variety of control functions. As the name indicates, the frames do not carry sequence number and do not alter the sequencing or flow of numbered I-frames. We can group unnumbered frames into the following categories:

  • Mode setting commands and responses
  • Information transfer commands and responses
  • Recovery commands and responses
  • Miscellaneous commands and responses

Mode setting commands are transmitted by primary stations to initialize or change the mode of secondary station. The secondary station acknowledges acceptance by responding with an unnumbered acknowledgement (UA) frame. The UA has the F bit set to the same value as the received P bit. Once established, a mode remains in effect at secondary station until the next mode – setting command is accepted.

The commands SNRM, SNRME, SARM, SARME, SABM, and SABME are self-explanatory. Until acceptance of the command, the I-frame sequence numbers in both directions are set to 0.

The set initialization mode (SIM) command is used to cause the addressed secondary station to initiate a station-specified procedure to initialize its data link control functions. While in initialization mode, the required information is sent using unnumbered information (UI) frames.

The disconnect command (DISC) is used to inform the addressed station that the transmitting station is suspending operation.

In addition to UA, there are several other responses related to mode setting. The disconnected mode (DM) response is sent in response to all commands to indicate that the responding station is logically disconnected. When sent in response to a mode-setting command, DM is a refusal to set the requested mode. The request initialization mode (RIM) response is used in response to a mode-setting command when the station is not ready and wishes to initialize. The request disconnect (RD) response is used to request a disconnect of the logical link.

Information transfer commands and responses are used to exchange information between stations. This is done primarily through the unnumbered information (UI) command/ response. Examples of UI frame information are - higher level status, operational interruption, time of day, and link initialization parameters. The unnumbered poll (UP) command is used to solicit an unnumbered response, as a way of establishing the status of the addressed station.

Recovery commands and responses are used when the normal ARQ mechanism does not apply or will not work. The frame reject (FRMR) response is used to report an error in a received frame, such as -

  • invalid control field
  • data field too long
  • data field not allowed with received frame type
  • Invalid receive count (i.e., a frame is acknowledged that has not yet been sent)

The reset (RSET) command is used to clear the FRMR condition. RSET announces that the sending station is resetting its send sequence number, and the addressed station should reset it's receive sequence number.

Finally there are two miscellaneous command/ responses that fit into no neat category. The exchanged identification (XID) command/ response is used for two stations to exchange station identification and the characteristic of the two stations. The actual information exchanged is implementation dependent.

A recently added frame type is the test (TEST) command/ response. The test command must be echoed with a test response at the earliest opportunity. This is a simple means of testing that link and the addressed station are still functioning.

The Data Link Layer in the Internet

The internet consists of individual machines (hosts and routers), and the communication infrastructure that connects them. The wide area infrastructure, that Internet creates, is built up essentially from point-to-point leased lines. So, we need to examine the data link protocols used on point-to-point lines in the Internet.

In practice, point-to-point communication is primarily used in two situations.

Situation 1

Thousands of organizations have one or more LANs, each with some number of hosts (PCs, user work-stations, servers, etc.) along with a router (or a bridge. Router and Bridge are functionally similar). Often, the routers are interconnected by a backbone LAN within the organization, and to this backbone LAN the organization’s computers are connected.

All connections to the outside world, typically, go through one or two routers that have point-to-point leased lines to distant routers. It is these routers and their leased lines that make up the communication subnets on which the Internet is built.

Situation 2

The second situation where point-to-point lines play a major role in the Internet is the millions of individuals who have home connections to the Internet using modems and dial-up telephone lines. Usually, what happens is that the user's home PC calls up an Internet Service Provider (ISP), which includes commercial companies, Government organizations, Universities, etc. Some like AOL, CompuServe, Microsoft Network, VSNL (India), ERNET (India), STPI (India), NIC (India), Satyam (India), Wipro (India), FreeServe (UK), Darty (Retailers, France), C&A (apparel co., UK), TESCO (Supermarkets, UK), Barclays (Financial Co., UK), and many more.

Sometimes the home PC just functions as a character-oriented terminal logged into the Internet service provider’s time-sharing system. In this mode, the user can type commands and run programs, but the graphical Internet services like the WWW are not available. This way of working is called having a shell account.

Alternatively, the home PC can call an ISP’s router and then act like a full-blown Internet host. This method of operation is no different than having a leased line between the PC and the router, except that the connection is terminated when the user ends the session. In this mechanism, all Internet services, including the graphical ones, become available. The figure below illustrates this mechanism.

For both the router to router leased line connection and the dial-up host to router connection, some point-to-point data link protocol is required on the line for framing, error control, and the other data link layer functions.

Two such protocols are widely used in the Internet are SLIP and PPP.

SLIP – Serial Line IP

SLIP is the older of the two protocols. It was devised by Rick Adams in 1984 to connect Sun work-stations to the Internet over a dial-up line using a modem. This is protocol is described in RFC 1055.

How SLIP works?

The workstation just sends raw IP packets over the line, with a special flag byte (0xC0) at the end for framing. If the flag byte itself occurs inside the IP packet, a form of character stuffing is used and the two byte sequence – 0xDB, 0xDC is sent in place. If 0xDB also occurs inside the IP packet, it too is stuffed. Some SLIP implementations attach a flag byte to both the front and back of each IP packet sent. Some recent versions of the protocol do some TCP and IP header compression to take advantage of the fact that consecutive packets often have many header fields in common. These are compressed by omitting those fields that are the same as the corresponding fields in the previous IP packet. Furthermore, the fields that do differ are not sent in their entirety, but as increments to the previous value. These optimizations are described in RFC 1144.

Drawbacks of SLIP
  1. It does not do any error detection or correction, so it is up to higher layers to detect and recover from lost, damaged, or merged frames.

  2. SLIP supports only IP. With the growth of the Internet to encompass networks that do not use IP as their native language (e.g. Novell LANs), this restriction is becoming increasingly serious.

  3. Each side must know the other’s IP address in advance – neither address can be dynamically assigned during setup. Given the current shortage of IP addresses, this limitation is a major issue as it is impossible to give each home Internet user a unique IP address.

  4. SLIP is not an approved Internet standard, so many different versions exist. This situation does not make internetworking easier.

Point-to-Point Protocol (PPP)

To improve the situation, the IETF set up a group to devise a data link protocol for point-to-point lines that solved all the above problems and that could become an official Internet standard.

Thus PPP was devised as RFC 1661 and further elaborated on in several other RFCs (RFC 1662 and 1663).


  • handles error detection
  • supports multiple protocols
  • allows IP addresses to be negotiated at connection time
  • permits authentication

and has many other improvements over SLIP.

While many ISPs still support both SLIP and PPP, the future clearly is for PPP, not only for dial-up lines but also for leased router-router lines.

PPP provides 3 things –

  1. A framing method that unambiguously delineates the end of one frame and the start of the next one. The frame format also handles error detection.

  2. A link control protocol for bringing lines up, testing them, negotiating options, and bringing them down again gracefully when they are no longer needed. This protocol is called LCP (Link Control Protocol).

  3. A way to negotiate network-layer options in a way that is independent of the network layer protocol to be used. The method chosen is to have a different NCP (Network Control Protocol) for each network layer supported.

To see how these things fit together, let us consider the typical scenario of a home user calling up an ISP to make a home PC a temporary Internet host. The PC first calls the provider’s router via a modem. After the router’s modem has answered the phone and established a physical connection, the PC sends that router a series of LCP packets in the payload field of one or more PPP frames. These packets and their responses select the PPP parameters to be used.

Once these have been agreed upon, a series of NCP packets are sent to configure the network layer. Typically, the PC wants to run a TCP/IP protocol stack, so it needs an IP address. There are not enough IP addresses to go around, so normally each Internet provider gets a block of them and then dynamically assigns one to each newly attached PC for the duration of its login session. The NCP is used to do the IP address assignment.

At this point, the PC is now an Internet host and can send and receive IP packets, just as hard-wired hosts can. When the user is finished, NCP is used to tear down the network layer connection and free up the IP address. Then LCP is used to shut down the data link layer connection. Finally, the computer tells the modem to hang up the phone, releasing the physical layer connection.

The PPP frame format was chosen to closely resemble the HDLC frame format, since there was no need to re-invent the wheel. The major difference between PPP and HDLC is that PPP is character oriented whereas HDLC is bit oriented. More specifically, PPP uses character stuffing so that all frames are an integral number of bytes. For example, with PPP, it is not possible to send a frame of 30.25 bytes. This would be possible with HDLC.

Bytes:1111 or 2Variable2 or 41

All PPP frames begin with the standard HDLC flag byte, which is character stuffed if it occurs within the payload field.

The Address field is always set to binary 11111111 to indicate that all stations are to accept the frame.

The Control field’s default value is 00000011 indicating that it is an unnumbered frame. That is to say that by default PPP does not provide reliable transmission using sequence numbers and acknowledgements. However, in noisy environments like wireless networks, reliable transmission using numbered mode can be used.

The Protocol field tells what kind of packet is in the Payload field. Codes are defined for LCP, NCP, IP, IPX, AppleTalk, and other protocols. The default size of the Protocol field is 2 bytes, but 1 byte is also used when using LCP.

The Payload field is variable in length, up to some negotiated maximum. If the length is not negotiated using LCP during line setup, a default length of 1500 bytes is used.

The Checksum field is normally 2 bytes, but a 4-byte checksum can also be used.

To summarize, PPP is a multi-protocol framing mechanism suitable for use over modems, HDLC bit-serial lines, SONET, and other physical layers.

SONET is a Synchronous Optical NETwork. It is a physical layer standard (protocol) for communication; used mostly in long-distance telephone lines in the U.S.

Asynchronous and Synchronous transmission

In computer networks, data transmission takes place in serial form, that is, data is transferred over a single communication line. This is in contrast to the parallel form of data transfer that takes place between CPU and memory and some input-output devices.

One key problem in data communication is synchronization. The data sent by a sender in bit - serial form through a medium must be correctly interpreted by the receiver. This requires that the beginning, the end and logic level and duration of each bit as sent at the transmitting end must be recognized at the receiving end. To achieve synchronization, two approaches known as asynchronous and synchronous transmissions are used.


In asynchronous transmission bits are sent in groups of one character comprising 5 to 8 bits at a time. Each character transmission is self-synchronized. Self-synchronization is done by sending each character in a suitable format. The term asynchronous implies that data may be sent at irregular intervals, and that the clocks of the receiving and transmitting ends need not be exactly synchronized in terms of frequency and phase.

Framing plays an important role in asynchronous transmission. Using NRZ-L signaling, when no character is sent the line remains at a high (mark) state. The beginning of a character is signaled by a start bit with the binary value 0. This is followed by the character (7-bit for ASCII characters) bits and an optional parity bit for error detection. It is user’s choice to use either even or odd parity. The parity bit, if any, is followed by stop bits with binary value of 1. The transmitter will continue to send stop bits, which is same as the idle state, until it is ready for the next character.

As each character is synchronized by its start bit, data can be correctly recovered even if the receiver clock is 5% slower or faster than that of the transmitter. Asynchronous transmission is simple and easy to implement but it has high overhead. For example, to transmit a 7-bit character, 4 additional bits are sent leading to poor throughput or inefficient utilization of the channel.

The number of bit per second sent over the transmission line is known as baud rate, which is more than the actual data rate. For example for a signal with one start bit, one parity bit and two stop bits sent at 110 baud rate has data rate of 70 bits/sec.


The overhead is minimized in synchronous transmission in which larger blocks of bits are sent as a group. This requires that the transmitter and receiver clocks should be identical. This is usually achieved by bi-phase (Manchester) encoding. The clock is regenerated at the receiving end using suitable hardware (such as, phase-lock loop).

Another level of synchronization is achieved by suitable framing of the data blocks. Each data block begins with a preamble known as SYNC character or Flag and generally ends with a postamble bit pattern. Some control bits (or characters) are also added for addressing and error detection.

Synchronous transmission can be either character-oriented or bit-oriented.

It may be noted that, synchronous transmission is far more efficient than the asynchronous transmission. For example, HDLC framing involves 48 bits of overhead including the flags. For a 1500 bits of message, the overhead is only (48 / 1548) X 100 which is approx. 3%. This is very small compared to 20% or more overhead for asynchronous transmission.

Buy Domain & Hosting from a trusted company
Web Services Worldwide | Hostinger
About the Author
Rajeev Kumar
CEO, Computer Solutions
Jamshedpur, India

Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.

Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.

Refer a friendSitemapDisclaimerPrivacy
Copyright © All rights reserved.