The
basic role of a data link layer is to move a datagram (unit of
information) from one node to an adjacent node over a single
communication link.
The other services that the data link layer provides are as follows:
- Framing: It is a process by which link-layer protocols encapsulate each network-layer datagram within a link-layer frame before transmission over the link. A-frame consists of a data field, in which the network-layer datagram is inserted, and a number of header fields.
- Link access: Nodes need to follow different rules to avoid a collision before frame transmission as links are of different types, e.g., point-to-point link and broadcast link.
- Reliable delivery: Reliable delivery service can be achieved through acknowledgements and retransmissions. Link-Layer reliable delivery service is often used for error-prone links such as a wireless link. In case of low bit-error links, including fibre, coax, and many twisted-pair copper links, there is no need.
- Error detection and correction: Sometimes during transmission, due to signal attenuation and electromagnetic noise, bit errors are introduced. In that case, there is no point of forwarding. Error detection in the link layer is usually more sophisticated and is implemented in hardware