Data Link Layer has a number of specific functions to carry out. These functions include:-
- Providing a well-defined service interface to the Network Layer.
- Determining how the bits of the Physical Layer are grouped into frames.
- Dealing with transmission errors.
- Regulating the flow of frames so that slow receivers are not overcome by a fast sender.
Services provided to the Network Layer
The function of the Data Link Layer is to provide services to the Network Layer. The principle service is transferring data from the Network Layer on the source machine to the Network Layer on the destination machine. On the source machine, there is an entity or a process, in the Network Layer that transfers some bits to the Data Link Layer for transmission to the destination machine. The job of the Data Link Layer is to transmit the bits to the destination machine so that they can be handled over, to the Network Layer.
The Data Link Layer can be designed to offer various services. The actual services offered can vary from system to system. Three reasonable possibilities that are commonly provided are:-
- Unacknowledged Connectionless Services
- Acknowledged Connectionless Services
- Unacknowledged Connection Oriented Services
Unacknowledged Connectionless Services:- It consist of having the source machine send independent frames to the destination machine, without having the destination machine acknowledge them. No connection is established before hand or released afterwards. If the frame is lost due to noise on the line, no attempt is made to recover it in the Data Link Layer. It is appropriate for Real Time Traffic (data) such as speech, in which late data are worse then bad data.
Acknowledged Connectionless Services:- when this service is offered there are still no connections used but each frame is individually acknowledged. In this way the sender knows whether or not a frame has arrived safely. If it is not arrived within the specified time interval, it can be sent again.
Unacknowledged Connection Oriented Services:- The most sophisticated service that the Data Link Layer can provide to the Network Layer is Connection Oriented Services. With this service, the source and destination machine establish a connection before any data are transferred. Each frame sent over a connection is numbered and the Data Link Layer guarantees that the each frame sent is indeed received. further more it guarantees that each frame is received exactly once and that all the frames are received in the right order.