The document discusses the functions and design of the data link layer. It describes how the data link layer breaks data into discrete frames, computes checksums for error detection, and provides flow control between sender and receiver. It also defines some elementary data link protocols, including an unrestricted simplex protocol, stop-and-wait protocol, and a protocol for noisy channels using positive acknowledgement and retransmission.
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.
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
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.