SlideShare a Scribd company logo
1 of 25
DATA
                           LINK
                     LAYER

      TOPIC: Error control & Flow control




Submitted to :                    Submitted by:
Prof Manraj Singh Pattar           Alisha Korpal
                                   Nancy Jain
                                   Nivea Jain
                                   Sharuti Jain



                                                1|Page
INDEX
S no                           Topic        Page no
 1     Introduction to data link layer         3
 2     Services provided to network layer      4
 3     Services                                6
 4     Framing                                 7
 5     Error detection                         8
 6     Error correction                       15
 7     Flow control                           16
 8     Error control                          19
 9     References                             24




                                               2|Page
INTRODUCTION
Data Link Layer Design Issues

The data link layer has a number of specific functions it can carry out. These functions
include

   1. Providing a well-defined service interface to the network layer.
   2. Dealing with transmission errors.
   3. Regulating the flow of data so that slow receivers are not swamped by fast senders.

To accomplish these goals, the data link layer takes the packets it gets from the network layer
and encapsulates them into frames for transmission. Each frame contains a frame header, a
payload field for holding the packet, and a frame trailer.




                                                                                     3|Page
Services Provided to the Network Layer

The function of the data link layer is to provide services to the network layer. The principal
service is transferring data from the network layer on the source machine to the network layer
on the destination machine. On the source machine is an entity, call it a process, in the
network layer that hands some bits to the data link layer for transmission to the destination.
The job of the data link layer is to transmit the bits to the destination machine so they can be
handed over to the network layer there.

    1. Unacknowledged connectionless service.
    2. Acknowledged connectionless service.
    3. Acknowledged connection-oriented service


Unacknowledged Connectionless Service

Unacknowledged connectionless service consists of having the source machine send
independent frames to the destination machine without having the destination machine
acknowledge them. No logical connection is established beforehand or released afterward. If a
frame is lost due to noise on the line, no attempt is made to detect the loss or recover from it
in the data link layer. This class of service is appropriate when the error rate is very low so
that recovery is left to higher layers. It is also appropriate for real-time traffic, such as voice,
in which late data are worse than bad data. Most LANs use unacknowledged connectionless
service in the data link layer.


Acknowledged Connectionless service

When this service is offered, there are still no logical connections used, but each frame sent is
individually acknowledged. In this way, the sender knows whether a frame has arrived
correctly. If it has not arrived within a specified time interval, it can be sent again. This
service is useful over unreliable channels, such as wireless systems.




                                                                                         4|Page
Connection Oriented Service

With this service, the source and destination machines establish a connection before any data
are transferred. Each frame sent over the connection is numbered, and the data link layer
guarantees that each frame sent is indeed received. Furthermore, it guarantees that each frame
is received exactly once and that all frames are received in the right order. With
connectionless service, in contrast, it is conceivable that a lost acknowledgement causes a
packet to be sent several times and thus received several times. Connection-oriented service,
in contrast, provides the network layer processes with the equivalent of a reliable bit stream.




                                                                                       5|Page
SERVICES
    1. Framing

    2. Error control

    3. Flow control

    4. Access Control

    5. Physical Addressing




                             6|Page
Framing
To provide service to the network layer, the data link layer must use the service provided to it
by the physical layer. What the physical layer does is accept a raw bit stream and attempt to
deliver it to the destination. This bit stream is not guaranteed to be error free. The number of
bits received may be less than, equal to, or more than the number of bits transmitted, and they
may have different values. It is up to the data link layer to detect and, if necessary, correct
errors.

The usual approach is for the data link layer to break the bit stream up into discrete frames
and compute the checksum for each frame. (Checksum algorithms will be discussed later in
this chapter.) When a frame arrives at the destination, the checksum is recomputed. If the
newly-computed checksum is different from the one contained in the frame, the data link
layer knows that an error has occurred and takes steps to deal with it (e.g., discarding the bad
frame and possibly also sending back an error report).

Breaking the bit stream up into frames is more difficult than it at first appears. One way to
achieve this framing is to insert time gaps between frames, much like the spaces between
words in ordinary text. However, networks rarely make any guarantees about timing, so it is
possible these gaps might be squeezed out or other gaps might be inserted during
transmission. Since it is too risky to count on timing to mark the start and end of each frame,
other methods have been devised. In this section we will look at four methods:

    1. Character count.
    2. Flag bytes with byte stuffing.
    3. Starting and ending flags, with bit stuffing.
    4. Physical layer coding violations.




                                                                                      7|Page
Error Control
Having solved the problem of marking the start and end of each frame, we come to the next
problem: how to make sure all frames are eventually delivered to the network layer at the
destination and in the proper order. Suppose that the sender just kept outputting frames
without regard to whether they were arriving properly. This might be fine for
unacknowledged connectionless service, but would most certainly not be fine for reliable,
connection-oriented service.

The usual way to ensure reliable delivery is to provide the sender with some feedback about
what is happening at the other end of the line. Typically, the protocol calls for the receiver to
send back special control frames bearing positive or negative acknowledgements about the
incoming frames. If the sender receives a positive acknowledgement about a frame, it knows
the frame has arrived safely. On the other hand, a negative acknowledgement means that
something has gone wrong, and the frame must be transmitted again.

An additional complication comes from the possibility that hardware troubles may cause a
frame to vanish completely (e.g., in a noise burst). In this case, the receiver will not react at
all, since it has no reason to react. It should be clear that a protocol in which the sender
transmits a frame and then waits for an acknowledgement, positive or negative, will hang
forever if a frame is ever lost due to, for example, malfunctioning hardware


                   โ€ข Error Detection
                   โ€ข Error Correction




                                                                                       8|Page
Error Detection

When data is being transmitted from one machine to another, it may possible that data
become corrupted on its way. Some of the bits may be altered, damaged or lost during
transmission. Such a condition is known as error.

The error may occur because of noise on line, attenuation and delay distortion. For reliable
communication, it is important that errors are detected and corrected.

        Types of errors

            โ€ข   Single bit error
            โ€ข   Burst error


Single bit error

It means only one bit of data unit is changed from 1 to 0 or from 0 to 1. Single bit error can
happen in parallel transmission where all the data bits are transmitted using separate wires.
Single bit error is least likely type of errors in serial transmission.


Burst Error

It means two or more bits in data unit are changed from 1 to 0 or from 0 to 1. In burst error, it
is not necessary that only consecutive bits are changed. The length of burst error is measured
from first changed bit to last changed bit.




                                                                                       9|Page
Techniques

Error detection means inspecting the data so as to check whether or not data is changed during
the transmission. An error detection system is needed at the receiver end that should check the
incoming data and report the number and typeโ€™s errors that define have occurred. The most
common technique used for error detection is redundancy.


Redundancy

   ๏ƒ˜ Redundancy is the method in which some extra bits are added to the data so as to
        check whether the data contain error or not.
   ๏ƒ˜ These redundant bits are added by the sender and removed by the receiver as soon as
        the accuracy of the transmission has been determined
   ๏ƒ˜ These redundant bits are then added to the data and data + redundant bits are
        transmitted to the receiver


Types

   1. Vertical Redundancy check/parity check
   2. Longitudinal Redundancy check
   3. Cyclic Redundancy check
   4. Checksum




                                                                                    10 | P a g e
Vertical Redundancy Check/Parity Check
This method is also known as parity check. In this method, a redundant bit called parity bit is
added to each data unit. This method may include even parity or odd parity. Even parity
means that total number of 1are even. Odd parity means the total no of 1 are odd.

Example

If source wants to transmit a data unit 1100111 using even parity to the destination. The
source will first pass this unit to even parity generator.

The parity generator will count the number of 1 in data and will add parity bit. In this
example, since the number of 1 in data unit is five, the parity generator appends a parity bit 1
to this data unit making the total number of 1 even.

    1     1    0   0    1    1      1



        Even Parity generator
                                            1
        (Counts 1 in data)

   1     1     0   0    1    1    1     1




   ๏ƒ˜ VRC can detect all single bit error
   ๏ƒ˜ It can also detect burst error but only in those cases where number of bits changed is
        odd.
   ๏ƒ˜ The major disadvantage of this method is that it is not able to detect burst error if the
        numbers of bits are even.




                                                                                     11 | P a g e
Longitudinal Redundancy Check

 ๏ƒ˜ In this method block of bits is divided into table or matrix of rows and columns.
 ๏ƒ˜ In order to detect the error, a redundant row of bits is added to the whole block and this
    block is transmitted to the receiver.
 ๏ƒ˜ The receiver uses this redundant row to detect error. After checking the data for errors,
    receivers accept the data and discard the redundant row of bits.


                            Sender data

            11001010        10101010        11001100       11100011



                                                                           11001010

                                                                           10101010

                                                                           11001100

                                                                           11100011


                                                                           01001111




            11001010        10101010        11001100       11100011       01001111

                                        Receiver data




 ๏ƒ˜ When this data reaches the destination, receiver uses LRC to detect error in data.

 ๏ƒ˜ LRC is used to detect burst errors. For e.g. suppose 32 bit data plus LRC that was being
    transmitted is hit by burst error of length five and some bits are corrupted.




                                                                                      12 | P a g e
Cyclic Redundancy Check
  ๏ƒ˜ CRC is more powerful than VRC and LRC in detecting errors.

  ๏ƒ˜ It is not based on binary addition like VRC and LRC. Rather it is based on binary
     division.

  ๏ƒ˜ At the sender side, the data unit to be transmitted is divided by a predetermined divisor
     (binary number) in order t obtain the remainder. This remainder is called CRC.

  ๏ƒ˜ The CRC has one bit less than the divisor. It means that if CRC is of n bits, divisor is
     of n+ 1 bit.

  ๏ƒ˜ The sender appends this bit CRC to the end of data unit such that the resulting data
     unit becomes exactly divisible by predetermined divisor i.e. remainder become zero.




                    1011

         1011       1001000
                    1011
                     0100
                     0000
                       1000
                       1011
                        0110
                        0000
                          110




                                                                                  13 | P a g e
Checksum
   ๏ƒ˜ Checksum is the error detection method used by upper layer protocols and is
      considered to be more reliable than LRC, VRC & CRC.

   ๏ƒ˜ This method makes use of checksum generator on the sender side &checksum checker
      on the receiver side.

   ๏ƒ˜ At the sender side, checksum generator divides the data into equal subunits of n bit
      length. This length is generally of 16 bits.

For example

      If the data unit to be transmitted is 10101001     00111001, the following procedure is
      used at the sender & receiver site.




      Sender site:
                              10101001      (subunit 1)
                              00111001      (subunit 2)

                              11100010      (sum using 1 compliment)
                              00011101      check sum (compliment of sum )




                     10101001      00111001          00011101

                              DATA                   Checksum

        Receiver site:

                         10101001              subunit 1

                         00111001              subunit 2

                         00011101              checksum

                         11111111              sum
                                                                                  14 | P a g e
                         00000000              sum compliment
Error Correction
Error correction means rectifying all the bits that have been altered or changed during the
transmission of data. Error correction can be done as follows:

    ๏ƒ˜ By retransmission of data from sender to receiver.

    ๏ƒ˜ By the use of error correction code at the receiver side.

Hamming Code

Hamming code is a technique developed by R.W. hamming for error correction. This method
corrects the error by finding the state at which the error has occurred.




                                                                                15 | P a g e
Flow Control

Another important design issue that occurs in the data link layer (and higher layers as well) is
what to do with a sender that systematically wants to transmit frames faster than the receiver
can accept them. This situation can easily occur when the sender is running on a fast (or
lightly loaded) computer and the receiver is running on a slow (or heavily loaded) machine.
The sender keeps pumping the frames out at a high rate until the receiver is completely
swamped. Even if the transmission is error free, at a certain point the receiver will simply be
unable to handle the frames as they arrive and will start to lose some. Clearly, something has
to be done to prevent this situation.

Two approaches are commonly used. In the first one, feedback-based flow control, the
receiver sends back information to the sender giving it permission to send more data or at
least telling the sender how the receiver is doing. In the second one, rate-based flow control,
the protocol has a built-in mechanism that limits the rate at which senders may transmit data,
without using feedback from the receiver. In this chapter we will study feedback-based flow
control schemes because rate-based schemes are never used in the data link layer.


Methods

   ๏ƒ˜ Stop and Wait
   ๏ƒ˜ Sliding window




                                                                                     16 | P a g e
Stop and Wait

  ๏ƒ˜ In this method of flow control, the sender sends a single frame to receiver and waits
     for an acknowledgment.
  ๏ƒ˜ The next frame is send by sender only when acknowledgment of previous frame is
     received.
  ๏ƒ˜ This process of sending a frame & waiting for an acknowledgment continues as long
     as sender has data to send.
  ๏ƒ˜ To end up the transmission sender transmits EOT frame
  ๏ƒ˜ The main advantage is its accuracy. Next frame is transmitted only when the
     acknowledged is received.
  ๏ƒ˜ So no chance of frame being lost




                                                                  Receiver
                 Sender


                                       DATA


                                       ACK


                                       DATA



                                       EOT




                                                                              17 | P a g e
Sliding Window
In sliding window method, multiple frames are sent by sender at a time before needing an
acknowledgment. Multiple frames sent by source are acknowledged by receiver using a single
ACK frame. Sliding window refers to an imaginary boxes that hold the frames on both sender
and receiver side. It provides the upper limit on the number of frames that can be transmitted
before requiring an acknowledgment. Frames may be acknowledged by receiver at any point
even window is not full on receiver side. Frames may be transmitted by source even when
window is not yet full on sender side.




         6         7         0           1        2      3         4        5



                                             Window




                                                                                   18 | P a g e
Error Control
Error control function of data link layer detects the error in transmitted frames and retransmits
all the erroneous frames. Therefore error control function of data link layer helps in dealing
with data frames that are damaged in transmit, data frame lost in transmit and the
acknowledgment frame that are lost in transmission. The method is used for error control is
called Automatic Repeat Request (ARQ).

Automatic Repeat Request (ARQ)

If an error is detected in any frame, the receiver sends a negative acknowledgement (NAK)
back to source and the specific frame is retransmitted.

ARQ techniques:

   ๏ƒ˜ Stop and Wait ARQ

   ๏ƒ˜ Sliding window ARQ

           ๏ƒผ Go - back - n

           ๏ƒผ   Selective โ€“ reject




                                                                                     19 | P a g e
Stop and Wait
  ๏ฝ The sending device keeps a copy of the last frame transmitted until it receives an
     acknowledgment for that frame. Keeping this copy helps the sender in retransmission
     of lost or damaged frames later on.

  ๏ฝ Both data frames and ACK frames are numbered alternately 0 and 1 for identification
     purpose.

  ๏ฝ Criteria used by stop and wait ARQ method:

                ๏‚–   Damaged data frames

                ๏‚–   Lost data frames

                ๏‚–   Lost acknowledged frames




                                                                             20 | P a g e
Damaged data frames

If a data frame received by a receiver contains an error, it returns NAK frame to the
sender. On receiving NAK frame, sender retransmits the last data frame.




                                                                          21 | P a g e
Lost data frames
   ๏ฝ Every sending device is equipped with timer.

   ๏ฝ The sender starts this timer when it transmits data frame.

   ๏ฝ If a data frame is lost on its way, it will not be received by receiver. As a result the
      receiver can never acknowledge it, positively or negatively.

   ๏ฝ The sending device waits for an ACK and NAK frame until timer goes of.




                                                                                  22 | P a g e
Lost acknowledgment frames
  ๏ฝ When any data frame reaches the destination, the receiver acknowledges it either with
     ACK or with NAK.

  ๏ฝ If ACK or NAK frame returned by the receiver is lost in transmit, sending device
     retransmit the data frame that has not been acknowledged




                                                                              23 | P a g e
References
  ๏ƒผ http://docs.google.com/viewer?
     a=v&q=cache:g0kc6om7ALEJ:www.cis.temple.edu/~latecki/Courses/CIS617-04/slide
     s/Ch3DataLink.ppt+data+link+layer+-
     +error+control&hl=en&gl=in&pid=bl&srcid=ADGEESh7iihVLjzfFbz0gre7MU026m
     n1tthMC-nrjVDOhmlFyqp-
     EpbPP18Dz7PJTOo3lto10Jrgl1nkhxfKGMHEko4l92TcpWhWdwZ6NWFLwcgt8vL1
     Rflnm2flNelUYRNLV8E9V-H&sig=AHIEtbR0cwRF6qCblrz1ZzC5FkQnUHZegA

  ๏ƒผ http://www.google.co.in/search?q=data+link+layer+-
     +error+control&hl=en&biw=1280&bih=869&prmd=ivns&ei=x5yqTduNEIXqrAfs2Zi
     oCA&start=10&sa=N

  ๏ƒผ http://docs.google.com/viewer?
     a=v&q=cache:_jvDqkVmAswJ:people.du.ac.in/~ngupta/CS204/Data%2520Link
     %2520Layer.ppt+data+link+layer+-
     +erroe+control&hl=en&gl=in&pid=bl&srcid=ADGEESjvzCW9EVWHSCgLuNEgYr
     LN8SnUvi-OQgDHzumZNNbPe-08mHhM4hLYqcxF960wte5mZHm1vae0-
     qOmWu71x0w7bOq8M4iogycqPZP23VkXGkvzE3lb5FJDHjBjJf5funeJkYit&sig=A
     HIEtbTruvMLqEm3DYW-JmR6GPILqmFx_g

  ๏ƒผ http://docs.google.com/viewer?
     a=v&q=cache:pXaIC8VehawJ:www.cs.virginia.edu/~zaher/classes/CS457/lectures/flo
     w-control.pdf+data+link+layer+-
     +erroe+control&hl=en&gl=in&pid=bl&srcid=ADGEEShXOPBrrzZXuk9J4MVuSzC
     UNdgifCxHo6B7UQHf_g49Cl6wsZ2gdb0dO-
     MsM0hcZzEE62PlsGcupxyd5Mh7676xNqU7MxtrutxhVWykBIypsiEu9Q1E1BZ87x
     8Kup4M5pyJkV-F&sig=AHIEtbQIRNWpmfHTwyXPybAvYx5rs3G7YA

  ๏ƒผ http://docs.google.com/viewer?
     a=v&q=cache:li73YI_zh7EJ:eeweb.poly.edu/el536/datalink_control.pdf+data+link+la
     yer+-
     +error+control&hl=en&gl=in&pid=bl&srcid=ADGEESglDES4xEYhroZ5oQpGK5A
     _dK7xynEbzeK23jLHPHyZj7W1KkOe_2ef_zUDjgG6v12ovMiaazeR9y9tikfCvRoE



                                                                          24 | P a g e
KQWLbnHnmlIyaMQmT-oX-0r60nw-
dk8hhac3xKoK_iRy12cv&sig=AHIEtbQScSEyKt6bSxqC_02VfzUXFYWRew




                                                        25 | P a g e

More Related Content

What's hot

Framming data link layer
Framming data link layerFramming data link layer
Framming data link layerPREMAL GAJJAR
ย 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layersumit gyawali
ย 
Congestion control
Congestion controlCongestion control
Congestion controlAman Jaiswal
ย 
Internetworking
InternetworkingInternetworking
InternetworkingRaghu nath
ย 
Transport layer
Transport layer Transport layer
Transport layer Mukesh Chinta
ย 
Error Detection and Correction - Data link Layer
Error Detection and Correction - Data link LayerError Detection and Correction - Data link Layer
Error Detection and Correction - Data link LayerAbdullaziz Tagawy
ย 
Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibraribrar562
ย 
7. data link layer error detection and correction codes - parity and checksum
7. data link layer   error detection and correction codes - parity and checksum7. data link layer   error detection and correction codes - parity and checksum
7. data link layer error detection and correction codes - parity and checksumJAIGANESH SEKAR
ย 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module IIAjit Nayak
ย 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocolasimnawaz54
ย 
Introduction to Data-Link Layer
Introduction to Data-Link LayerIntroduction to Data-Link Layer
Introduction to Data-Link LayerAbdullaziz Tagawy
ย 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol meenamunesh
ย 
Unit 3 Network Layer PPT
Unit 3 Network Layer PPTUnit 3 Network Layer PPT
Unit 3 Network Layer PPTKalpanaC14
ย 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iiiJAIGANESH SEKAR
ย 
Chapter 4-The Medium Access Control Sublayer.ppt
Chapter 4-The Medium Access Control Sublayer.pptChapter 4-The Medium Access Control Sublayer.ppt
Chapter 4-The Medium Access Control Sublayer.pptvanlinhle3
ย 
RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION           RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION AMOGHA A K
ย 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocolN.Jagadish Kumar
ย 

What's hot (20)

Framming data link layer
Framming data link layerFramming data link layer
Framming data link layer
ย 
Presentation of computer network on data link layer
Presentation of computer network on data link layerPresentation of computer network on data link layer
Presentation of computer network on data link layer
ย 
Congestion control
Congestion controlCongestion control
Congestion control
ย 
Internetworking
InternetworkingInternetworking
Internetworking
ย 
Transport layer
Transport layer Transport layer
Transport layer
ย 
Error Detection and Correction - Data link Layer
Error Detection and Correction - Data link LayerError Detection and Correction - Data link Layer
Error Detection and Correction - Data link Layer
ย 
Error Correction And Hamming Code Ibrar
Error Correction And Hamming Code IbrarError Correction And Hamming Code Ibrar
Error Correction And Hamming Code Ibrar
ย 
7. data link layer error detection and correction codes - parity and checksum
7. data link layer   error detection and correction codes - parity and checksum7. data link layer   error detection and correction codes - parity and checksum
7. data link layer error detection and correction codes - parity and checksum
ย 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module II
ย 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
ย 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
ย 
Point to-point protocol (ppp)
Point to-point protocol (ppp)Point to-point protocol (ppp)
Point to-point protocol (ppp)
ย 
Introduction to Data-Link Layer
Introduction to Data-Link LayerIntroduction to Data-Link Layer
Introduction to Data-Link Layer
ย 
Multiple access control protocol
Multiple access control protocol Multiple access control protocol
Multiple access control protocol
ย 
Unit 3 Network Layer PPT
Unit 3 Network Layer PPTUnit 3 Network Layer PPT
Unit 3 Network Layer PPT
ย 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iii
ย 
Chapter 8
Chapter 8Chapter 8
Chapter 8
ย 
Chapter 4-The Medium Access Control Sublayer.ppt
Chapter 4-The Medium Access Control Sublayer.pptChapter 4-The Medium Access Control Sublayer.ppt
Chapter 4-The Medium Access Control Sublayer.ppt
ย 
RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION           RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION
ย 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
ย 

Viewers also liked

Stop And Wait
Stop And WaitStop And Wait
Stop And WaitHarsh Singh
ย 
Error detection and correction, flow and error control and trasmission media
Error detection and correction, flow and error control and  trasmission mediaError detection and correction, flow and error control and  trasmission media
Error detection and correction, flow and error control and trasmission mediaPANKAJ333
ย 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20koolkampus
ย 
Stop And Wait ARQ
Stop And Wait ARQStop And Wait ARQ
Stop And Wait ARQAnitha Selvan
ย 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocolRishu Seth
ย 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQguesta1b35273
ย 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correctionSiddique Ibrahim
ย 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
ย 
Stop-and-Wait ARQ Protocol
Stop-and-Wait ARQ ProtocolStop-and-Wait ARQ Protocol
Stop-and-Wait ARQ Protocolpraneetayargattikar
ย 

Viewers also liked (11)

Stop And Wait
Stop And WaitStop And Wait
Stop And Wait
ย 
Error detection and correction, flow and error control and trasmission media
Error detection and correction, flow and error control and  trasmission mediaError detection and correction, flow and error control and  trasmission media
Error detection and correction, flow and error control and trasmission media
ย 
Chapter 11
Chapter 11Chapter 11
Chapter 11
ย 
Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20Data Link Control in Data Communication DC20
Data Link Control in Data Communication DC20
ย 
Stop And Wait ARQ
Stop And Wait ARQStop And Wait ARQ
Stop And Wait ARQ
ย 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocol
ย 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
ย 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
ย 
Flow Control
Flow ControlFlow Control
Flow Control
ย 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
ย 
Stop-and-Wait ARQ Protocol
Stop-and-Wait ARQ ProtocolStop-and-Wait ARQ Protocol
Stop-and-Wait ARQ Protocol
ย 

Similar to Report on data link layer

CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfJoshuaeeda1
ย 
Data communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxData communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxBHAVYPATEL34
ย 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3SakthiVinoth78
ย 
Computer network coe351- part4- final
Computer network coe351- part4- finalComputer network coe351- part4- final
Computer network coe351- part4- finalTaymoor Nazmy
ย 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxk2w9psdb96
ย 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Ronoh Kennedy
ย 
Data link layer tutorial
Data link layer tutorialData link layer tutorial
Data link layer tutorialSwapnadeep Reloaded
ย 
Transport laye
Transport laye Transport laye
Transport laye Sammer Qader
ย 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxlathass5
ย 
Unit 2
Unit 2Unit 2
Unit 2APARNA P
ย 
Data link layer
Data link layerData link layer
Data link layersbkbca
ย 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukeshTamiratDejene1
ย 
Computers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.pptComputers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.pptkekeuwoe
ย 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail descriptionBathshebaparimala
ย 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT IINANDINI SHARMA
ย 
Data link layer
Data link layerData link layer
Data link layerMonu Chaudhary
ย 

Similar to Report on data link layer (20)

CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdf
ย 
Data communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptxData communication network ppt_Unit_4.pptx
Data communication network ppt_Unit_4.pptx
ย 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3
ย 
Computer network coe351- part4- final
Computer network coe351- part4- finalComputer network coe351- part4- final
Computer network coe351- part4- final
ย 
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptxU2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
U2CH1Data Link Layerxxxxxxxxxxxxxxxxx.pptx
ย 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1
ย 
Data link layer tutorial
Data link layer tutorialData link layer tutorial
Data link layer tutorial
ย 
Transport laye
Transport laye Transport laye
Transport laye
ย 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptx
ย 
Unit 2
Unit 2Unit 2
Unit 2
ย 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
ย 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
ย 
DLL
DLLDLL
DLL
ย 
Data link layer
Data link layerData link layer
Data link layer
ย 
datalinklayermukesh
datalinklayermukeshdatalinklayermukesh
datalinklayermukesh
ย 
Computers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.pptComputers network Chapter 3 The data link layer.ppt
Computers network Chapter 3 The data link layer.ppt
ย 
III_UNIT.ppt
III_UNIT.pptIII_UNIT.ppt
III_UNIT.ppt
ย 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail description
ย 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT II
ย 
Data link layer
Data link layerData link layer
Data link layer
ย 

More from Alisha Korpal

Cyber crime and secuity
Cyber crime and secuityCyber crime and secuity
Cyber crime and secuityAlisha Korpal
ย 
Ppt on remote sensing system
Ppt on remote sensing systemPpt on remote sensing system
Ppt on remote sensing systemAlisha Korpal
ย 
Research presentaion on 2g,3g
Research presentaion on 2g,3gResearch presentaion on 2g,3g
Research presentaion on 2g,3gAlisha Korpal
ย 
Ppt on remote sensing system
Ppt on remote sensing systemPpt on remote sensing system
Ppt on remote sensing systemAlisha Korpal
ย 
Computer graphics report
Computer graphics reportComputer graphics report
Computer graphics reportAlisha Korpal
ย 
Ppt on flat panel display
Ppt on flat panel displayPpt on flat panel display
Ppt on flat panel displayAlisha Korpal
ย 
Java swings
Java swingsJava swings
Java swingsAlisha Korpal
ย 
Search engine
Search engineSearch engine
Search engineAlisha Korpal
ย 
Report swings
Report swingsReport swings
Report swingsAlisha Korpal
ย 
Search engine
Search engineSearch engine
Search engineAlisha Korpal
ย 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligenceAlisha Korpal
ย 
AiArtificial Itelligence
AiArtificial ItelligenceAiArtificial Itelligence
AiArtificial ItelligenceAlisha Korpal
ย 
Science and tecnology
Science and tecnologyScience and tecnology
Science and tecnologyAlisha Korpal
ย 
Visual basic
Visual basicVisual basic
Visual basicAlisha Korpal
ย 
Presentation on dll
Presentation on dllPresentation on dll
Presentation on dllAlisha Korpal
ย 
Report on touch screen
Report on touch screenReport on touch screen
Report on touch screenAlisha Korpal
ย 
Ppt on touch screen
Ppt on touch screenPpt on touch screen
Ppt on touch screenAlisha Korpal
ย 

More from Alisha Korpal (20)

Cyber crime and secuity
Cyber crime and secuityCyber crime and secuity
Cyber crime and secuity
ย 
Ppt on remote sensing system
Ppt on remote sensing systemPpt on remote sensing system
Ppt on remote sensing system
ย 
Air crew
Air crewAir crew
Air crew
ย 
Research presentaion on 2g,3g
Research presentaion on 2g,3gResearch presentaion on 2g,3g
Research presentaion on 2g,3g
ย 
Alisha
AlishaAlisha
Alisha
ย 
Ppt on remote sensing system
Ppt on remote sensing systemPpt on remote sensing system
Ppt on remote sensing system
ย 
Computer graphics report
Computer graphics reportComputer graphics report
Computer graphics report
ย 
Ppt on flat panel display
Ppt on flat panel displayPpt on flat panel display
Ppt on flat panel display
ย 
Java swings
Java swingsJava swings
Java swings
ย 
Search engine
Search engineSearch engine
Search engine
ย 
Report swings
Report swingsReport swings
Report swings
ย 
Search engine
Search engineSearch engine
Search engine
ย 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
ย 
AiArtificial Itelligence
AiArtificial ItelligenceAiArtificial Itelligence
AiArtificial Itelligence
ย 
Science and tecnology
Science and tecnologyScience and tecnology
Science and tecnology
ย 
Visual basic
Visual basicVisual basic
Visual basic
ย 
Internet
InternetInternet
Internet
ย 
Presentation on dll
Presentation on dllPresentation on dll
Presentation on dll
ย 
Report on touch screen
Report on touch screenReport on touch screen
Report on touch screen
ย 
Ppt on touch screen
Ppt on touch screenPpt on touch screen
Ppt on touch screen
ย 

Recently uploaded

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
ย 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
ย 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
ย 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
ย 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
ย 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
ย 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
ย 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
ย 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
ย 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
ย 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
ย 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
ย 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
ย 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
ย 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
ย 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
ย 

Recently uploaded (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
ย 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
ย 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
ย 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
ย 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
ย 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
ย 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
ย 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
ย 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
ย 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
ย 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
ย 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
ย 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
ย 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
ย 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
ย 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
ย 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
ย 

Report on data link layer

  • 1. DATA LINK LAYER TOPIC: Error control & Flow control Submitted to : Submitted by: Prof Manraj Singh Pattar Alisha Korpal Nancy Jain Nivea Jain Sharuti Jain 1|Page
  • 2. INDEX S no Topic Page no 1 Introduction to data link layer 3 2 Services provided to network layer 4 3 Services 6 4 Framing 7 5 Error detection 8 6 Error correction 15 7 Flow control 16 8 Error control 19 9 References 24 2|Page
  • 3. INTRODUCTION Data Link Layer Design Issues The data link layer has a number of specific functions it can carry out. These functions include 1. Providing a well-defined service interface to the network layer. 2. Dealing with transmission errors. 3. Regulating the flow of data so that slow receivers are not swamped by fast senders. To accomplish these goals, the data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission. Each frame contains a frame header, a payload field for holding the packet, and a frame trailer. 3|Page
  • 4. Services Provided to the Network Layer The function of the data link layer is to provide services to the network layer. The principal service is transferring data from the network layer on the source machine to the network layer on the destination machine. On the source machine is an entity, call it a process, in the network layer that hands some bits to the data link layer for transmission to the destination. The job of the data link layer is to transmit the bits to the destination machine so they can be handed over to the network layer there. 1. Unacknowledged connectionless service. 2. Acknowledged connectionless service. 3. Acknowledged connection-oriented service Unacknowledged Connectionless Service Unacknowledged connectionless service consists of having the source machine send independent frames to the destination machine without having the destination machine acknowledge them. No logical connection is established beforehand or released afterward. If a frame is lost due to noise on the line, no attempt is made to detect the loss or recover from it in the data link layer. This class of service is appropriate when the error rate is very low so that recovery is left to higher layers. It is also appropriate for real-time traffic, such as voice, in which late data are worse than bad data. Most LANs use unacknowledged connectionless service in the data link layer. Acknowledged Connectionless service When this service is offered, there are still no logical connections used, but each frame sent is individually acknowledged. In this way, the sender knows whether a frame has arrived correctly. If it has not arrived within a specified time interval, it can be sent again. This service is useful over unreliable channels, such as wireless systems. 4|Page
  • 5. Connection Oriented Service With this service, the source and destination machines establish a connection before any data are transferred. Each frame sent over the connection is numbered, and the data link layer guarantees that each frame sent is indeed received. Furthermore, it guarantees that each frame is received exactly once and that all frames are received in the right order. With connectionless service, in contrast, it is conceivable that a lost acknowledgement causes a packet to be sent several times and thus received several times. Connection-oriented service, in contrast, provides the network layer processes with the equivalent of a reliable bit stream. 5|Page
  • 6. SERVICES 1. Framing 2. Error control 3. Flow control 4. Access Control 5. Physical Addressing 6|Page
  • 7. Framing To provide service to the network layer, the data link layer must use the service provided to it by the physical layer. What the physical layer does is accept a raw bit stream and attempt to deliver it to the destination. This bit stream is not guaranteed to be error free. The number of bits received may be less than, equal to, or more than the number of bits transmitted, and they may have different values. It is up to the data link layer to detect and, if necessary, correct errors. The usual approach is for the data link layer to break the bit stream up into discrete frames and compute the checksum for each frame. (Checksum algorithms will be discussed later in this chapter.) When a frame arrives at the destination, the checksum is recomputed. If the newly-computed checksum is different from the one contained in the frame, the data link layer knows that an error has occurred and takes steps to deal with it (e.g., discarding the bad frame and possibly also sending back an error report). Breaking the bit stream up into frames is more difficult than it at first appears. One way to achieve this framing is to insert time gaps between frames, much like the spaces between words in ordinary text. However, networks rarely make any guarantees about timing, so it is possible these gaps might be squeezed out or other gaps might be inserted during transmission. Since it is too risky to count on timing to mark the start and end of each frame, other methods have been devised. In this section we will look at four methods: 1. Character count. 2. Flag bytes with byte stuffing. 3. Starting and ending flags, with bit stuffing. 4. Physical layer coding violations. 7|Page
  • 8. Error Control Having solved the problem of marking the start and end of each frame, we come to the next problem: how to make sure all frames are eventually delivered to the network layer at the destination and in the proper order. Suppose that the sender just kept outputting frames without regard to whether they were arriving properly. This might be fine for unacknowledged connectionless service, but would most certainly not be fine for reliable, connection-oriented service. The usual way to ensure reliable delivery is to provide the sender with some feedback about what is happening at the other end of the line. Typically, the protocol calls for the receiver to send back special control frames bearing positive or negative acknowledgements about the incoming frames. If the sender receives a positive acknowledgement about a frame, it knows the frame has arrived safely. On the other hand, a negative acknowledgement means that something has gone wrong, and the frame must be transmitted again. An additional complication comes from the possibility that hardware troubles may cause a frame to vanish completely (e.g., in a noise burst). In this case, the receiver will not react at all, since it has no reason to react. It should be clear that a protocol in which the sender transmits a frame and then waits for an acknowledgement, positive or negative, will hang forever if a frame is ever lost due to, for example, malfunctioning hardware โ€ข Error Detection โ€ข Error Correction 8|Page
  • 9. Error Detection When data is being transmitted from one machine to another, it may possible that data become corrupted on its way. Some of the bits may be altered, damaged or lost during transmission. Such a condition is known as error. The error may occur because of noise on line, attenuation and delay distortion. For reliable communication, it is important that errors are detected and corrected. Types of errors โ€ข Single bit error โ€ข Burst error Single bit error It means only one bit of data unit is changed from 1 to 0 or from 0 to 1. Single bit error can happen in parallel transmission where all the data bits are transmitted using separate wires. Single bit error is least likely type of errors in serial transmission. Burst Error It means two or more bits in data unit are changed from 1 to 0 or from 0 to 1. In burst error, it is not necessary that only consecutive bits are changed. The length of burst error is measured from first changed bit to last changed bit. 9|Page
  • 10. Techniques Error detection means inspecting the data so as to check whether or not data is changed during the transmission. An error detection system is needed at the receiver end that should check the incoming data and report the number and typeโ€™s errors that define have occurred. The most common technique used for error detection is redundancy. Redundancy ๏ƒ˜ Redundancy is the method in which some extra bits are added to the data so as to check whether the data contain error or not. ๏ƒ˜ These redundant bits are added by the sender and removed by the receiver as soon as the accuracy of the transmission has been determined ๏ƒ˜ These redundant bits are then added to the data and data + redundant bits are transmitted to the receiver Types 1. Vertical Redundancy check/parity check 2. Longitudinal Redundancy check 3. Cyclic Redundancy check 4. Checksum 10 | P a g e
  • 11. Vertical Redundancy Check/Parity Check This method is also known as parity check. In this method, a redundant bit called parity bit is added to each data unit. This method may include even parity or odd parity. Even parity means that total number of 1are even. Odd parity means the total no of 1 are odd. Example If source wants to transmit a data unit 1100111 using even parity to the destination. The source will first pass this unit to even parity generator. The parity generator will count the number of 1 in data and will add parity bit. In this example, since the number of 1 in data unit is five, the parity generator appends a parity bit 1 to this data unit making the total number of 1 even. 1 1 0 0 1 1 1 Even Parity generator 1 (Counts 1 in data) 1 1 0 0 1 1 1 1 ๏ƒ˜ VRC can detect all single bit error ๏ƒ˜ It can also detect burst error but only in those cases where number of bits changed is odd. ๏ƒ˜ The major disadvantage of this method is that it is not able to detect burst error if the numbers of bits are even. 11 | P a g e
  • 12. Longitudinal Redundancy Check ๏ƒ˜ In this method block of bits is divided into table or matrix of rows and columns. ๏ƒ˜ In order to detect the error, a redundant row of bits is added to the whole block and this block is transmitted to the receiver. ๏ƒ˜ The receiver uses this redundant row to detect error. After checking the data for errors, receivers accept the data and discard the redundant row of bits. Sender data 11001010 10101010 11001100 11100011 11001010 10101010 11001100 11100011 01001111 11001010 10101010 11001100 11100011 01001111 Receiver data ๏ƒ˜ When this data reaches the destination, receiver uses LRC to detect error in data. ๏ƒ˜ LRC is used to detect burst errors. For e.g. suppose 32 bit data plus LRC that was being transmitted is hit by burst error of length five and some bits are corrupted. 12 | P a g e
  • 13. Cyclic Redundancy Check ๏ƒ˜ CRC is more powerful than VRC and LRC in detecting errors. ๏ƒ˜ It is not based on binary addition like VRC and LRC. Rather it is based on binary division. ๏ƒ˜ At the sender side, the data unit to be transmitted is divided by a predetermined divisor (binary number) in order t obtain the remainder. This remainder is called CRC. ๏ƒ˜ The CRC has one bit less than the divisor. It means that if CRC is of n bits, divisor is of n+ 1 bit. ๏ƒ˜ The sender appends this bit CRC to the end of data unit such that the resulting data unit becomes exactly divisible by predetermined divisor i.e. remainder become zero. 1011 1011 1001000 1011 0100 0000 1000 1011 0110 0000 110 13 | P a g e
  • 14. Checksum ๏ƒ˜ Checksum is the error detection method used by upper layer protocols and is considered to be more reliable than LRC, VRC & CRC. ๏ƒ˜ This method makes use of checksum generator on the sender side &checksum checker on the receiver side. ๏ƒ˜ At the sender side, checksum generator divides the data into equal subunits of n bit length. This length is generally of 16 bits. For example If the data unit to be transmitted is 10101001 00111001, the following procedure is used at the sender & receiver site. Sender site: 10101001 (subunit 1) 00111001 (subunit 2) 11100010 (sum using 1 compliment) 00011101 check sum (compliment of sum ) 10101001 00111001 00011101 DATA Checksum Receiver site: 10101001 subunit 1 00111001 subunit 2 00011101 checksum 11111111 sum 14 | P a g e 00000000 sum compliment
  • 15. Error Correction Error correction means rectifying all the bits that have been altered or changed during the transmission of data. Error correction can be done as follows: ๏ƒ˜ By retransmission of data from sender to receiver. ๏ƒ˜ By the use of error correction code at the receiver side. Hamming Code Hamming code is a technique developed by R.W. hamming for error correction. This method corrects the error by finding the state at which the error has occurred. 15 | P a g e
  • 16. Flow Control Another important design issue that occurs in the data link layer (and higher layers as well) is what to do with a sender that systematically wants to transmit frames faster than the receiver can accept them. This situation can easily occur when the sender is running on a fast (or lightly loaded) computer and the receiver is running on a slow (or heavily loaded) machine. The sender keeps pumping the frames out at a high rate until the receiver is completely swamped. Even if the transmission is error free, at a certain point the receiver will simply be unable to handle the frames as they arrive and will start to lose some. Clearly, something has to be done to prevent this situation. Two approaches are commonly used. In the first one, feedback-based flow control, the receiver sends back information to the sender giving it permission to send more data or at least telling the sender how the receiver is doing. In the second one, rate-based flow control, the protocol has a built-in mechanism that limits the rate at which senders may transmit data, without using feedback from the receiver. In this chapter we will study feedback-based flow control schemes because rate-based schemes are never used in the data link layer. Methods ๏ƒ˜ Stop and Wait ๏ƒ˜ Sliding window 16 | P a g e
  • 17. Stop and Wait ๏ƒ˜ In this method of flow control, the sender sends a single frame to receiver and waits for an acknowledgment. ๏ƒ˜ The next frame is send by sender only when acknowledgment of previous frame is received. ๏ƒ˜ This process of sending a frame & waiting for an acknowledgment continues as long as sender has data to send. ๏ƒ˜ To end up the transmission sender transmits EOT frame ๏ƒ˜ The main advantage is its accuracy. Next frame is transmitted only when the acknowledged is received. ๏ƒ˜ So no chance of frame being lost Receiver Sender DATA ACK DATA EOT 17 | P a g e
  • 18. Sliding Window In sliding window method, multiple frames are sent by sender at a time before needing an acknowledgment. Multiple frames sent by source are acknowledged by receiver using a single ACK frame. Sliding window refers to an imaginary boxes that hold the frames on both sender and receiver side. It provides the upper limit on the number of frames that can be transmitted before requiring an acknowledgment. Frames may be acknowledged by receiver at any point even window is not full on receiver side. Frames may be transmitted by source even when window is not yet full on sender side. 6 7 0 1 2 3 4 5 Window 18 | P a g e
  • 19. Error Control Error control function of data link layer detects the error in transmitted frames and retransmits all the erroneous frames. Therefore error control function of data link layer helps in dealing with data frames that are damaged in transmit, data frame lost in transmit and the acknowledgment frame that are lost in transmission. The method is used for error control is called Automatic Repeat Request (ARQ). Automatic Repeat Request (ARQ) If an error is detected in any frame, the receiver sends a negative acknowledgement (NAK) back to source and the specific frame is retransmitted. ARQ techniques: ๏ƒ˜ Stop and Wait ARQ ๏ƒ˜ Sliding window ARQ ๏ƒผ Go - back - n ๏ƒผ Selective โ€“ reject 19 | P a g e
  • 20. Stop and Wait ๏ฝ The sending device keeps a copy of the last frame transmitted until it receives an acknowledgment for that frame. Keeping this copy helps the sender in retransmission of lost or damaged frames later on. ๏ฝ Both data frames and ACK frames are numbered alternately 0 and 1 for identification purpose. ๏ฝ Criteria used by stop and wait ARQ method: ๏‚– Damaged data frames ๏‚– Lost data frames ๏‚– Lost acknowledged frames 20 | P a g e
  • 21. Damaged data frames If a data frame received by a receiver contains an error, it returns NAK frame to the sender. On receiving NAK frame, sender retransmits the last data frame. 21 | P a g e
  • 22. Lost data frames ๏ฝ Every sending device is equipped with timer. ๏ฝ The sender starts this timer when it transmits data frame. ๏ฝ If a data frame is lost on its way, it will not be received by receiver. As a result the receiver can never acknowledge it, positively or negatively. ๏ฝ The sending device waits for an ACK and NAK frame until timer goes of. 22 | P a g e
  • 23. Lost acknowledgment frames ๏ฝ When any data frame reaches the destination, the receiver acknowledges it either with ACK or with NAK. ๏ฝ If ACK or NAK frame returned by the receiver is lost in transmit, sending device retransmit the data frame that has not been acknowledged 23 | P a g e
  • 24. References ๏ƒผ http://docs.google.com/viewer? a=v&q=cache:g0kc6om7ALEJ:www.cis.temple.edu/~latecki/Courses/CIS617-04/slide s/Ch3DataLink.ppt+data+link+layer+- +error+control&hl=en&gl=in&pid=bl&srcid=ADGEESh7iihVLjzfFbz0gre7MU026m n1tthMC-nrjVDOhmlFyqp- EpbPP18Dz7PJTOo3lto10Jrgl1nkhxfKGMHEko4l92TcpWhWdwZ6NWFLwcgt8vL1 Rflnm2flNelUYRNLV8E9V-H&sig=AHIEtbR0cwRF6qCblrz1ZzC5FkQnUHZegA ๏ƒผ http://www.google.co.in/search?q=data+link+layer+- +error+control&hl=en&biw=1280&bih=869&prmd=ivns&ei=x5yqTduNEIXqrAfs2Zi oCA&start=10&sa=N ๏ƒผ http://docs.google.com/viewer? a=v&q=cache:_jvDqkVmAswJ:people.du.ac.in/~ngupta/CS204/Data%2520Link %2520Layer.ppt+data+link+layer+- +erroe+control&hl=en&gl=in&pid=bl&srcid=ADGEESjvzCW9EVWHSCgLuNEgYr LN8SnUvi-OQgDHzumZNNbPe-08mHhM4hLYqcxF960wte5mZHm1vae0- qOmWu71x0w7bOq8M4iogycqPZP23VkXGkvzE3lb5FJDHjBjJf5funeJkYit&sig=A HIEtbTruvMLqEm3DYW-JmR6GPILqmFx_g ๏ƒผ http://docs.google.com/viewer? a=v&q=cache:pXaIC8VehawJ:www.cs.virginia.edu/~zaher/classes/CS457/lectures/flo w-control.pdf+data+link+layer+- +erroe+control&hl=en&gl=in&pid=bl&srcid=ADGEEShXOPBrrzZXuk9J4MVuSzC UNdgifCxHo6B7UQHf_g49Cl6wsZ2gdb0dO- MsM0hcZzEE62PlsGcupxyd5Mh7676xNqU7MxtrutxhVWykBIypsiEu9Q1E1BZ87x 8Kup4M5pyJkV-F&sig=AHIEtbQIRNWpmfHTwyXPybAvYx5rs3G7YA ๏ƒผ http://docs.google.com/viewer? a=v&q=cache:li73YI_zh7EJ:eeweb.poly.edu/el536/datalink_control.pdf+data+link+la yer+- +error+control&hl=en&gl=in&pid=bl&srcid=ADGEESglDES4xEYhroZ5oQpGK5A _dK7xynEbzeK23jLHPHyZj7W1KkOe_2ef_zUDjgG6v12ovMiaazeR9y9tikfCvRoE 24 | P a g e