Data Link Layer
Data Link Layer Design Issues
• 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.
Placement of DLL
Placement of the data link protocol.
Types of services provided to the
Network Layer
Unacknowledged Connectionless service
Acknowledged Connectionless service
Acknowledged Connection-Oriented
service
Unacknowledged Connectionless
service
Losses are taken care of at higher layers
Used on reliable medium like coax cables
or optical fiber, where the error rate is low.
Appropriate for voice, where delay is
worse than bad data.
Acknowledged Connectionless
service
Useful on unreliable medium like wireless.
Acknowledgements add delays.
Adding ack in the DLL rather than in the NL is
just an optimization and not a requirement.
Leaving it for the NL is inefficient as a large
message (packet) has to be resent in that case
in contrast to small frames here.
On reliable channels, like fiber, the overhead
associated with the ack is not justified.
Acknowledged Connection-
oriented service
Most reliable,
Guaranteed service –
Each frame sent is indeed received
Each frame is received exactly once
Frames are received in order
Special care has to be taken to ensure this
in connectionless services
Framing
Character Count
Flag bytes with byte stuffing
Flag bytes with bit stuffing
Framing with Character Count
A character stream. (a) Without errors. (b)
With one error.
Problem with Framing with CC
What if the count is garbled
Even if with checksum, the receiver knows
that the frame is bad there is no way to tell
where the next frame starts.
Asking for retransmission doesn’t help
either because the start of the
retransmitted frame is not known
No longer used
Framing with byte stuffing
Framing with byte stuffing
Problem : fixed character size : assumes
character size to be 8 bits : can’t handle
heterogeneous environment.
Framing with bit stuffing
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.
I Acknowledge
Help from the following site
http://www.cs.vu.nl/~ast/
In preparing this lecture.