SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesDhrumil Panchal
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of NetworkingMukesh Tekwani
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram ProtocolPeter R. Egli
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networkingHarshita Yadav
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udprahul kundu
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Computer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionComputer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionSaikrishna Tanguturu
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocaltes31
 
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
 

Tendances (20)

IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
IEEE 802.11
IEEE 802.11IEEE 802.11
IEEE 802.11
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of Networking
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networking
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
X.25 protocol
X.25 protocolX.25 protocol
X.25 protocol
 
Check sum
Check sumCheck sum
Check sum
 
Computer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionComputer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error Correction
 
TCP/IP Introduction
TCP/IP IntroductionTCP/IP Introduction
TCP/IP Introduction
 
Multiple Access Protocal
Multiple Access ProtocalMultiple Access Protocal
Multiple Access Protocal
 
Osi model
Osi modelOsi model
Osi model
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
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
 
Osi model 7 Layers
Osi model 7 LayersOsi model 7 Layers
Osi model 7 Layers
 

En vedette

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
 
Sliding window protocol
Sliding window protocolSliding window protocol
Sliding window protocolRishu Seth
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correctionSiddique Ibrahim
 

En vedette (10)

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
 
Stop-and-Wait ARQ Protocol
Stop-and-Wait ARQ ProtocolStop-and-Wait ARQ Protocol
Stop-and-Wait ARQ Protocol
 

Similaire à 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
 
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
 
datalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxdatalinklayermukesh-150130061041-conversion-gate01.pptx
datalinklayermukesh-150130061041-conversion-gate01.pptxlathass5
 
Data link layer
Data link layerData link layer
Data link layersbkbca
 
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
 

Similaire à 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
 
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
 
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
 
Data link layer
Data link layerData link layer
Data link layer
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
 
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
 

Plus de Alisha Korpal

Plus de 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
 

Dernier

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Dernier (20)

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

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