Data Link Layer
Data Link Layer in Computer Network
The data link layer is the second layer of the OSI Model from bottom. The main responsibility of the Data Link Layer is to transfer the datagram across an individual link. The Data link layer protocol defines the format of the packet exchanged across the nodes as well as the actions such as Error detection, retransmission, flow control, and random access. The Data-Link layer consists of two sublayers; Logical Link Control (LLC) sublayer and Media Access Control (MAC) sublayer.
Logical Link Control (LLC)
The LLC sublayer serves as the intermediary between the physical link and all higher layer protocols. It ensures that protocols like IP can function regardless of what type of physical technology is being used.
Media Access Control (MAC) sublayer
The MAC sublayer controls access to the physical medium, serving as mediator if multiple devices are competing for the same physical link.
Functionality of Data-link Layer
- Framing: Data-link layer takes packets from Network Layer and encapsulates them into Frames.Then, it sends each frame bit-by-bit on the hardware. At receiver’ end, data link layer picks up signals from hardware and assembles them into frames.
- Addressing: Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is assumed to be unique on the link. It is encoded into hardware at the time of manufacturing.
- Synchronization: When data frames are sent on the link, both machines must be synchronized in order to transfer to take place.
- Error Control: Sometimes signals may have encountered problem in transition and the bits are flipped.These errors are detected and attempted to recover actual data bits. It also provides error reporting mechanism to the sender.
- Flow Control: Stations on same link may have different speed or capacity. Data-link layer ensures flow control that enables both machine to exchange data on same speed.
- Multi-Access: When host on the shared link tries to transfer the data, it has a high probability of collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of accessing a shared media among multiple Systems.