Sublayers of Data Link Layer
Data Link Layer has two sublayers,
The packet obtains from the Network layer is further divided into frames depending on the frame size of NIC(Network Interface Card). DLL also encases Sender's and Receiver's MAC address in the header.
An ARP(Address Resolution Protocol) request is placed onto the wire asking "Who has that IP address?" and after getting this message destination host replies with its MAC address. By this, the receiver's MAC address is obtained.
Design Issues with Data Link Layer
Functions of Data Link Layer
Specific functions of the data link layer include the following,
Framing: The data link layer receives the stream of bits from the network layer divides into manageable data units called frames.
Physical addressing: If frames are to be distributed to different stations on the network. To define the physical address of the sender (source address) and/or receiver (destination address) of the frame, the DLL adds a header to the frame.
If the frame is to be sent for a system outside the sender's network. The receiver's address means the address of the device that connects one network to the another.
This figure shows the relationship of the Data link layer to the network and physical layers.
Data Link Layer
Flow control: If the rate at which the data are consumed by the receiver is less than the rate produced by the sender, the data link layer deals with a flow control mechanism to prevent overrun the receiver.
Error control: The data link layer also deals with damaged or lost frames. By adding mechanisms to detect and retransmit lost frames increases reliability.
A trailer added to the end of the frame to achieve error control.
Access control: When more than two or two devices are connected to the common link, data link layer protocols are necessary to determine which device has control over the link at any point of time.
Example: In this figure, a node with physical address 23 sends a frame to a node with physical address 92. The two nodes connected by a link level. At the link level this frame contains physical (link) addresses in the header.
These are the only addresses needed. The remaining header contains other information that is required at this level. The extra bits needed for error detection contains by the trailer.