The goal of the data link layer is to provide reliable, efficient communication between adjacent machines connected by a single communication channel. Sender checksums the frame and sends checksum together with data. The checksum allows the receiver to determine when a frame has been damaged in transit.
Receiver recomputes the checksum and compares it with the received value.
If they differ, an error has occurred and the frame is discarded. Perhaps return a positive or negative acknowledgment to the sender. A positive acknowledgment indicate the frame was received without errors, while a negative acknowledgment indicates the opposite. Prevent a fast sender from overwhelming a slower receiver. For example, a supercomputer can easily generate data faster than a PC can consume it.