The data
link layer is layer 2 of OSI reference model. The data
link layer is responsible for node to node delivery of frames. This layer
receives packets from network layer, converts packets to frames and gives it to
physical layer. It delivers frames between nodes on the same network. Data link
layer analyse the bit pattern of data and ensures that received data is error
free. If the bit pattern of received data is different, then it tries to
correct data or ask to retransfer data.
There may be situation when different devices try to transfer data
through same medium in LAN. This causes frame collision. Data link layer
specifies how to recover frames or reduce frame collision.
The data link layer contains two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
Functions of Data Link Layer
Framing: The data link layer converts the bit stream
received from network layer to the manageable data units called frames.
Physical Addressing: To distribute frames to
different devices on the network, physical address is necessary. For this
purpose, data link layer adds a header to the frame to define physical address
of sender and receiver. If the receiver is outside the sender network, then the
receiver address is the address of the device that connects the network to the
next one.
Flow Control: If the data rate at receiver
side is less than the sender side data rate, then there is a chance of data
loss. For this, data link layer imposes a flow control mechanism to avoid
traffic at receiver side.
Error Control: The data link layer adds
trailer at the end of the frame to control error. It also uses mechanism to
recognize duplicate frames.
Access Control: If two or more devices
try to transfer data through the same link on the network, it causes frame
collision. To avoid this, data link layer protocols determines which device has
control over the link at a given time.
0 comments:
Post a Comment