ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Chapter 3

The Data Link Layer
Data Link Layer Design Issues
Algorithms for achieving reliable, efficient
   communication between two adjacent
   machines

•   Services Provided to the Network Layer
•   Framing
•   Error Control
•   Flow Control
Functions of the Data Link Layer

•       Provide service interface to the network layer
•       Dealing with transmission errors
•       Regulating data flow
    •     Slow receivers not swamped by fast senders
Functions of the Data Link Layer (2)




      Relationship between packets and frames.
Services Provided to Network Layer




         (a) Virtual communication.
         (b) Actual communication.
Services Provided to Network Layer
                (2)




       Placement of the data link protocol.
Framing
Data Link Layer breaks the bit stream up into discrete frames
  and compute the checksum for each frame

Then it Transmit the frame

When a frame arrives at the destination, the checksum is
 recomputed to see if there is an error.
Framing

    Breaking up the bits to make frames
    –   Insert time gaps (networks rarely make any guarantees about
        timing)
    –   Character count
    –   Flag bytes with byte stuffing
    –   Starting and ending flags, with bit stuffing
    –   Physical Layer coding violations
Framing




A character stream. (a) Without errors. (b) With one error.
Framing (2)




(a) A frame delimited by flag bytes.
(b) Four examples of byte sequences before and after stuffing.
Framing (3)




Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receiver’s memory after destuffing.
Flow control
What to do with a sender that systematically wants to transmit
   frames faster than the receiver can accept them
a) Feedback-based flow control
   –   receiver sends back information to the sender giving it
       permission to send more data
a) Rate-based flow control (never used in data-link layer)
   –   protocol has a built-in mechanism that limits the rate at which
       senders may transmit data, without using feedback from the
       receiver
Elementary Data Link Protocols

•   An Unrestricted Simplex Protocol
•   A Simplex Stop-and-Wait Protocol
•   A Simplex Protocol for a Noisy Channel
Protocol Definitions




                                            Continued 


Some definitions needed in the protocols to follow.
     These are located in the file protocol.h.
Protocol
Definitions
(ctd.)



  Some definitions
    needed in the
protocols to follow.
These are located in
 the file protocol.h.
Unrestricted
Simplex
Protocol
Simplex
Stop-and-
   Wait
Protocol
A Simplex Protocol for a Noisy Channel




    A positive
acknowledgement
with retransmission
     protocol.
                          Continued 
A Simplex Protocol for a Noisy Channel (ctd.)




   A positive acknowledgement with retransmission protocol.

More Related Content

R2 itesm-02

  • 1. Chapter 3 The Data Link Layer
  • 2. Data Link Layer Design Issues Algorithms for achieving reliable, efficient communication between two adjacent machines • Services Provided to the Network Layer • Framing • Error Control • Flow Control
  • 3. Functions of the Data Link Layer • Provide service interface to the network layer • Dealing with transmission errors • Regulating data flow • Slow receivers not swamped by fast senders
  • 4. Functions of the Data Link Layer (2) Relationship between packets and frames.
  • 5. Services Provided to Network Layer (a) Virtual communication. (b) Actual communication.
  • 6. Services Provided to Network Layer (2) Placement of the data link protocol.
  • 7. Framing Data Link Layer breaks the bit stream up into discrete frames and compute the checksum for each frame Then it Transmit the frame When a frame arrives at the destination, the checksum is recomputed to see if there is an error.
  • 8. Framing  Breaking up the bits to make frames – Insert time gaps (networks rarely make any guarantees about timing) – Character count – Flag bytes with byte stuffing – Starting and ending flags, with bit stuffing – Physical Layer coding violations
  • 9. Framing A character stream. (a) Without errors. (b) With one error.
  • 10. Framing (2) (a) A frame delimited by flag bytes. (b) Four examples of byte sequences before and after stuffing.
  • 11. Framing (3) Bit stuffing (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in receiver’s memory after destuffing.
  • 12. Flow control What to do with a sender that systematically wants to transmit frames faster than the receiver can accept them a) Feedback-based flow control – receiver sends back information to the sender giving it permission to send more data a) Rate-based flow control (never used in data-link layer) – protocol has a built-in mechanism that limits the rate at which senders may transmit data, without using feedback from the receiver
  • 13. Elementary Data Link Protocols • An Unrestricted Simplex Protocol • A Simplex Stop-and-Wait Protocol • A Simplex Protocol for a Noisy Channel
  • 14. Protocol Definitions Continued  Some definitions needed in the protocols to follow. These are located in the file protocol.h.
  • 15. Protocol Definitions (ctd.) Some definitions needed in the protocols to follow. These are located in the file protocol.h.
  • 17. Simplex Stop-and- Wait Protocol
  • 18. A Simplex Protocol for a Noisy Channel A positive acknowledgement with retransmission protocol. Continued 
  • 19. A Simplex Protocol for a Noisy Channel (ctd.) A positive acknowledgement with retransmission protocol.