Logs of this layer ensure the integrity of the transmitted data. To do this, they package the data in units allowed for the medium, control the flow of transmission, and add checksums to the actual data packets, which the receiver can use to verify the state of the data. In the event of an error, the logs of this layer automatically take care of a repetition of the transmission.
The purpose of the data link layer (data link layer, data link layer, link protection layer, link level, procedure level) is to ensure reliable, ie largely error-free, transmission and to regulate access to the transmission medium. This is done by splitting the bitstream into blocks - also referred to as frames - and adding checksums as part of channel coding. Thus, defective blocks can be detected by the receiver and either discarded or even corrected; however, this layer does not provide for re-requesting discarded blocks.
A "data flow control" allows a receiver to dynamically control the speed with which the far site is allowed to send blocks. The international engineering organization IEEE saw the need to regulate for local networks and the competing access to a transmission medium, which is not provided in the OSI model.
This reveals a weakness of the OSI model that has not pulled the boundaries of the layers too consistently. For example, local area deployments redeploy this layer to Media Access Control (MAC) and Logical Link Control (LLC). To organize e.g. Ethernet provides access to the transmission medium via a MAC layer (often CSMA / CD-Carrier Sense Multiple Access with Collision Detect), while LLC provides an interface to higher-level services.
Other important layers of the data link layer are High-Level Data Link Control (HDLC), the Point-to-Point Protocol (PPP) based on it, and the Serial Line Protocol SLIP.
Hardware on this layer: Bridge, Switch (Multiport-Bridge)