Overview#Data-link Layer is the protocol layer that transfers data between adjacent network nodes in a Wide Area Network (WAN) or between nodes on the same Local Area Network (LAN) segment.
Data-link Layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the Physical Layer.
Data-link Layer is concerned with local delivery of frames between devices on the same LAN. Data-link frames, as these Protocol Data Units are called, do not cross the boundaries of a Local Area Network.
Inter-network routing and global addressing are higher-layer functions, allowing data-link protocols to focus on local delivery, addressing, and media arbitration. This way, the Data-link Layer is analogous to a neighborhood traffic cop; it endeavors to arbitrate between parties contending for access to a medium, without concern for their ultimate destination.
When devices attempt to use a medium simultaneously, frame collisions occur. Data-link protocols specify how devices detect and recover from such collisions, and may provide mechanisms to reduce or prevent them.IEEE 802 defines two sub-layers within the Data-link Layer as: