Skip to main content

Objectives of Data Link Layer.........................

• the role of the data link layer,
• Three common error detection and correction methods.
• two basic approaches to controlling access to the media,
• common sources of error and its prevention,
• Several commonly used data link protocols.
INTRODUCTION
The data link layer sits between the physical layer and the network layer.
The data link layer accepts messages from the network layer and controls the hardware that actually transmits them.
Both the sender and receiver have to agree on the rules or protocols that govern how their data link layers will communicate with each other.
Introduction
A data link protocol provides three functions:
• Controls when computers transmit (media access control).
• Detects and corrects transmission errors (error control).
• Identifies the start and end of a message (message delineation).
MEDIA ACCESS CONTROL
Media access control (MAC) refers to the need to control when devices transmit.
MAC becomes important when several computers share the same communications circuit to ensure no two devices attempt to transmit data at the same time.
Controlled Access
Most computer networks managed by a host mainframe computer use controlled access.
• X-ON/X-OFF is one of the oldest MAC protocols dating back to the days of the teletype.
• The X-ON signal indicates a system ready to receive messages, the X-OFF signal indicates a system too busy to receive.
Controlling Access
Polling is the process of sending a signal to a client that gives it permission to transmit or to ask it to receive.
There are several types of polling.
• Roll call polling, the FEP works consecutively through a list of clients, first 1, then 2 etc. until all are polled.
• Hub go-ahead polling (a.k.a. token passing) One computer starts the poll and passes it to the next system on the multipoint circuit, which sends its message or passes it to the next system, and so on.
Contention
Contention is the opposite of controlled access. Computers wait until the circuit is free and then transmit whenever they have data to send.
Requires a technique to handle situations when two devices try to transmit at the same time (Collision)
Relative Performance
In general, contention approaches work better than controlled approaches for small networks that have low usage.
In high volume networks, many devices want to transmit at the same time, and a well-controlled circuit prevents collisions.
ERROR CONTROL IN NETWORKS
There are two types of errors associated with networks.
• Human errors
• Network errors
There are two categories of network errors.
• Corrupted data (that have been changed)
• Lost data
What are Network Errors?
Network errors are a fact of life in data communications networks.
Normally errors occur in bursts.
• In a burst error, more than one data bit is changed by the error-causing condition.
• Errors are not uniformly distributed, regardless of error rate statistics.
Dial-up lines are more prone to errors because they have less stable parameters.
What Causes Errors?
Line noise and Distortion cause errors.
Error Prevention
There are many ways to prevent errors:
• Shielding (adding insulation)
• Moving cables away from noise sources
• Changing multiplexing type (FDM TDM)
• Tuning transmission equipment and improving connection quality
• Using amplifiers and repeaters
• Equalization
• Leasing conditioned circuits
Error Detection
It is possible to develop data transmission methodologies that vibe very high error detection 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.
Error Detection
There are three common error detection methods.
• Parity Checking
• Longitudinal redundancy checking
• Polynomial checking
o Checksum
o Cyclic Redundancy
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 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 0001101.
Because there are three 1s (an odd number), parity is set to one.
This would be transmitted as: 00011011.
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
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 CRC, 8, 16, 24 or 32 bits are added, computed by calculating a remainder to a division problem. (99.969% with 8-bit, 99.99% with 16 bit).
Error Correction via Retransmission
The simplest, most effective, least expensive, and most commonly used method for error correction is retransmission.
A receiver that detects an error simply asks the sender to retransmit the message until it is received without error. (called Automatic Repeat reQuest (ARQ)).
Error Correction via Retransmission
With Stop and Wait ARQ the sender stops and waits for a response from the receiver after each message or data package.
Responses are:
• Acknowledgement (ACK)
• Negative acknowledgement (NAK)
With Continuous ARQ the sender does not wait for acknowledgement before sending next message. If it receives an NAK, it retransmits the needed messages.

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
• Hagelbarger code (corrects up to 6 consecutive bit errors)
• Bose-Chaudhuri code
DATA LINK PROTOCOLS
Asynchronous Transmission
Asynchronous Transmission is often referred to as start-stop transmission because the transmitting device can transmit a character whenever it is convenient, and the receiving device will accept that character.
Each character is transmitted independently of all other characters.
To accomplish this a start bit (0), and a stop bit (1) are added to each character. The recognition of the start and stop of each message is called synchronization.
Asynchronous Transmission
Asynchronous File Transfer Protocols
In general, microcomputer file transfer protocols are used on asynchronous point-to-point circuits, typically across telephone lines via a modem.
• XMODEM
o XMODEM-CRC (CRC-8)
o XMODEM-1K (CRC+1K blocks)
• YMODEM(CRC-16)
• ZMODEM (CRC-32)
• KERMIT (CRC-24)
Asynchronous FTP
Synchronous Transmission
With Synchronous Transmission all the letters or data in one group of data is transmitted at one time as a block of data called a frame or packet.
The start and end of each packet sometimes is marked by establishing by adding synchronization characters (SYN) at the start of each packet, called
Synchronous Transmission
There are many protocols for synchronous transmission that fall into three broad categories:
• Byte-oriented
• Bit-oriented
• Byte-count
Synchronous Transmission
• Synchronous Data Link Control (SDLC) is a mainframe protocol developed by IBM in 1972. It is a bit-oriented protocol, because the data contained in the frame do not have to be in 8-bit bytes.
• High-level Data Link Control (HDLC) is a formal standard developed by ISO, and is essentially the same as SDLC except that the address and control fields can be longer.
Synchronous Transmission
Token Ring (IEEE 802.5) was developed by IBM in the early 1980s, and later became a formal standard of the IEEE. It uses a controlled access media access protocol.
Ethernet (IEEE 802.3) is a byte-count protocol, because instead of using special characters or bit patterns to mark the end of a packet it includes a field that specifies the length of the message portion of the packet.
Synchronous Transmission
• Serial Line Internet Protocol (SLIP) is a byte-oriented protocol designed to connect two computers using Internet protocols over a point-to-point telephone line.
Compressed SLIP (CSLIP) uses compression to reduce the amount of data transmitted.
• Point-to-Point Protocol (PPP) is a byte-oriented protocol developed as a replacement for SLIP. It includes error control and supports other network layer protocols.
Synchronous Transmission
TRANSMISSION EFFICIENCY
One objective of a data communications network is to move the highest possible volume of accurate information through the network.
Each communication protocol uses some bits or bytes to delineate the start and end of each message and for error control and has both information bits (to convey the user’s meaning) and overhead bits (for error checking, and marking the start and end of characters and packets).
Transmission Efficiency
Transmission efficiency is defined as the total number of information bits divided by the total number of bits in transmission.
• In Asynchronous transmission only 70% of the data rate is available to the user (7 bit ASCII).
• In Synchronous (SDLC) efficiency is approximately 99.2% (100 info characters with 8 bit code = 800 info bits)
Transmission Efficiency
ZMODEM is more efficient than YMODEM which is more efficient than XMODEM. The general rule is that the larger the message field, the more efficient the protocol.
In designing a protocol, there is a trade-off between large and small packets. Small packets are less efficient, but are less likely to contain errors and are less costly in terms of circuit capacity to retransmit if there is an error.
Transmission Efficiency
Throughput is the total number of information bits received per second, after taking into account the overhead bits and the need to retransmit packets containing errors.
Throughput (TRIB)
Calculating the actual throughput of data communication is complex.
The use of a shared multipoint circuit, rather than a dedicated point-to-point circuit will affect throughput, because the total capacity in the circuit must now be shared among several computers.
Throughput (TRIB)
The term transmission rate of information bits (TRIB) describes the effective rate of data transfer.
TRIB = Number of information bits accepted
Total time required to get the bits accepted
Throughput (TRIB)
The following TRIB example shows the calculation of throughput assuming a 4800 bits per second half-duplex circuit.
7(400-10)(1-0.01)
(400/600) + 0.025
where: K = 7 bits per character (information)
M = 400 characters per block
R = 600 characters per second (derived from 4800 bps divided by 8 bits/character)
C = 10 control characters per block
P = 0.01 (10-2) or one retransmission out of 100 blocks transmitted 1%
T = 25 milliseconds (0.025) turnaround time
Throughput (TRIB)

7(400-10)(1-0.01)
(400/600) + 0.025
If all factors in the calculation remain constant except for the circuit, which is changed into full duplex (no turnaround time delays, T=0) then the TRIB increases to 4054 bps.
Look at the equation where the turnaround value (T) is 0.025. If there is a further propagation delay time of 475 milliseconds (0.475), this figure changes to 0.500. For demonstrating how a satellite channel affects TRIB, the total delay time is now 500 milliseconds. Still using the figures above (except for the new 0.500 delay time), we reduce the TRIB for our half-duplex, satellite link to 2317 bps, which is almost one-half for the full-duplex (no turnaround time) 4054 bps.

Comments

Popular posts from this blog

JAVA Scrollbar, MenuItem and Menu, PopupMenu

ava AWT Scrollbar The  object  of Scrollbar class is used to add horizontal and vertical scrollbar. Scrollbar is a  GUI  component allows us to see invisible number of rows and columns. AWT Scrollbar class declaration public   class  Scrollbar  extends  Component  implements  Adjustable, Accessible   Java AWT Scrollbar Example import  java.awt.*;   class  ScrollbarExample{   ScrollbarExample(){               Frame f=  new  Frame( "Scrollbar Example" );               Scrollbar s= new  Scrollbar();               s.setBounds( 100 , 100 ,  50 , 100 );               f.add(s);               f.setSize( 400 , 400 );               f.setLayout( null );               f.setVisible( true );   }   public   static   void  main(String args[]){           new  ScrollbarExample();   }   }   Output: Java AWT Scrollbar Example with AdjustmentListener import  java.awt.*;   import  java.awt.event.*;   class  ScrollbarExample{        ScrollbarExample(){               Frame f=  new  Frame( "Scro

Difference between net platform and dot net framework...

Difference between net platform and dot net framework... .net platform supports programming languages that are .net compatible. It is the platform using which we can build and develop the applications. .net framework is the engine inside the .net platform which actually compiles and produces the executable code. .net framework contains CLR(Common Language Runtime) and FCL(Framework Class Library) using which it produces the platform independent codes. What is the .NET Framework? The Microsoft .NET Framework is a platform for building, deploying, and running Web Services and applications. It provides a highly productive, standards-based, multi-language environment for integrating existing investments with next-generation applications and services as well as the agility to solve the challenges of deployment and operation of Internet-scale applications. The .NET Framework consists of three main parts: the common language runtime, a hierarchical set of unified class librari

C++ this Pointer, static, struct and Enumeration

C++ this Pointer In C++ programming,  this  is a keyword that refers to the current instance of the class. There can be 3 main usage of this keyword in C++. It can be used  to pass current object as a parameter to another method. It can be used  to refer current class instance variable. It can be used  to declare indexers. C++ this Pointer Example Let's see the example of this keyword in C++ that refers to the fields of current class. #include <iostream>    using   namespace  std;   class  Employee {       public :           int  id;  //data member (also instance variable)               string name;  //data member(also instance variable)            float  salary;          Employee( int  id, string name,  float  salary)             {                   this ->id = id;                  this ->name = name;                  this ->salary = salary;            }             void  display()             {                 cout<<id<< "  " <<name<&