Data Link Layer Design Issue
Data Link Layer Design Issue
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Data Link Layer Design Issues
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Services Provided to the Network Layer
• Principal Service Function of the data link layer is to transfer the
data from the network layer on the source machine to the network
layer on the destination machine.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Possible Services Offered
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Unacknowledged Connectionless
Service
• It consists of having the source machine send independent
frames to the destination machine without having the destination
machine acknowledge them. No logical connections.
• Each frame send by the Data Link layer is acknowledged and the
sender knows if a specific frame has been received or lost.
• If the ack has not arrived within a specific time interval, it can be
sent again.
• Network layer does not know frame size of the packets and other
restriction of the data link layer. Hence it becomes necessary for
data link layer to have some mechanism to optimize the
transmission.
Acknowledged Connection Oriented
Service
• Source and Destination establish a connection first.
• Examples:
– Satellite channel communication,
– Long-distance telephone communication, etc.
Acknowledged Connection Oriented
Service
• Three distinct phases:
• To provide service to the network layer the data link layer must
use the service provided to it by physical layer.
i.e discard the bad frame and sending back the error report.
Framing Methods
1. Character count.
2. Flag bytes with byte stuffing.
3. Flag bits with bit stuffing.
4. Physical layer coding violations.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Character Count Framing Method
• It uses a field in the header to specify the number of
characters in the frame.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Flag Bytes with Byte Stuffing
• This methods gets around the boundary detection of the frame by
having each appended by the frame start and frame end special
bytes.
• The problem with this method is that when binary data such as
object program or floating point numbers are being transmitted,
there is the chance that the transmitted data may contain the flag
bit pattern.
• Here to solve this a special escape byte (ESC)is added just before
each FLAG in the data.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Flag Bits with Bit Stuffing Framing
Method
• The drawback of byte stuffing method is that it is closely tied to
the use of 8-bit characters.
Bit stuffing. (a) The original data. (b) The data as they appear on
the line. (c) The data as they are stored in the receiver’s memory after
destuffing.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Bit Stuffing
• The sender will wait for ack until the timer expires.
• Two approaches:
1. Feedback-based flow control
2. Rate-based flow control
Feedback-based Flow Control
• Receiver sends back information to the sender giving it
permission to send more data, or
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011