SlideShare uma empresa Scribd logo
1 de 124
Guided By                               Presented By
Mr. A. K. Khan                            Deepak Gupta (31320025)
Assistant Professor                       Ankur Adhyapak(31320032)
Dept. of Information Technology           Medini Brahma(31320016)
Assam University , Silchar                Suraj Prakash Maurya(31320020)
 2013-4-6                www.i-world-tech.blogspot.in                1
1. Introduction
2. Error Control
3. Physical Address
4. Multiple Access
5. Framing
6. Flow Control
7. Summary
8. Bibliography
9. Website Visited


2013-4-6              www.i-world-tech.blogspot.in   2
 Data Link Layer is the Second Layer in the OSI Model.
 Data Link Layer Receives The Service From Physical Layer and
  gives Service to the Network Layer.
 It makes the physical layer appears error-free to the upper
  layer (Network Layer).
 The data Link Layer is responsible for the Moving frames from
  one hop (node) to the next.


2013-4-6                www.i-world-tech.blogspot.in          3
2013-4-6   www.i-world-tech.blogspot.in   4
2013-4-6   www.i-world-tech.blogspot.in   5
1. Single-bit error




2013-4-6              www.i-world-tech.blogspot.in   6
2. Multiple-bit error



3. Burst Error


2013-4-6          www.i-world-tech.blogspot.in   7
 Errors Caused by Signal Attenuation , Noise.
 Receiver Detects Presence of Errors.
 Possible Actions
       Signal Sender For Re-Transmission.
       Drops Frame.
       Correct bit Errors if Possible and Continue.

2013-4-6                www.i-world-tech.blogspot.in   8
DDee
 Errors Detection uses The Concept of redundancy, which
 Means adding Extra bits at The End of Each Unit of data.




2013-4-6             www.i-world-tech.blogspot.in      9
Three Types of Redundancy Check are Common :
 1. Parity Check
        (A). Simple Parity Check
        (B). Two Dimensional Parity Check
 2. Cyclic Redundancy Check (CRC)
 3. Check Sum.




2013-4-6           www.i-world-tech.blogspot.in   10
 In This Technique , a Redundant bit, Called a Parity bit is
  Added To The Every data Unit so That The Total Number of 1s
  (including The Parity bit) in The Unit becomes Even (or Odd).




2013-4-6                 www.i-world-tech.blogspot.in             11
 Ex :
    The data Unit 100100 becomes 110110
Then in both data Unit Number of 1 is even.
So we can conclude ,

1. simple parity check can detect All single bit errors.

2. It Can detect burst errors only if the total number of
   errors in each data unit is odd.
2013-4-6              www.i-world-tech.blogspot.in         12
 In This Method, First We Calculate The Parity bit For Each
     Data Unit.
     Ex : As in Figure We have Four Data Unit. Then We Calculate
     The Parity bit For Each Column.




2013-4-6                   www.i-world-tech.blogspot.in             13
The Sender Send

           11001111 10111011 01110010 01010011 01010101

  Suppose The Receiver Receive

           11111111 10110111 01110010 01010011 01010101

  Lets Check The Parity bits

           11111111 10110111 01110010 01010011 01101001
2013-4-6                  www.i-world-tech.blogspot.in    14
But If--->
Sender Send
         11001111 10111011 01110010 01010011 01010101
Suppose The Receiver Receive
         01001101 00111001 01110010 01010011 01010101
Lets Check The Parity bits
          01001101 00111001 01110010 01010011 01010101

So, if 2 bits in One Data Unit Damaged and 2 bits in Exactly The Same
Positions in Another data Unit are Also Damaged, The Checker Will
Not Detect an Error.
 2013-4-6                  www.i-world-tech.blogspot.in           15
 The Third and Most Powerful Technique of Error Detection is
  Cyclic Redundancy Check (CRC). It based on Binary Division.




2013-4-6                www.i-world-tech.blogspot.in            16
 The Divisor of Size n is Predefined and Agreed Upon The both
    Sender and Receiver.
    Then , The Size of Redundant bits Should be n-1.

Ex : Sender




    2013-4-6                www.i-world-tech.blogspot.in             17
Receiver




  2013-4-6   www.i-world-tech.blogspot.in   18
 The Last Error Detection Method , We Discuss here is Called
The Checksum.

The checksum is Used in The Internet by Several Protocols
Although not at The Data Link Layer.

Like The Others it is Also based on Redundancy.

 Traditionally, The Internet has been Using a 16-bit Checksum.

2013-4-6                www.i-world-tech.blogspot.in              19
The Sender Calculates The Checksum by Following These Steps….

Sender Side :
1. The message is divided into 16-bit words.
2. The value of the checksum word is set to 0.
3. All words including the checksum are added using
   One’s Complement addition.
4. The Sum is Complemented and becomes The Checksum.
5. The Checksum is Sent With The Data.

2013-4-6                www.i-world-tech.blogspot.in        20
The Receiver Uses The Following Steps For Error Detection.


 Receiver site
 1. The Message (including Checksum) is Divided into
    16-bit Words.
 2. All Words are Added Using One’s Complement Addition.
 3. The Sum is Complemented and becomes The New
    Checksum.
 4. If The Value of Checksum is 0, The Message is
    Accepted ; Otherwise, it is Rejected.
2013-4-6                 www.i-world-tech.blogspot.in         21
Ex : here We Use 4 bit Checksum.
  Suppose We have To Send The Set of Data (7, 11, 12, 0, 6)




2013-4-6                 www.i-world-tech.blogspot.in         22
 Two methods
      1. Error correction by Retransmission
      2. Forward error correction (FEC)




2013-4-6                 www.i-world-tech.blogspot.in   23
 It Allows The Receiver To inform The Sender of Any Frame Lost
or Damaged in Transmission.

 Coordinates The Re-Transmission of Those Frames by The
Sender. This Process is Called Automatic Repeat Request (ARQ).

For This We Use Three Common Flow Control Mechanisms :
           1. Stop-and-Wait ARQ
           2. Go-back-N ARQ
           3. Selective-Repeat ARQ
2013-4-6                www.i-world-tech.blogspot.in             24
 Receiver Can Use an Error Correcting Code , Which Automatically
Correct Certain Errors.

Hamming Code :
 Single bit Error
 Burst bit Error

 Hamming Code is Mainly Used To Solve Single bit Error.
 We Can Solve Burst bit Error Using The Concept of Single
  bit Error.
2013-4-6                 www.i-world-tech.blogspot.in         25
Single bit Error

 Receiver Reads a 1 bit as a 0 or 0 bit as a 1.

 To Correct This Error, The Receiver Simply Reverses The Value
  of The Altered bit. To do so We Must Know Which bit is in error.

 To Calculate The Number of Redundant bit r To Correct an data
  bit of Length m we Must Know The Relationship between r and
  m.
     So, if Data bit is m and Redundant bit is r, Then
          We have To Satisfy The Relation
                                                         2^r >= m+r+1
2013-4-6                  www.i-world-tech.blogspot.in                  26
Ex : If The Value of m is 7, The Relation will Satisfy if The Minimum
Value of r is 4.   2^4 = 16 > 7+4+1




2013-4-6                  www.i-world-tech.blogspot.in            27
If The Number of Data bit is 7, Then The Position of Redundant
 bits Are :
               2^0=1 2^1=2
               2^2=4 2^3=8




2013-4-6                 www.i-world-tech.blogspot.in             28
2013-4-6   www.i-world-tech.blogspot.in   29
2013-4-6   www.i-world-tech.blogspot.in   30
Let Receiver receives 10010100101




2013-4-6               www.i-world-tech.blogspot.in   31
Burst Error Correction

    Hamming Code Cannot Correct a burst Error Directly.
    it is Possible To Rearrange The Data and Then Apply The code.
    Instead of Sending All the bits in The data Unit Together, we can organize
   N units in a column.
    Send The First bits of Each Followed by The Second bit of each, and so
   on.
    In This Way, if a burst Error of M bit Occurs (M<N), Then The Error does
   not Corrupt M bit of Single Unit, it Corrupt Only 1 bit of Unit.
    Then We Can Correct it Using Hamming Code Scheme.

2013-4-6                       www.i-world-tech.blogspot.in                   32
2013-4-6   www.i-world-tech.blogspot.in   33
2013-4-6   www.i-world-tech.blogspot.in   34
Four Levels of Addressing




             Physical          Logical             Port               Specific
            Addresses         Addresses          Addresses           Addresses



      Data Link Layer     Network layer            Transport Layer      Application Layer


2013-4-6                         www.i-world-tech.blogspot.in                               35
 Physical Address is Also Known As Link Address.

  It is the Address of a node as defined by its LAN or WAN.

  It is Included in The Frame used by the Data Link Layer.

  It is The Lowest Level Address.

 The Size and Format of These Address vary , depending
  on The Network.
2013-4-6                 www.i-world-tech.blogspot.in          36
 Ethernet uses a 6-byte (48 bits) Physical Address That is
 Imprinted on The Network Interface card (NIC) .

 Ex :
 Most LAN Use a 48-bit (6 byte) Physical Address Written as 12
 hexadecimal digits , Every byte (2 hexadecimal digits) is
 Separated by a Colon , As Shown below..
                  07:01:02:01:2C:4B
           A 6 byte (12 hexadecimal digits ) Physical Address.
2013-4-6                    www.i-world-tech.blogspot.in         37
2013-4-6   www.i-world-tech.blogspot.in   38
2013-4-6   www.i-world-tech.blogspot.in   39
 When nodes or stations are connected and use a common link , called a
multipoint or broadcast link , we need a multiple-access protocol to coordinate
access to the link.
             TAXANOMY OF MULTIPLE-ACCESS PROTOCOLS




2013-4-6                      www.i-world-tech.blogspot.in                  40
In random access or contention method , no station is superior to another
station and none is assigned the control over another.
At each instance a station that has a data to send uses a procedure
defined by the protocol to make a decision on whether or not to send . The
decision depends on the state of the medium (idle or busy ).

Two features give this method its name:

 there is no scheduled time for a station to transmit (i.e random access)
No rules specify which station should travel next(i.e called contention
method)

2013-4-6                      www.i-world-tech.blogspot.in                   41
 Earliest random access protocol developed in early
1970.
 It was designed for radio wireless Lan.
The medium was shared between stations .
When a station sends the data , another
station may do at the same time .
The data from the two stations collide and become
garbled.
 2013-4-6            www.i-world-tech.blogspot.in      42
 The   original ALOHA protocol is called pure ALOHA .
 Each stations sends a frame when ever it has a frame to send .
 Since there is only one channel to share , the is a possibility of
collisions between frames from different stations .
FRAMES IN Pure ALOHA NETWORK




 2013-4-6                  www.i-world-tech.blogspot.in                43
Procedure for pure aloha protocol




 2013-4-6                www.i-world-tech.blogspot.in   44
VULNERABLE TIME : is the time in which there is a possibility of
collision.
    fig:- Vulnerable time in pure ALOHA protocol




 2013-4-6                        www.i-world-tech.blogspot.in      45
THROUGHTPUT :- is the average number of successful
 transmission.
 o FOR pure ALOHA
                     S=G*e-2G
  where G is the average number of frames generated by the
 system .



2013-4-6                www.i-world-tech.blogspot.in         46
 In slotted ALOHA we divide the time into slots of Tfr s and
force the stations to send only one at the beginning of the time slot.




2013-4-6                  www.i-world-tech.blogspot.in            47
VULNERABLE TIME :- is now reduced to one half i.e T fr
  Fig :- Vulnerable time for slotted ALOHA protocol .




2013-4-6                       www.i-world-tech.blogspot.in   48
Throughput :- the average number of successful transmission
    for slotted ALOHA is

                     S=G*e-G
      The maximum number throughput Smax =0.368 when G=1.




2013-4-6                 www.i-world-tech.blogspot.in             49
CSMA requires that each station first lisens to the medium
before sending .
The possibility of collision still exist because of propagation delay
; when a station sends a frame, it still takes time for the first bit to
reach every station and for every station to sense it.




2013-4-6                   www.i-world-tech.blogspot.in              50
Vulnerable time :- for CSMA is the propagation time Tp .




2013-4-6                  www.i-world-tech.blogspot.in        51
Persistence methods :- tells what a station should do if
  the channel is idle .

  3 types of persistence methods
   1-persistent
   non persistent
  p-persistent


2013-4-6               www.i-world-tech.blogspot.in      52
2013-4-6   www.i-world-tech.blogspot.in   53
CSMA/CD augments the algorithm to handle the collision .Here a station
monitors the medium after it sends a frame to see if the transmission was
successful . If so the station is finished . If however there is a collision , the frame
is send again .




 2013-4-6                         www.i-world-tech.blogspot.in                       54
Flow diagram




2013-4-6       www.i-world-tech.blogspot.in   55
In wired network the received signal has almost the same energy as the sent
signal because the length of the cable is short or there are repeaters that amplify
the energy between the sende and the receiver . This means that in a collision
, the detected energy almost doubles .
Collisions are avoided through the use of CSMA/CA’s three strategies :-
The interframe space (IFS)
The contention window
acknowwledgements




2013-4-6                      www.i-world-tech.blogspot.in                    56
FLOW DIAGRAM




 2013-4-6      www.i-world-tech.blogspot.in   57
 In controlled access , the stations consult one another to find
which station has the right to send .

 3 popular controlled access methods are :
      1. reservation
      2. Polling
      3. Token passing




2013-4-6                  www.i-world-tech.blogspot.in              58
 In reservation method , a station needs to make a reservation before sending
the data .In each interval , a reservation frame precedes the data frame in that
interval.
 If there are N stations in the system , the are exactly N reservation minis lots
in the reservation frame . Each minis lot belong to a station . When a station
needs to send a data frame , it makes a reservation in its own minis lot.




 2013-4-6                       www.i-world-tech.blogspot.in                    59
Polling works with topologies in which one device is
 designated as a primary station and the other devices are
 secondary stations.

 All data exchanges must be made through the primary device
 even when the ultimate destination is a secondary device.

  The primary device controls the link.

  The secondary devices follow its instructions.

2013-4-6                 www.i-world-tech.blogspot.in        60
Select Function

     The select function is used whenever the primary device has something to
     send.
      Remember that the primary controls the link. If the primary is neither sending
     nor receiving data, it knows the link is available.


   Poll Function
    The poll function is used by the primary device to solicit transmissions from the
    secondary devices.
     When the primary is ready to receive data, it must ask (poll) each
    device in turn if it has anything to send.
2013-4-6                          www.i-world-tech.blogspot.in                           61
2013-4-6   www.i-world-tech.blogspot.in   62
Logical Ring:
  In a token-passing network, stations do not have to be
 physically connected in a ring. the ring can be a logical one.




2013-4-6                  www.i-world-tech.blogspot.in            63
In the token-passing method, the stations in a network are
organized in a logical ring.
 In other words, for each station, there is a predecessor and a
successor.
 The predecessor is the station which is logically before the
station in the ring;
 the successor is the station which is after the station in the
ring.


2013-4-6                  www.i-world-tech.blogspot.in             64
2013-4-6   www.i-world-tech.blogspot.in   65
 The transmitted bit stream by the physical layer is not
    guaranteed to be error free.
    It is up to the data-link layer to detect, and if necessary, to
    correct errors.
    The data-link layer breaks the bit stream up into discrete
    frames and compute the checksum for each frame.
    When a frame arrives at the destination, the checksum is
    recomputed.



2013-4-6                    www.i-world-tech.blogspot.in               66
Frames Are The Small data Units Created By Data Link
    Layer And The Process Of Creating Frames By The Data
    Link Layer Is Known As Framing.

    The easiest way to achieve framing is to insert time gaps
    between frames.

     Networks rarely make any guarantees about timing.


2013-4-6                  www.i-world-tech.blogspot.in           67
1. Character Count.
    2. Starting & Ending Characters With Character Stuffing.
    3. Starting & ending Flags With Bit Stuffing.
    4. Physical Layer Coding Violation.




2013-4-6                  www.i-world-tech.blogspot.in         68
 This Method Specifies The Number Of Characters That Are
  Present In particular Frame.
   This Information Is specified By using a Special Field In the
  Header Frame.
   The problem with Character count algorithm is that the
  count can be distorted by a transmission error.




2013-4-6                  www.i-world-tech.blogspot.in              69
 In this Method Frame Starts & End With a special Character
That Mark The Beginning & End Of Frame.
 Each character Begins With the ASCII Character Sequence DLE
STX (data link Escape Start Of Text ) And End With ASCII Character
Sequence DLE ETX (data link escape End Of text)




2013-4-6                 www.i-world-tech.blogspot.in            70
2013-4-6   www.i-world-tech.blogspot.in   71
 In this Method , Each Begins & Ends With a Special Bit pattern
 01111110 Called Flags.
  There for Each frame starts With 01111110& also Ends with
 01111110.
  The Main Problem arises in this Method When The Flag byte
 01111110 Appear as data.
  This Problem Is Handled By technique called Bit stuffing That
 Is similar To character stuffing.

2013-4-6                 www.i-world-tech.blogspot.in              72
2013-4-6   www.i-world-tech.blogspot.in   73
 This Framing Method Is Used only In those network In which
Encoding On The Physical Medium Contain some Redundancy.
 Some LANs Encode Each Bit Of Data By using two Physical Bit
i.e. Manchester coding is Used.
 In this method Bit 1 Is encoded into high-low(10) Pair And Bit 0
Is Encoded Into low-high(01)pair shown in figure.




2013-4-6                  www.i-world-tech.blogspot.in           74
TDMA – Time Division Multiple Access
      FDMA – Frequency Division Multiple Access
      CDMA – Code Division Multiple Access




2013-4-6                  www.i-world-tech.blogspot.in   75
FDMA - Large room divided up into small rooms. Each pair of
people takes turns speaking.

TDMA – Large room divided up into small rooms. Three pairs of
people per room, however, each pair gets 20 seconds to speak.

CDMA – No small rooms. Everyone is speaking in different
languages. If voice volume is minimized, the number of people
is maximized.


2013-4-6                www.i-world-tech.blogspot.in            76
Efficiency of TDMA frame:




2013-4-6            www.i-world-tech.blogspot.in   77
 Flexible bit rate
 No frequency guard band required
 No need for precise narrowband filters
 Easy for mobile or base stations to initiate and execute hands
  off
 Extended battery life
 TDMA installations offer savings in base station
  equipment, space and maintenance
 The most cost-effective technology for upgrading a current
  analog system to digital


2013-4-6                www.i-world-tech.blogspot.in           78
Requires network-wide timing synchronization
   Requires signal processing fro matched filtering and
  correlation detection
   Demands high peak power on uplink in transient mode
   Multipath distortion




2013-4-6                www.i-world-tech.blogspot.in       79
Number of FDMA Channels




In the U.S. each cellular carrier is allocated 416 channels where:




2013-4-6                  www.i-world-tech.blogspot.in               80
 If channel is not in use, it sits idle
  Channel bandwidth is relatively narrow (30kHz)
  Simple algorithmically, and from a hardware standpoint
  Fairly efficient when the number of stations is small and
   the traffic is uniformly constant
  Capacity increase can be obtained by reducing the
   information bit rate and using efficient digital code
  No need for network timing
  No restriction regarding the type of baseband or type of
   modulation

2013-4-6                www.i-world-tech.blogspot.in           81
 The presence of guard bands
  Requires right RF filtering to minimize adjacent channel
   interference
  Maximum bit rate per channel is fixed
  Small inhibiting flexibility in bit rate capability
  Does not differ significantly from analog system



2013-4-6                 www.i-world-tech.blogspot.in         82
Spread Spectrum Multiple Access Technologies




2013-4-6               www.i-world-tech.blogspot.in   83
Many users of CDMA use the same frequency, TDD or FDD may
 be used
  Multipath fading may be substantially reduced because of
 large signal bandwidth
  No absolute limit on the number of users
  Easy addition of more users
  Impossible for hackers to decipher the code sent
  Better signal quality
  No sense of handoff when changing cells


2013-4-6              www.i-world-tech.blogspot.in       84
As the number of users increases, the overall quality of
       service decreases
        Self-jamming
        Near- Far- problem arises




2013-4-6                   www.i-world-tech.blogspot.in            85
2013-4-6   www.i-world-tech.blogspot.in   86
 Flow control refers to a set of procedures (protocols)
    used to restrict the amount of data that the sender can
    send before waiting for acknowledgment.

     It is one of the most important duties of the data
    link layer.



2013-4-6               www.i-world-tech.blogspot.in        87
 Now let us see how the data link layer can combine
framing, flow control, and error control by using protocols to
achieve the delivery of data from one node to another.
 We divide the discussion of protocols as follows -




2013-4-6                  www.i-world-tech.blogspot.in           88
All the protocols we discuss are unidirectional.

   Although special frames, called acknowledgment (ACK)
  and negative acknowledgment(NAK) can flow in the opposite
  direction for flow and error control purposes, data flow in only
  one direction.




2013-4-6                  www.i-world-tech.blogspot.in               89
 An ideal channel in which no frames are
     lost, duplicated, or corrupted.

     We introduce two protocols for this type of channel.
           1. Simplest Protocol
           2. Stop-and-wait




2013-4-6                  www.i-world-tech.blogspot.in       90
 We assume that the receiver can immediately handle any
    frame it receives with a processing time that is small
    enough to be negligible.

     The data link layer of the receiver immediately removes
    the header from the frame and hands the data packet to its
    network layer, which can also accept the packet
    immediately.


2013-4-6                  www.i-world-tech.blogspot.in           91
Sender-site algorithm




2013-4-6                 www.i-world-tech.blogspot.in   92
Receiver-site algorithm




2013-4-6                    www.i-world-tech.blogspot.in   93
The sender sends one frame, stops until it receives confirmation
from the receiver (okay to go ahead), and then sends the next frame.




 2013-4-6                 www.i-world-tech.blogspot.in           94
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   95
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   96
Receiver-site algorithm




2013-4-6                  www.i-world-tech.blogspot.in   97
 Although the Stop-and-Wait Protocol gives us an idea of
   how to add flow control to its predecessor, noiseless channels
   are nonexistent.

   We discuss three protocols in this section that use error
   control.
           1. Stop-and-Wait Automatic Repeat Request
           2. Go-Back-N Automatic Repeat Request
           3. Selective Repeat Automatic Repeat Request

2013-4-6                   www.i-world-tech.blogspot.in             98
 Adds a simple error control mechanism to the Stop-and-Wait
  Protocol.

 When the frame arrives at the receiver site, it is checked and if
  it is corrupted, it is silently discarded. The detection of errors
  in this protocol is manifested by the silence of the receiver.

 The corrupted and lost frames need to be resent in this
  protocol.

2013-4-6                  www.i-world-tech.blogspot.in             99
 To identify a frame we number the frames.

  Error correction in Stop-and-Wait ARQ is done by
 keeping a copy of the sent frame and retransmitting of the
 frame when the timer expires.

  The ACK frame for this protocol has a sequence number
 field.



2013-4-6                 www.i-world-tech.blogspot.in         100
 Sequence number
In Stop-and-Wait ARQ, we use sequence numbers to number the
frames. The sequence numbers are based on modulo-2 arithmetic.

 Acknowledgement number
In Stop-and-Wait ARQ, the acknowledgment number always
announces in modulo-2 arithmetic the sequence number of the next
frame expected.


 2013-4-6                www.i-world-tech.blogspot.in         101
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   102
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   103
Receiver-site algorithm




2013-4-6                  www.i-world-tech.blogspot.in   104
2013-4-6   www.i-world-tech.blogspot.in   105
 In this protocol we can send several frames before receiving
  acknowledgments; we keep a copy of these frames until the
  acknowledgments arrive.

  Sequence number
   In the Go-Back-N Protocol, the sequence numbers are
  modulo 2 raise to the power m, where m is the size of the
  sequence number field in bits.


2013-4-6                 www.i-world-tech.blogspot.in              106
Sliding Window
In this protocol, the sliding window is an abstract concept that defines the range
of sequence numbers that is the concern of the sender and receiver.
The range which is the concern of the sender is called the send sliding window;
the range that is the concern of the receiver is called the receive sliding window.




2013-4-6                       www.i-world-tech.blogspot.in                   107
Sliding Window
The send window is an abstract concept defining an imaginary box of size 2m-
1 with three variables: Sf, Sn and Ssize.
The send window can slide one or more slots when a valid acknowledgment
arrives.




2013-4-6                     www.i-world-tech.blogspot.in                 108
Sliding Window
 The receive window is an abstract concept defining an imaginary box of size
 1 with one single variable Rn• The window slides when a correct frame has
 arrived; sliding occurs one slot at a time.




2013-4-6                      www.i-world-tech.blogspot.in                 109
Send Window Size
For m=2




2013-4-6           www.i-world-tech.blogspot.in   110
Sender-site algorithm




 2013-4-6               www.i-world-tech.blogspot.in   111
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   112
Sender-site algorithm




2013-4-6                www.i-world-tech.blogspot.in   113
 This protocol does not resend N frames when just one frame is damaged.
    It is more efficient for noisy links, but the processing at the receiver is
   more complex.
   Windows
    The send window maximum size can be 2 raise to the power (m-1)




2013-4-6                       www.i-world-tech.blogspot.in                   114
 The size of the receive window is the same as the size of the send
   window (2m- I ).
    The Selective Repeat Protocol allows as many frames as the size of the
   receive window to arrive out of order and be kept until there is a set of in-
   order frames to be delivered to the network layer.




2013-4-6                        www.i-world-tech.blogspot.in                       115
Window Sizes
 For m=2




2013-4-6        www.i-world-tech.blogspot.in   116
Sender-site algorithm




2013-4-6                 www.i-world-tech.blogspot.in   117
Sender-site algorithm




2013-4-6                 www.i-world-tech.blogspot.in   118
Receiver-site algorithm




2013-4-6                     www.i-world-tech.blogspot.in   119
Receiver-site algorithm




 2013-4-6                 www.i-world-tech.blogspot.in   120
Data Link Layer makes the physical layer appears error-free to the
upper layer (Network Layer).
 The data Link Layer is responsible for the Moving frames from
one hop (node) to the next.
 The data Link Layer adds reliability to the physical layer by
adding mechanisms to detect and retransmit or lost frames.
 it also uses a mechanism to recognize duplicate frames.
 Ethernet uses a 6-byte (48 bits) Physical Address That is
Imprinted on The Network Interface card (NIC) .

2013-4-6                 www.i-world-tech.blogspot.in          121
When nodes or stations are connected and use a common link
, called a multipoint or broadcast link , we need a multiple-access
protocol to coordinate access to the link.
 The data-link layer breaks the bit stream up into discrete frames
and compute the checksum for each frame.
 Flow control refers to a set of procedures (protocols) used to
restrict the amount of data that the sender can send before waiting
for acknowledgment.
 Although the Stop-and-Wait Protocol gives us an idea of how to
add flow control to its predecessor, noiseless channels are
nonexistent.
 2013-4-6                 www.i-world-tech.blogspot.in           122
Data Communication and Networking Fourth Edition
       Behrouz A. Forouzan and Sophia Chung Fegan
   Computer Network 4th Edition
       By Tanenbaum

  www.wikipedia.com

   www.google.com

2013-4-6             www.i-world-tech.blogspot.in   123
Thank You



2013-4-6    www.i-world-tech.blogspot.in   124

Mais conteúdo relacionado

Mais procurados

Digital & analog transmission
Digital & analog transmissionDigital & analog transmission
Digital & analog transmissionJeffery Vava
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correctionSiddique Ibrahim
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols BE Smârt
 
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
 
Information Theory and Coding
Information Theory and CodingInformation Theory and Coding
Information Theory and CodingVIT-AP University
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical ClocksDilum Bandara
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codesRevathi Subramaniam
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Imesha Perera
 
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
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layerPREMAL GAJJAR
 
Data link layer
Data link layerData link layer
Data link layerst2112
 

Mais procurados (20)

Convolution Codes
Convolution CodesConvolution Codes
Convolution Codes
 
Digital & analog transmission
Digital & analog transmissionDigital & analog transmission
Digital & analog transmission
 
Mobile computing (Wireless) Medium Access Control (MAC)
Mobile computing (Wireless) Medium Access Control (MAC)Mobile computing (Wireless) Medium Access Control (MAC)
Mobile computing (Wireless) Medium Access Control (MAC)
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
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
 
Information Theory and Coding
Information Theory and CodingInformation Theory and Coding
Information Theory and Coding
 
Physical and Logical Clocks
Physical and Logical ClocksPhysical and Logical Clocks
Physical and Logical Clocks
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
 
Error correction, ARQ, FEC
Error correction, ARQ, FECError correction, ARQ, FEC
Error correction, ARQ, FEC
 
Point to-point protocol (ppp)
Point to-point protocol (ppp)Point to-point protocol (ppp)
Point to-point protocol (ppp)
 
Data link layer
Data link layerData link layer
Data link layer
 
Error control
Error controlError control
Error control
 
Micro program example
Micro program exampleMicro program example
Micro program example
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)
 
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
 
Framming data link layer
Framming data link layerFramming data link layer
Framming data link layer
 
4. block coding
4. block coding 4. block coding
4. block coding
 
Data link layer
Data link layerData link layer
Data link layer
 

Semelhante a Data link layer

datalinklayer-130407001728-phpapp01.pdf sa
datalinklayer-130407001728-phpapp01.pdf sadatalinklayer-130407001728-phpapp01.pdf sa
datalinklayer-130407001728-phpapp01.pdf saDhruvilSTATUS
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer ProtocolsZahouAmel1
 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module IIAjit Nayak
 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail descriptionBathshebaparimala
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3SakthiVinoth78
 
III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxShantanuDharekar
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...TELKOMNIKA JOURNAL
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection thShardaSalunkhe1
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)Karam Munir Butt
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 
data link layer to print
data link layer to printdata link layer to print
data link layer to printBishalWosti1
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05shrinivasgnaik
 
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer NetworksIRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer NetworksIRJET Journal
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layerShashank HP
 

Semelhante a Data link layer (20)

datalinklayer-130407001728-phpapp01.pdf sa
datalinklayer-130407001728-phpapp01.pdf sadatalinklayer-130407001728-phpapp01.pdf sa
datalinklayer-130407001728-phpapp01.pdf sa
 
Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module II
 
Osi model detail description
Osi model  detail descriptionOsi model  detail description
Osi model detail description
 
Data link layer tutorial
Data link layer tutorialData link layer tutorial
Data link layer tutorial
 
data link layer - Chapter 3
data link layer - Chapter 3data link layer - Chapter 3
data link layer - Chapter 3
 
III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptx
 
Data link layer
Data link layerData link layer
Data link layer
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection th
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
data link layer to print
data link layer to printdata link layer to print
data link layer to print
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05
 
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer NetworksIRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
Data link layer
Data link layerData link layer
Data link layer
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
OSI MODELS.pptx
OSI  MODELS.pptxOSI  MODELS.pptx
OSI MODELS.pptx
 

Último

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Último (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Data link layer

  • 1. Guided By Presented By Mr. A. K. Khan Deepak Gupta (31320025) Assistant Professor Ankur Adhyapak(31320032) Dept. of Information Technology Medini Brahma(31320016) Assam University , Silchar Suraj Prakash Maurya(31320020) 2013-4-6 www.i-world-tech.blogspot.in 1
  • 2. 1. Introduction 2. Error Control 3. Physical Address 4. Multiple Access 5. Framing 6. Flow Control 7. Summary 8. Bibliography 9. Website Visited 2013-4-6 www.i-world-tech.blogspot.in 2
  • 3.  Data Link Layer is the Second Layer in the OSI Model.  Data Link Layer Receives The Service From Physical Layer and gives Service to the Network Layer.  It makes the physical layer appears error-free to the upper layer (Network Layer).  The data Link Layer is responsible for the Moving frames from one hop (node) to the next. 2013-4-6 www.i-world-tech.blogspot.in 3
  • 4. 2013-4-6 www.i-world-tech.blogspot.in 4
  • 5. 2013-4-6 www.i-world-tech.blogspot.in 5
  • 6. 1. Single-bit error 2013-4-6 www.i-world-tech.blogspot.in 6
  • 7. 2. Multiple-bit error 3. Burst Error 2013-4-6 www.i-world-tech.blogspot.in 7
  • 8.  Errors Caused by Signal Attenuation , Noise.  Receiver Detects Presence of Errors.  Possible Actions  Signal Sender For Re-Transmission.  Drops Frame.  Correct bit Errors if Possible and Continue. 2013-4-6 www.i-world-tech.blogspot.in 8
  • 9. DDee Errors Detection uses The Concept of redundancy, which Means adding Extra bits at The End of Each Unit of data. 2013-4-6 www.i-world-tech.blogspot.in 9
  • 10. Three Types of Redundancy Check are Common : 1. Parity Check (A). Simple Parity Check (B). Two Dimensional Parity Check 2. Cyclic Redundancy Check (CRC) 3. Check Sum. 2013-4-6 www.i-world-tech.blogspot.in 10
  • 11.  In This Technique , a Redundant bit, Called a Parity bit is Added To The Every data Unit so That The Total Number of 1s (including The Parity bit) in The Unit becomes Even (or Odd). 2013-4-6 www.i-world-tech.blogspot.in 11
  • 12.  Ex : The data Unit 100100 becomes 110110 Then in both data Unit Number of 1 is even. So we can conclude , 1. simple parity check can detect All single bit errors. 2. It Can detect burst errors only if the total number of errors in each data unit is odd. 2013-4-6 www.i-world-tech.blogspot.in 12
  • 13.  In This Method, First We Calculate The Parity bit For Each Data Unit. Ex : As in Figure We have Four Data Unit. Then We Calculate The Parity bit For Each Column. 2013-4-6 www.i-world-tech.blogspot.in 13
  • 14. The Sender Send 11001111 10111011 01110010 01010011 01010101 Suppose The Receiver Receive 11111111 10110111 01110010 01010011 01010101 Lets Check The Parity bits 11111111 10110111 01110010 01010011 01101001 2013-4-6 www.i-world-tech.blogspot.in 14
  • 15. But If---> Sender Send 11001111 10111011 01110010 01010011 01010101 Suppose The Receiver Receive 01001101 00111001 01110010 01010011 01010101 Lets Check The Parity bits 01001101 00111001 01110010 01010011 01010101 So, if 2 bits in One Data Unit Damaged and 2 bits in Exactly The Same Positions in Another data Unit are Also Damaged, The Checker Will Not Detect an Error. 2013-4-6 www.i-world-tech.blogspot.in 15
  • 16.  The Third and Most Powerful Technique of Error Detection is Cyclic Redundancy Check (CRC). It based on Binary Division. 2013-4-6 www.i-world-tech.blogspot.in 16
  • 17.  The Divisor of Size n is Predefined and Agreed Upon The both Sender and Receiver. Then , The Size of Redundant bits Should be n-1. Ex : Sender 2013-4-6 www.i-world-tech.blogspot.in 17
  • 18. Receiver 2013-4-6 www.i-world-tech.blogspot.in 18
  • 19.  The Last Error Detection Method , We Discuss here is Called The Checksum. The checksum is Used in The Internet by Several Protocols Although not at The Data Link Layer. Like The Others it is Also based on Redundancy.  Traditionally, The Internet has been Using a 16-bit Checksum. 2013-4-6 www.i-world-tech.blogspot.in 19
  • 20. The Sender Calculates The Checksum by Following These Steps…. Sender Side : 1. The message is divided into 16-bit words. 2. The value of the checksum word is set to 0. 3. All words including the checksum are added using One’s Complement addition. 4. The Sum is Complemented and becomes The Checksum. 5. The Checksum is Sent With The Data. 2013-4-6 www.i-world-tech.blogspot.in 20
  • 21. The Receiver Uses The Following Steps For Error Detection. Receiver site 1. The Message (including Checksum) is Divided into 16-bit Words. 2. All Words are Added Using One’s Complement Addition. 3. The Sum is Complemented and becomes The New Checksum. 4. If The Value of Checksum is 0, The Message is Accepted ; Otherwise, it is Rejected. 2013-4-6 www.i-world-tech.blogspot.in 21
  • 22. Ex : here We Use 4 bit Checksum. Suppose We have To Send The Set of Data (7, 11, 12, 0, 6) 2013-4-6 www.i-world-tech.blogspot.in 22
  • 23.  Two methods 1. Error correction by Retransmission 2. Forward error correction (FEC) 2013-4-6 www.i-world-tech.blogspot.in 23
  • 24.  It Allows The Receiver To inform The Sender of Any Frame Lost or Damaged in Transmission.  Coordinates The Re-Transmission of Those Frames by The Sender. This Process is Called Automatic Repeat Request (ARQ). For This We Use Three Common Flow Control Mechanisms : 1. Stop-and-Wait ARQ 2. Go-back-N ARQ 3. Selective-Repeat ARQ 2013-4-6 www.i-world-tech.blogspot.in 24
  • 25.  Receiver Can Use an Error Correcting Code , Which Automatically Correct Certain Errors. Hamming Code :  Single bit Error  Burst bit Error  Hamming Code is Mainly Used To Solve Single bit Error.  We Can Solve Burst bit Error Using The Concept of Single bit Error. 2013-4-6 www.i-world-tech.blogspot.in 25
  • 26. Single bit Error  Receiver Reads a 1 bit as a 0 or 0 bit as a 1.  To Correct This Error, The Receiver Simply Reverses The Value of The Altered bit. To do so We Must Know Which bit is in error.  To Calculate The Number of Redundant bit r To Correct an data bit of Length m we Must Know The Relationship between r and m. So, if Data bit is m and Redundant bit is r, Then We have To Satisfy The Relation 2^r >= m+r+1 2013-4-6 www.i-world-tech.blogspot.in 26
  • 27. Ex : If The Value of m is 7, The Relation will Satisfy if The Minimum Value of r is 4. 2^4 = 16 > 7+4+1 2013-4-6 www.i-world-tech.blogspot.in 27
  • 28. If The Number of Data bit is 7, Then The Position of Redundant bits Are : 2^0=1 2^1=2 2^2=4 2^3=8 2013-4-6 www.i-world-tech.blogspot.in 28
  • 29. 2013-4-6 www.i-world-tech.blogspot.in 29
  • 30. 2013-4-6 www.i-world-tech.blogspot.in 30
  • 31. Let Receiver receives 10010100101 2013-4-6 www.i-world-tech.blogspot.in 31
  • 32. Burst Error Correction  Hamming Code Cannot Correct a burst Error Directly.  it is Possible To Rearrange The Data and Then Apply The code.  Instead of Sending All the bits in The data Unit Together, we can organize N units in a column.  Send The First bits of Each Followed by The Second bit of each, and so on.  In This Way, if a burst Error of M bit Occurs (M<N), Then The Error does not Corrupt M bit of Single Unit, it Corrupt Only 1 bit of Unit.  Then We Can Correct it Using Hamming Code Scheme. 2013-4-6 www.i-world-tech.blogspot.in 32
  • 33. 2013-4-6 www.i-world-tech.blogspot.in 33
  • 34. 2013-4-6 www.i-world-tech.blogspot.in 34
  • 35. Four Levels of Addressing Physical Logical Port Specific Addresses Addresses Addresses Addresses Data Link Layer Network layer Transport Layer Application Layer 2013-4-6 www.i-world-tech.blogspot.in 35
  • 36.  Physical Address is Also Known As Link Address.  It is the Address of a node as defined by its LAN or WAN.  It is Included in The Frame used by the Data Link Layer.  It is The Lowest Level Address. The Size and Format of These Address vary , depending on The Network. 2013-4-6 www.i-world-tech.blogspot.in 36
  • 37.  Ethernet uses a 6-byte (48 bits) Physical Address That is Imprinted on The Network Interface card (NIC) . Ex : Most LAN Use a 48-bit (6 byte) Physical Address Written as 12 hexadecimal digits , Every byte (2 hexadecimal digits) is Separated by a Colon , As Shown below.. 07:01:02:01:2C:4B A 6 byte (12 hexadecimal digits ) Physical Address. 2013-4-6 www.i-world-tech.blogspot.in 37
  • 38. 2013-4-6 www.i-world-tech.blogspot.in 38
  • 39. 2013-4-6 www.i-world-tech.blogspot.in 39
  • 40.  When nodes or stations are connected and use a common link , called a multipoint or broadcast link , we need a multiple-access protocol to coordinate access to the link. TAXANOMY OF MULTIPLE-ACCESS PROTOCOLS 2013-4-6 www.i-world-tech.blogspot.in 40
  • 41. In random access or contention method , no station is superior to another station and none is assigned the control over another. At each instance a station that has a data to send uses a procedure defined by the protocol to make a decision on whether or not to send . The decision depends on the state of the medium (idle or busy ). Two features give this method its name:  there is no scheduled time for a station to transmit (i.e random access) No rules specify which station should travel next(i.e called contention method) 2013-4-6 www.i-world-tech.blogspot.in 41
  • 42.  Earliest random access protocol developed in early 1970.  It was designed for radio wireless Lan. The medium was shared between stations . When a station sends the data , another station may do at the same time . The data from the two stations collide and become garbled. 2013-4-6 www.i-world-tech.blogspot.in 42
  • 43.  The original ALOHA protocol is called pure ALOHA .  Each stations sends a frame when ever it has a frame to send .  Since there is only one channel to share , the is a possibility of collisions between frames from different stations . FRAMES IN Pure ALOHA NETWORK 2013-4-6 www.i-world-tech.blogspot.in 43
  • 44. Procedure for pure aloha protocol 2013-4-6 www.i-world-tech.blogspot.in 44
  • 45. VULNERABLE TIME : is the time in which there is a possibility of collision. fig:- Vulnerable time in pure ALOHA protocol 2013-4-6 www.i-world-tech.blogspot.in 45
  • 46. THROUGHTPUT :- is the average number of successful transmission. o FOR pure ALOHA S=G*e-2G where G is the average number of frames generated by the system . 2013-4-6 www.i-world-tech.blogspot.in 46
  • 47.  In slotted ALOHA we divide the time into slots of Tfr s and force the stations to send only one at the beginning of the time slot. 2013-4-6 www.i-world-tech.blogspot.in 47
  • 48. VULNERABLE TIME :- is now reduced to one half i.e T fr Fig :- Vulnerable time for slotted ALOHA protocol . 2013-4-6 www.i-world-tech.blogspot.in 48
  • 49. Throughput :- the average number of successful transmission for slotted ALOHA is S=G*e-G The maximum number throughput Smax =0.368 when G=1. 2013-4-6 www.i-world-tech.blogspot.in 49
  • 50. CSMA requires that each station first lisens to the medium before sending . The possibility of collision still exist because of propagation delay ; when a station sends a frame, it still takes time for the first bit to reach every station and for every station to sense it. 2013-4-6 www.i-world-tech.blogspot.in 50
  • 51. Vulnerable time :- for CSMA is the propagation time Tp . 2013-4-6 www.i-world-tech.blogspot.in 51
  • 52. Persistence methods :- tells what a station should do if the channel is idle . 3 types of persistence methods  1-persistent  non persistent p-persistent 2013-4-6 www.i-world-tech.blogspot.in 52
  • 53. 2013-4-6 www.i-world-tech.blogspot.in 53
  • 54. CSMA/CD augments the algorithm to handle the collision .Here a station monitors the medium after it sends a frame to see if the transmission was successful . If so the station is finished . If however there is a collision , the frame is send again . 2013-4-6 www.i-world-tech.blogspot.in 54
  • 55. Flow diagram 2013-4-6 www.i-world-tech.blogspot.in 55
  • 56. In wired network the received signal has almost the same energy as the sent signal because the length of the cable is short or there are repeaters that amplify the energy between the sende and the receiver . This means that in a collision , the detected energy almost doubles . Collisions are avoided through the use of CSMA/CA’s three strategies :- The interframe space (IFS) The contention window acknowwledgements 2013-4-6 www.i-world-tech.blogspot.in 56
  • 57. FLOW DIAGRAM 2013-4-6 www.i-world-tech.blogspot.in 57
  • 58.  In controlled access , the stations consult one another to find which station has the right to send .  3 popular controlled access methods are : 1. reservation 2. Polling 3. Token passing 2013-4-6 www.i-world-tech.blogspot.in 58
  • 59.  In reservation method , a station needs to make a reservation before sending the data .In each interval , a reservation frame precedes the data frame in that interval.  If there are N stations in the system , the are exactly N reservation minis lots in the reservation frame . Each minis lot belong to a station . When a station needs to send a data frame , it makes a reservation in its own minis lot. 2013-4-6 www.i-world-tech.blogspot.in 59
  • 60. Polling works with topologies in which one device is designated as a primary station and the other devices are secondary stations. All data exchanges must be made through the primary device even when the ultimate destination is a secondary device.  The primary device controls the link.  The secondary devices follow its instructions. 2013-4-6 www.i-world-tech.blogspot.in 60
  • 61. Select Function The select function is used whenever the primary device has something to send.  Remember that the primary controls the link. If the primary is neither sending nor receiving data, it knows the link is available. Poll Function The poll function is used by the primary device to solicit transmissions from the secondary devices.  When the primary is ready to receive data, it must ask (poll) each device in turn if it has anything to send. 2013-4-6 www.i-world-tech.blogspot.in 61
  • 62. 2013-4-6 www.i-world-tech.blogspot.in 62
  • 63. Logical Ring:  In a token-passing network, stations do not have to be physically connected in a ring. the ring can be a logical one. 2013-4-6 www.i-world-tech.blogspot.in 63
  • 64. In the token-passing method, the stations in a network are organized in a logical ring.  In other words, for each station, there is a predecessor and a successor.  The predecessor is the station which is logically before the station in the ring;  the successor is the station which is after the station in the ring. 2013-4-6 www.i-world-tech.blogspot.in 64
  • 65. 2013-4-6 www.i-world-tech.blogspot.in 65
  • 66.  The transmitted bit stream by the physical layer is not guaranteed to be error free. It is up to the data-link layer to detect, and if necessary, to correct errors. The data-link layer breaks the bit stream up into discrete frames and compute the checksum for each frame. When a frame arrives at the destination, the checksum is recomputed. 2013-4-6 www.i-world-tech.blogspot.in 66
  • 67. Frames Are The Small data Units Created By Data Link Layer And The Process Of Creating Frames By The Data Link Layer Is Known As Framing. The easiest way to achieve framing is to insert time gaps between frames.  Networks rarely make any guarantees about timing. 2013-4-6 www.i-world-tech.blogspot.in 67
  • 68. 1. Character Count. 2. Starting & Ending Characters With Character Stuffing. 3. Starting & ending Flags With Bit Stuffing. 4. Physical Layer Coding Violation. 2013-4-6 www.i-world-tech.blogspot.in 68
  • 69.  This Method Specifies The Number Of Characters That Are Present In particular Frame.  This Information Is specified By using a Special Field In the Header Frame.  The problem with Character count algorithm is that the count can be distorted by a transmission error. 2013-4-6 www.i-world-tech.blogspot.in 69
  • 70.  In this Method Frame Starts & End With a special Character That Mark The Beginning & End Of Frame.  Each character Begins With the ASCII Character Sequence DLE STX (data link Escape Start Of Text ) And End With ASCII Character Sequence DLE ETX (data link escape End Of text) 2013-4-6 www.i-world-tech.blogspot.in 70
  • 71. 2013-4-6 www.i-world-tech.blogspot.in 71
  • 72.  In this Method , Each Begins & Ends With a Special Bit pattern 01111110 Called Flags.  There for Each frame starts With 01111110& also Ends with 01111110.  The Main Problem arises in this Method When The Flag byte 01111110 Appear as data.  This Problem Is Handled By technique called Bit stuffing That Is similar To character stuffing. 2013-4-6 www.i-world-tech.blogspot.in 72
  • 73. 2013-4-6 www.i-world-tech.blogspot.in 73
  • 74.  This Framing Method Is Used only In those network In which Encoding On The Physical Medium Contain some Redundancy.  Some LANs Encode Each Bit Of Data By using two Physical Bit i.e. Manchester coding is Used.  In this method Bit 1 Is encoded into high-low(10) Pair And Bit 0 Is Encoded Into low-high(01)pair shown in figure. 2013-4-6 www.i-world-tech.blogspot.in 74
  • 75. TDMA – Time Division Multiple Access FDMA – Frequency Division Multiple Access CDMA – Code Division Multiple Access 2013-4-6 www.i-world-tech.blogspot.in 75
  • 76. FDMA - Large room divided up into small rooms. Each pair of people takes turns speaking. TDMA – Large room divided up into small rooms. Three pairs of people per room, however, each pair gets 20 seconds to speak. CDMA – No small rooms. Everyone is speaking in different languages. If voice volume is minimized, the number of people is maximized. 2013-4-6 www.i-world-tech.blogspot.in 76
  • 77. Efficiency of TDMA frame: 2013-4-6 www.i-world-tech.blogspot.in 77
  • 78.  Flexible bit rate  No frequency guard band required  No need for precise narrowband filters  Easy for mobile or base stations to initiate and execute hands off  Extended battery life  TDMA installations offer savings in base station equipment, space and maintenance  The most cost-effective technology for upgrading a current analog system to digital 2013-4-6 www.i-world-tech.blogspot.in 78
  • 79. Requires network-wide timing synchronization  Requires signal processing fro matched filtering and correlation detection  Demands high peak power on uplink in transient mode  Multipath distortion 2013-4-6 www.i-world-tech.blogspot.in 79
  • 80. Number of FDMA Channels In the U.S. each cellular carrier is allocated 416 channels where: 2013-4-6 www.i-world-tech.blogspot.in 80
  • 81.  If channel is not in use, it sits idle  Channel bandwidth is relatively narrow (30kHz)  Simple algorithmically, and from a hardware standpoint  Fairly efficient when the number of stations is small and the traffic is uniformly constant  Capacity increase can be obtained by reducing the information bit rate and using efficient digital code  No need for network timing  No restriction regarding the type of baseband or type of modulation 2013-4-6 www.i-world-tech.blogspot.in 81
  • 82.  The presence of guard bands  Requires right RF filtering to minimize adjacent channel interference  Maximum bit rate per channel is fixed  Small inhibiting flexibility in bit rate capability  Does not differ significantly from analog system 2013-4-6 www.i-world-tech.blogspot.in 82
  • 83. Spread Spectrum Multiple Access Technologies 2013-4-6 www.i-world-tech.blogspot.in 83
  • 84. Many users of CDMA use the same frequency, TDD or FDD may be used  Multipath fading may be substantially reduced because of large signal bandwidth  No absolute limit on the number of users  Easy addition of more users  Impossible for hackers to decipher the code sent  Better signal quality  No sense of handoff when changing cells 2013-4-6 www.i-world-tech.blogspot.in 84
  • 85. As the number of users increases, the overall quality of service decreases  Self-jamming  Near- Far- problem arises 2013-4-6 www.i-world-tech.blogspot.in 85
  • 86. 2013-4-6 www.i-world-tech.blogspot.in 86
  • 87.  Flow control refers to a set of procedures (protocols) used to restrict the amount of data that the sender can send before waiting for acknowledgment.  It is one of the most important duties of the data link layer. 2013-4-6 www.i-world-tech.blogspot.in 87
  • 88.  Now let us see how the data link layer can combine framing, flow control, and error control by using protocols to achieve the delivery of data from one node to another.  We divide the discussion of protocols as follows - 2013-4-6 www.i-world-tech.blogspot.in 88
  • 89. All the protocols we discuss are unidirectional.  Although special frames, called acknowledgment (ACK) and negative acknowledgment(NAK) can flow in the opposite direction for flow and error control purposes, data flow in only one direction. 2013-4-6 www.i-world-tech.blogspot.in 89
  • 90.  An ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. 1. Simplest Protocol 2. Stop-and-wait 2013-4-6 www.i-world-tech.blogspot.in 90
  • 91.  We assume that the receiver can immediately handle any frame it receives with a processing time that is small enough to be negligible.  The data link layer of the receiver immediately removes the header from the frame and hands the data packet to its network layer, which can also accept the packet immediately. 2013-4-6 www.i-world-tech.blogspot.in 91
  • 92. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 92
  • 93. Receiver-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 93
  • 94. The sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead), and then sends the next frame. 2013-4-6 www.i-world-tech.blogspot.in 94
  • 95. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 95
  • 96. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 96
  • 97. Receiver-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 97
  • 98.  Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control. 1. Stop-and-Wait Automatic Repeat Request 2. Go-Back-N Automatic Repeat Request 3. Selective Repeat Automatic Repeat Request 2013-4-6 www.i-world-tech.blogspot.in 98
  • 99.  Adds a simple error control mechanism to the Stop-and-Wait Protocol.  When the frame arrives at the receiver site, it is checked and if it is corrupted, it is silently discarded. The detection of errors in this protocol is manifested by the silence of the receiver.  The corrupted and lost frames need to be resent in this protocol. 2013-4-6 www.i-world-tech.blogspot.in 99
  • 100.  To identify a frame we number the frames.  Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires.  The ACK frame for this protocol has a sequence number field. 2013-4-6 www.i-world-tech.blogspot.in 100
  • 101.  Sequence number In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic.  Acknowledgement number In Stop-and-Wait ARQ, the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected. 2013-4-6 www.i-world-tech.blogspot.in 101
  • 102. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 102
  • 103. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 103
  • 104. Receiver-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 104
  • 105. 2013-4-6 www.i-world-tech.blogspot.in 105
  • 106.  In this protocol we can send several frames before receiving acknowledgments; we keep a copy of these frames until the acknowledgments arrive. Sequence number  In the Go-Back-N Protocol, the sequence numbers are modulo 2 raise to the power m, where m is the size of the sequence number field in bits. 2013-4-6 www.i-world-tech.blogspot.in 106
  • 107. Sliding Window In this protocol, the sliding window is an abstract concept that defines the range of sequence numbers that is the concern of the sender and receiver. The range which is the concern of the sender is called the send sliding window; the range that is the concern of the receiver is called the receive sliding window. 2013-4-6 www.i-world-tech.blogspot.in 107
  • 108. Sliding Window The send window is an abstract concept defining an imaginary box of size 2m- 1 with three variables: Sf, Sn and Ssize. The send window can slide one or more slots when a valid acknowledgment arrives. 2013-4-6 www.i-world-tech.blogspot.in 108
  • 109. Sliding Window The receive window is an abstract concept defining an imaginary box of size 1 with one single variable Rn• The window slides when a correct frame has arrived; sliding occurs one slot at a time. 2013-4-6 www.i-world-tech.blogspot.in 109
  • 110. Send Window Size For m=2 2013-4-6 www.i-world-tech.blogspot.in 110
  • 111. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 111
  • 112. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 112
  • 113. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 113
  • 114.  This protocol does not resend N frames when just one frame is damaged.  It is more efficient for noisy links, but the processing at the receiver is more complex. Windows  The send window maximum size can be 2 raise to the power (m-1) 2013-4-6 www.i-world-tech.blogspot.in 114
  • 115.  The size of the receive window is the same as the size of the send window (2m- I ).  The Selective Repeat Protocol allows as many frames as the size of the receive window to arrive out of order and be kept until there is a set of in- order frames to be delivered to the network layer. 2013-4-6 www.i-world-tech.blogspot.in 115
  • 116. Window Sizes For m=2 2013-4-6 www.i-world-tech.blogspot.in 116
  • 117. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 117
  • 118. Sender-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 118
  • 119. Receiver-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 119
  • 120. Receiver-site algorithm 2013-4-6 www.i-world-tech.blogspot.in 120
  • 121. Data Link Layer makes the physical layer appears error-free to the upper layer (Network Layer).  The data Link Layer is responsible for the Moving frames from one hop (node) to the next.  The data Link Layer adds reliability to the physical layer by adding mechanisms to detect and retransmit or lost frames.  it also uses a mechanism to recognize duplicate frames.  Ethernet uses a 6-byte (48 bits) Physical Address That is Imprinted on The Network Interface card (NIC) . 2013-4-6 www.i-world-tech.blogspot.in 121
  • 122. When nodes or stations are connected and use a common link , called a multipoint or broadcast link , we need a multiple-access protocol to coordinate access to the link.  The data-link layer breaks the bit stream up into discrete frames and compute the checksum for each frame.  Flow control refers to a set of procedures (protocols) used to restrict the amount of data that the sender can send before waiting for acknowledgment.  Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. 2013-4-6 www.i-world-tech.blogspot.in 122
  • 123. Data Communication and Networking Fourth Edition Behrouz A. Forouzan and Sophia Chung Fegan  Computer Network 4th Edition By Tanenbaum www.wikipedia.com  www.google.com 2013-4-6 www.i-world-tech.blogspot.in 123
  • 124. Thank You 2013-4-6 www.i-world-tech.blogspot.in 124