The Data Link layer controls the physical data flow and translates messages from the above layers into
bits for Layer 1. It formats messages into
frames that add a header containing the hardware destination and source address, and deals with data corruption by
checksumming. The
IEEE divides this layer into two sublayers:
MAC and
LLC:
MAC, or Media Access Control, is responsible for three tasks:
- Framing the packet from an upper layer with a header and a trailer. This frame contains the hardware addresses of both the source and the destination host.
- Media Access. This is how hosts communicate with Layer 1.
- Logical topology, which defines the digital signal path through the physical topology, e.g. a ring in a Token Ring network. It also provides error detection.
LLC, or Logical Link Control, can provide optional services to an application developer, like flow control by way of stop/start codes, and error correction. WLLC allows upper-layer protocols to remain independent over various LANs by use of a Destination Service Access Point (DSAP) and a Source Service Access Point (SSAP), which identify the protocol regardless of the physical and logical medium used.