r2 itesm-02
DESCRIPTION
enmarcado en la capa 2 protocolos de control de flujo de la capa data linkTRANSCRIPT
The Data Link Layer
Chapter 3
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.