Data Link Layer(DLL):
The data link layer breaks data packets received from the network layer into smaller pieces called frames and is responsible for the error-free transmission of these frames from one node to another using its MAC address.
The DLL is divided into two sublayers:
- LLC(Logical Link Control): It deals with functions like flow control and error control.
- MAC(Media Access Control): It controls the physical addressing and framing functions of the data link layer.
- Flow Control: It makes sure that the transmitting speed and the amount of data sent to match the capacity and speed of the receiver so that no data gets corrupted.
- Framing: DLL adds certain bits at the beginning(called header which contains the source and destination addresses) and at the end(called trailer which contains error correction and detection bits) to the message frame.
- Error Control: DLL uses CRC(cyclic redundancy check) to check if any error occurred during transmission.
- Physical Addressing: DLL adds the physical address(MAC address) of the destination and source in the header of each frame.
- Access Control: Determines which device has control over the link if the same communication channel is shared by multiple devices.
Significance of data link layer
- The data link layer is in charge of delivering data between two network nodes that are directly connected.
- The data link layer uses a physical address for the unique identification of each device on a local network.
- The data link layer splits packets from the network layer into smaller units known as frames and adds a header(which contains the physical address of source and destination) and a trailer(which contains error-checking data) at the beginning and end of the frame.
- Damaged or lost frames are detected and retransmitted by the data link layer’s error control mechanism.
- If many devices share the same communication link, the data link layer determines which device has control over the link.
- The data link layer also ensures flow control by limiting the amount of data a transmitter can send without overwhelming the receiver.
The data link layer is responsible for transmission, flow control, and error control between two nodes, whereas the transport layer is responsible for inter-network flow control and error control.