Design Issues of Data Link Layer
Design Issues of Data Link Layer
• The data link layer uses the services of the physical layer to send and receive bits over
communication channels.
• It has a number of functions, including:
1. Providing a well-defined service interface to the network layer.
2. Dealing with transmission errors.
3. Regulating the flow of data so that slow receivers are not swamped by fast senders.
• The data link layer takes the packets it gets from the network layer and encapsulates
them into frames for transmission.
• Each frame contains a frame header, a payload field for holding the packet, and a
frame trailer
• The function of the data link layer is to provide services to the network layer.
• The main service is transferring data from the network layer on the source machine to
the network layer on the destination machine.
• The job of the data link layer is to transmit the bits to the destination machine so they
can be handed over to the network layer
The data link layer can be designed to offer various services. The actual services are
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service
Unacknowledged connectionless service
• The source machine send independent frames to the destination machine without
having the destination machine acknowledge them.
• The receiving machine does not acknowledge receiving the frame.
• No logical connection is set up between the host machines.
• If a frame is lost, no way to recover it in the datalink layer
• This is used in Ethernet
Framing
• The data link layer must use the service provided to it by the physical layer.
• Bit stream in physical layer is not guaranteed to error free.
• The number of bits may be less than or more than the number of bits transmitted.
• So the data link layer has to detect and correct errors if necessary.
• The data link layer has to break the bit stream into frames.
• Framing is a process of breaking a bit stream up into discrete frames and compute the
checksum for each frame.
• Framing is done in data link layer. The three framing methods are,
o Character count
o Character stuffing or Byte Stuffing
o Bits stuffing
Character count
• To count total number of characters that is present in frame.
Character Stuffing or Byte Stuff:
Bit stuffing
• Bit stuffing is the insertion of non-information bits into data.
• Extra bits are being added by network protocol designers to data streams.
Timer
• When the sender transmit a frame, it starts a timer.
• The timer is set to go off again an interval, which is enough for the frame to reach
destination, be process there and have the acknowledgement back to the sender.
• If either the frame or acknowledgement is lost the timer will go off, just the sender
retransmit the frame again.
Sequence number:
• Sequence numbers are used to avoid duplicate frames.
• Frames may be transmitted multiple times so the receiver may receive duplicate
frames.
• To prevent this, it is necessary to assign sequence numbers.
Flow Control
• Sender may transmit frames faster than the receiver.
• This situation occurs when the sender is running on a fast computer and a receiver is
running on a slow computer.
• The sender sends frame at high rate until the receiver has completely received.
• The usual solution is sender not to send more faster than the receiver.
• The flow control is classified into two categories: Feedback-based flow control and
Rate-based flow control