The three likely services to be provided by the data link layer are: 1. Unacknowledged connectionless service 2. Acknowledged connectionless service and 3. Acknowledged connection-oriented service.
1. Unacknowledged Connectionless Service:
When the source machine sends independent frames to the destination machine without the destination machine acknowledging the receipt and no connection having been established in advance or released afterwards, we designate such a manoeuvre as an Unacknowledged Connectionless Service.
If the frame is lost during transmission—noise being the most likely region—no attempt is made by the data link layer to recover it.
Naturally, such services are used only where the error rate is very small. It may be attempted in real-time applications such as in speech, in which data reaching late is worse than lost data. Local Area Networks preferably use Unacknowledged Connectionless Service in the data link layer. Naturally, this service does have the advantage that speed is enhanced since no attempt is made to ensure correctness.
2. Acknowledged Connectionless Service:
ADVERTISEMENTS:
Such a service is obviously more reliable than Unacknowledged Connectionless Service. When this service is used each frame is individually acknowledged but no connection is made in advance or released afterwards. If an acknowledgement is essential, the sender, whether or not a frame, must receive an acknowledgement that it has arrived safely at its destination.
Usually, a time limit is set for the receipt of the acknowledgement and if the acknowledgement is not received by the end of this time limit, the frame is sent again. This is one step above the connectionless unacknowledged service.
It may be remembered that providing acknowledgement in the data link layer is an option and not a necessity. The transport layer, for example, can always send a message and wait for the acknowledgement.
When the frame is sent, a timer is activated and if before the timer goes off the acknowledgement is not received, the entire message is usually sent once again. There are some problems associated with this thinking.
ADVERTISEMENTS:
If the average message consists of say 10 or 15 frames and one in five frames are lost (20% of all frames), a lot of time may be consumed in using this strategy. On the other hand, if individual frames are acknowledged and retransmitted, should the need arise, entire messages get through much faster.
On reliable channels such as those using fibre optic cables, the overheads required by a data link protocol using this strategy may result in excessive cost but in case of unreliable transmission such as wireless, the extra cost may well be worthwhile.
3. Acknowledged Connection-Oriented Service:
This is the most sophisticated service that the data link layer can provide to the network layer. To use this service, the source and destination machines establish a connection before any data is transmitted. Each frame transmitted over this connection is numbered and the data link layer guarantees that each frame is received, received only once and received in the right order.
In case of connectionless service, it is possible that a lost acknowledgement causes a frame to be sent more than once—indeed, several times—and is, therefore, received several times. In case of Connection-Oriented Service provides the network layer with a very reliable bit stream.
ADVERTISEMENTS:
In connection-oriented service transfers have three distinct phases. In phase one, the connection is established by having the sender as well as the receiver initialize variables and counters needed to keep track of which frame has been received (and which have not).
In the second phase, frames are actually transmitted. In the third phase, the connection is released, freeing up the variables, counters, buffers and other resources required to maintain the connection.