What is the Role of the Data Link layer in the OSI model?
Data Link Layer and the OSI model:
The data link layer is the second layer in the OSI reference model. It uses services of the underlying physical layer and provides services to the upper network layer.
Role of data link layer in Internet Communication.
Over the internet, when a user application needs to deliver a packet to the destination (a remote IP address). First, it reaches the network layer, and the next hope is selected by looking into the routing table and passing the packet to the data link layer for actual delivery.
The next hope may be the final destination or an intermediate routing node, e.g., a network router.
The data link layer’s function is to ensure the reliable delivery of IP packets till the next hop. The data link layer does error control, framing, and sequencing to provide a means of reliable transport.
Addressing of data link layer in a computer network:
Like the OSI model’s network layer, the data link layer also needs to have an address. This address has significance between two directly connected network nodes.
For example, In a Local Area Network, the physical address of an ethernet card (MAC) is the address of the data link layer. Before delivering a packet to the next machine, the IP address needs to map to the destination MAC. ARP is the protocol that translates an IP address to a MAC address.
What type of services data link provides to the network layer?
The data link layer provides three types of services to the internet layer. Each service type is designed to meet a specific application requirement. Error correction and reliable delivery are the optimizations at the data link layer because the upper transport layer may perform the reliable delivery (e.g., TCP) of the messages from source to destination.
- Connectionless unacknowledged service:
- Acknowledge connectionless service:
- Connection-Oriented service with an acknowledgment:
What are the Functions of the data link Layer?
Framing
A-Frame is a group of bits. Each frame starts with a bit pattern and ends with another bit pattern, known as start and end patterns, respectively. The framing is over a point-to-point physical channel. Each frame in the data link layer has checksum bits for error control.
Error Control :
The frame may get corrupted because of the noise in the physical channel. The data link layer ensures reliable delivery of the frames from source to destination. For that, it adds the checksum bits to the frames. The checksum bits are again calculated from the received frame on the receiver. If checksum bits are different from the received, the frame is marked as corrupted, and the sender will retransmit the same frame.
Flow Control:
Flow control restricts the fast sender when the receiver is slow. The flow control enables reliable and fast communication when the sender and receiver have differences in processing capability. The most straightforward flow control protocol is the stop-and-wait, where the sender sends a network packet and waits for an acknowledgment.
Shared channel access control:
Access control is the process of getting access to the channel when there are multiple users of the channel. The process is called medium access control. If there is no access control, then there are chances of collision if more than one user tries to access the shared channel or medium. There are various protocols for accessing the underlying channel or medium.
What are the Protocols in the data links layer?
The OSI model provides the guidelines for the data link layer. Actual protocols are developed for specific use in the communication network. Following is the list of protocols from the reference.
- SDLC (Synchronous Data Link Protocol)
- HDLC (High-level Data Link Control)
- SLIP (Serial Line Interface Protocol)
- PPP (Point-to-Point Protocol)
- LAP (Link Access Procedure)
- Frame Relay
- LLC (Logical Link Control)