Chapter 8 data link protocols
This presentation is the property of its rightful owner.
Sponsored Links
1 / 52

Chapter -8 Data Link Protocols PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Chapter -8 Data Link Protocols. Asynchronous Protocols Synchronous Protocols Character-Oriented Protocols Bit-Oriented Protocols. Data Link Control Protocol. INTRODUCTION

Download Presentation

Chapter -8 Data Link Protocols

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Chapter 8 data link protocols

Chapter -8Data Link Protocols

  • Asynchronous Protocols

  • Synchronous Protocols

  • Character-Oriented Protocols

  • Bit-Oriented Protocols

Data link control protocol

Data Link Control Protocol


  • A set of rules that define the exact format of messages exchanged between computers or between computers and people is called a protocol.

  • Data link protocols are necessary so that all of the devices on the network are operating by the same set of rules and are able to communicate with each other.


  • Communication startup

  • Character identification and framing

  • Message identification

    The DTE must separate the characters on the communications line into messages.

Chapter 8 data link protocols


  • Line Control

  • The part of a protocol consisting of the rules that specify the way the receiving terminal signals the sending terminal if it has received data correctly, how and under what circumstances the line will be turned around, and whether the receiving terminal can accept more data is called line control.

  • Error Control

    The part of the protocol consisting of rules specifying what happens when an error is detected, what to do if communications suddenly and unexplainably cease, and the way communications are reestablished after they are broken is called error control.

  • Termination

    The part of a protocol consisting of rules for ending the communications under normal and abnormal circumstances is called termination.

Chapter 8 data link protocols


  • Transparency

  • The ability of data terminal equipment (DTE) to be able to transmit and receive any bit pattern as data is called transparency .

  • Code independence

    The protocol allow the transmission of data from any data coding system.

  • Efficiency

    The protocol should use as few characters as possible to control the data transmission so that most of the line capacity can be used for actual data transmission.


  • A data link protocol is implemented by transmitting certain bit patterns or characters on the communications circuit.


  • Predetermined communication parameters are those that are set manually by switches or specified as parameters in software

Chapter 8 data link protocols


  • When two stations on a circuit transmit at the same time, a(n) collision occurs.

  • There are three primary ways that circuit access can be obtained:

  • contention

  • polling,

  • token passing.

  • Contention: When any station that has traffic looks to see if the circuit is free, and if it is, begins sending its traffic the line control technique is called contention.

  • Polling: When a central or control station asks each station on the circuit or network if it has traffic to send it is using a line control technique called polling.

  • Roll call polling: Roll call polling is the most common implementation of a polling system. In order to know what stations to poll and in what sequence, the master station uses a polling list.

  • Fast select polling: Fast select polling speeds up the polling process because a slave station that doesn’t have traffic isn’t required to return a character to the master station.

Chapter 8 data link protocols


Data messages normally consist of three parts: the header, text, and trailer.

The header of a message contains and conveys information about the message, such as the destination node’s address, a sequence number, and perhaps a date and time.

Message format showing examples of the kinds of control characters the protocol might employ.

Chapter 8 data link protocols


  • Techniques to ensure that a fast transmitting node does not send data faster than the receiving node can receive and process it are called flow control.Necessary when data is being sent faster than it can be processed by receiver

  • The simplest, most effective, least expensive, and most commonly used method for transmission error control.

  • Using retransmission.

    • Computer to printer is typical setting

    • Can also be from computer to computer, when a processing program is limited in capacity

      Stop-and-wait Flow Control: Stop-and-wait Flow Control is the simplest form control.

The data flow of stop-and-wait flow control.

Stop and wait flow control

Stop-and-Wait Flow Control

  • Also called Stop-and-Wait Automatic Repeat reQuest (ARQ)

  • It is the simplest form

  • Source may not send new frame until receiver acknowledges the frame already sent

  • Very inefficient, especially when a single message is broken into separate frames, or when the data link is long enough for significant delays to be introduced

Stop and wait arq

Stop-and-Wait ARQ

  • One frame received and handled at a time

  • If frame is damaged, receiver discards it and sends no acknowledgment

    • Sender uses timer to determine whether or not to retransmit

    • Sender must keep a copy of transmitted frame until acknowledgment is received

  • If acknowledgment is damaged, sender will know it because of numbering

Chapter 8 data link protocols

Sliding WindowFlow Control

The flow control technique that allows multiple frames to be in transit on the line at one time is called sliding window.

There are two common implementations of sliding window flow control: go-back-n and selective repeat.

The data flow in a simple sliding window flow control.

Sliding window flow control

Sliding-Window Flow Control

  • Also called Continuous ARQ

  • Allows multiple frames to be in transit

  • Receiver sends acknowledgement with sequence number of anticipated frame

  • Sender maintains list of sequence numbers it can send, receiver maintains list of sequence numbers it can receive

  • ACK (acknowledgement, or RR – Receiver Ready) supplemented with RNR (receiver not ready)

    Go-Back-N ARQ

  • Uses sliding-window flow control

  • When receiver detects error, it sends negative acknowledgment (REJ)

  • Sender must begin transmitting again from rejected frame

  • Transmitter must keep a copy of all transmitted frames

Data transmission modes

Data Transmission Modes

  • The manner how alphanumeric data characters are transmitted and received between terminals is given by the data transmission modes.

  • Two modes available are character and block.

  • Character Mode: Character codes are transmitted asynchronously i.e. whenever the operator depresses a key, the data character is sent from the source to destination station and are displayed on the screen at the current location of cursor.

  • Block Mode: Here, when operator enters the characters, they are stored in the buffers and displayed on screen. When the operators gets ready to send the information enter, send or return key is pressed, which transmits all the data characters previously entered into the memory. The assortment of characters transmitted as a group is called a block or frame of data. The block mode is more appropriate for multi drop data communications circuits operating in a polling environment.

Chapter 8 data link protocols

Figure 11-2

  • In general, microcomputer file transfer protocols are used on asynchronous point-to-point circuits, typically across telephone lines via a modem.

    • XMODEM (132 bytes)

      • XMODEM-CRC (CRC-8)

      • XMODEM-1K (CRC+1K blocks)

    • YMODEM(CRC-16)

    • ZMODEM (CRC-32)

    • KERMIT (CRC-24)

Chapter 8 data link protocols


Asynchronous data link protocols deal with individual characters rather than blocks of data.

Point-to-Point Protocol(PPP):

  • A protocol that is primarily used by PC workstations to send IP over dial-up lines, typically when dialing in to an ISP for connection to the Internet, is called PPP.

  • PPP has largely replaced the SLIP protocol because it has better error detection.

PPP’s frame format

XMODEM Protocol:

  • The XMODEM protocol was developed for use between PCs, especially for transfers of data files between them.

  • Data transmission and control are quite simple with XMODEM protocol.

Chapter 8 data link protocols


  • Y MODEM is a protocol similar to the XMODEM except with the following expectations

  • The information field has a maximum capacity of 1024 bytes

  • Two CAN characters are required to abort a transmission

  • ITU-T-CRC 16 is used to calculate the frame check sequence

  • Multiple frames can be sent in succession and then acknowledged with a single ACK or NAK character.


  • ZMODEM is a newer protocol that simply combines the features of XMODEM and


  • BLAST (Blocked Asynchronous Transmission)

  • The BLAST Session protocol defines a set of rules for file transfer and file management with a remote computer. It features full-duplex transmission and uses sliding window flow control.

    Other Asynchronous Protocols:

  • A sophisticated check character at the end of each block of data is called a cyclic redundancy check(CRC).

Asynchronous transmission

Asynchronous Transmission

Start-stop transmission is a least efficient technology.

We need to bundle bytes to reach high efficiency transmissions.

Asynchronous ftp

Asynchronous FTP


STX Packet# Checksum

1 byte compliment 1 byte

1 byte


128 bytes

Packet #

1 byte

Chapter 8 data link protocols

Figure 11-3


Asynchronous ftp1

Asynchronous FTP


  • developed by Columbia University

  • support a variety of different packet sizes and error detection methods

  • typically 1000bytes/packet with CRC-24 and adjustable during transmission

  • uses both stop-and-wait ARQ and continuous ARQ

Chapter 8 data link protocols

Figure 11-4

Byte-Count-Oriented protocols

Chapter 8 data link protocols


  • Synchronous data link protocols typically deal with blocks of data , not individual characters.

  • The three types are character-oriented protocol, byte-count-oriented protocol and bit-oriented protocols.

    Character-Oriented Protocols:

  • A character-oriented protocol uses special characters to indicate the beginnings and ends of messages . The best known character-oriented protocol is the Binary Synchronous Communications Protocol(BSC),also known as BISYNC.

  • BISYNC is defined to only support the 6-bit trans code (SBT), EBCDIC, and ASCII.

    Byte-Count-Oriented Protocols:

  • Byte-count-oriented protocols have a special characters to mark the beginning of the header , followed by a count field that indicates how many characters are in the data portion of the messages.

  • The best known byte-count-oriented protocol is the Digital Data Communications Message Protocol(DDCMP).

Chapter 8 data link protocols

Bit-Oriented Protocols

  • A bit-oriented protocol uses only one special character , called the flag character. which marks the beginning and end of parts of the message.

  • The best known bit-oriented protocols are the ISO’s High-Level Data Link Control (HDLC) protocol.

  • SDLC is a subset of HDLC.



  • A protocol converter changes one protocol to another, when, for example, a message is sent between two networks that use different protocols.

Chapter 8 data link protocols

Figure 11-5

Chapter 8 data link protocols

Figure 11-6

Simple Frame

Chapter 8 data link protocols

Figure 11-7

A Frame with Header

Chapter 8 data link protocols

Figure 11-8

Multiblock Frame

Chapter 8 data link protocols

Multiframe Transmission

Figure 11-9

Chapter 8 data link protocols

Figure 11-10

Control Frame

Chapter 8 data link protocols

Figure 11-11

Control Frames

Chapter 8 data link protocols

Figure 11-11-continued

Control Frames

Chapter 8 data link protocols

Figure 11-11-continued

Control Frames

Chapter 8 data link protocols

Figure 11-12

Byte Stuffing

High level data link control hdlc

High-Level Data Link Control (HDLC)

  • The OSI’s data link protocol

  • A bit-oriented protocol

  • On transmitting side, HDLC receives data from an application, and delivers it to the receiver on the other side of the link

  • On the receiving side, HDLC accepts the data and delivers it to the higher level application layer

  • Both modules exchange control information, encoded into a frame

  • (IBM’s SDLC has similar features and the format of HDLC)

Chapter 8 data link protocols

  • HDLC Frame Structure

  • Flag: 01111110, at start and end

  • Address: secondary station (for multi drop configurations)

  • Information: the data to be transmitted

  • Frame check sequence: 16- or 32-bit CRC

  • Control: purpose or function of frame

    • Information frames: contain user data

    • Supervisory frames: flow/error control (ACK/ARQ)

    • Unnumbered frames: variety of control functions

Transparency problem

Transparency Problem

  • The problem of transparency

    • Because HDLC uses 01111110 to mark the start and end of a packet, the character “01111110” will confuse the receiver.

  • Solution - Bit Stuffing

    • Add a 0 after every five 1s at sender side and delete the 0 at receiver side.

Hdlc operation

HDLC Operation

  • Initialization:

    S-frames specify mode and sequence numbers

    U-frames acknowledge

  • Data Transfer:

    I-frames exchange user data,

    S-frames acknowledge and provide flow/error control

  • Disconnect:

    U-frames initiate and acknowledge

Error detection

Error Detection

  • It is possible to develop data transmission methodologies that give very high errordetection and correction performance.

  • The only way to do error detection and correction is to send extra data with each message.

  • In general, the larger the amount of error detection data sent, the greater the ability to detect an error.

  • There are three common error detection methods.

    • Parity Checking

    • Longitudinal redundancy checking

    • Polynomial checking

      • Checksum

      • Cyclic Redundancy

Error correction

Error Correction

  • A receiver that detects an error simply asks the sender to retransmit the message until it is received without error.

    • Lost frame

    • Damaged frame

  • With Stop and Wait ARQ the sender stops and waits for a response from the receiver after each message or data package.

  • Responses are:

    • Error detection

    • Positive acknowledgment (ACK)

    • Negative acknowledgment and retransmission (NAK)

    • Retransmission after time-out

Chapter 8 data link protocols

Error Correction via Retransmission

  • With Continuous ARQ the sender does not wait for acknowledgement before sending next message. If it receives an REJ, it retransmits the needed messages.

  • The packets that are retransmitted may be only those containing an error (called Link Access Protocol for Modems (LAP-M)), or may be the first packet with an error and all those that followed it (call Go-Back-N ARQ)

  • Continuous ARQ is a full-duplex transmission technique.

Packet loss

Packet Loss

  • How it could be? Two possibilities:

    • The receiver did not receive the packet

    • The sender did not receive the ACK message

  • What can we do with packet loss?

    • Use “Time-out” to detect packet loss

    • Re-send the packet if there is a “time-out”

Forward error correction

*Forward Error Correction

Forward error correction uses codes containing sufficient redundancy to prevent errors by detecting and correcting them at the receiving end without retransmission of the original message.

  • Hamming code is capable of correcting 1 bit error.

  • More sophisticated techniques, such as Reed-Solomon, are commonly used.

  • commonly used in satellite transmission.

  • Chip implementations of FEC has been used in modems, e.g. V.34.

Error detection parity bits

Error Detection: Parity Bits

  • Bit added to each character to make all bits add up to an even number (even parity) or odd number (odd parity)

  • Good for detecting single-bit errors only

  • High overhead (one extra bit per 7-bit character=12.5%)

Parity checking

Parity Checking

One of the oldest and simplest method, parity checking adds 1 additional bit to each byte in the message. The value of this parity bit is dependent on the number of 1’s in each byte transmitted. Even parity causes the sum of all bits (including the parity bit) to be even. Odd parity causes the sum to be odd.

Unfortunately if two bits are erroneous, the parity checking will fail. Parity checking results in about a 50% reliability rate.

Parity checking1

Parity Checking

Assume we are using even parity with 7-bit ASCII.

The letter V in 7-bit ASCII is encoded as 0110101.

Because there are four 1s (an even number), parity is set to zero.

This would be transmitted as: 01101010.

Assume we are using odd parity with 7-bit ASCII.

The letter W in 7-bit ASCII is encoded as 1010111 (Oct127).

Because there are five 1s (an odd number), parity is set to zero.

This would be transmitted as: 10101110.

Longitudinal redundancy checking lrc

Longitudinal Redundancy Checking (LRC)

LRC was developed to overcome the problem with parity’s low probability of detection.

LRC adds one additional character, called the block check character (BCC) to the end of the entire message or packet of data.

The value of the BCC is calculated much like the Parity bit, but for the entire message. Results in a 98% reliability rate.

Longitudinal redundancy checking

Longitudinal Redundancy Checking

For example, suppose we were to send the message “DATA”

using odd parity and LRC with 7-bit ASCII:













Parity bit






(Note that the parity bit in the BCC is determined by parity,

not LRC.)

Polynomial checking

Polynomial Checking

Like LRC, polynomial checking adds 1 or more characters to the end of the message based on a mathematical algorithm.

With checksum, 1 byte is added to the end of the message. It is obtained by summing the message values, and dividing by 255. The remainder is the checksum. (95% effective)

With Cyclical Redundancy Check (CRC), 8, 16, 24 or 32 bits are added, computed by calculating a remainder to a division problem.

Error detection cyclic redundancy check crc

Error Detection: Cyclic Redundancy Check (CRC)

  • Data in frame treated as a single binary number, divided by a unique prime binary, and remainder is attached to frame

  • 17-bit divisor leaves 16-bit remainder, 33-bit divisor leaves 32-bit remainder

  • For a CRC of length N, errors undetected are 2-N

  • Overhead is low (1-3%)

  • Login