Data Link layer(DLL) provides addressing scheme that is used in transporting the frame across the local shared media. The device address in this layer is called the physical address.Data Link Layer divided the packets and make the frames. Data link layer frame contain the frame header. The header can also contain the source address of the frame. Unlike Layer 3 logical addresses that are hierarchical, physical address does not indicate on what network the device located.If the device is moved to another subnet, it will still function with the same Layer 2 physical address.Because the frame is only used to transport data between nodes across the local media, the Data Link layer address is only used for local delivery. Addresses at this layer have no meaning beyond the local network. Compare this to Layer 3, where addresses in the packet header are carried from source host to destination host regardless of the number of network hops along the route.If the packet in the frame must pass onto another network segment, the intermediate device - a router - will decapsulate the original frame, create a new frame for the packet, and send it onto the new segment. The new frame will use source and destination addressing as necessary to transport the packet across the new media.
The need for Data Link layer addressing at this layer depends on the logical topology. Point-to-point topologies, with just two interconnected nodes, do not require addressing. Once on the medium, the frame has only one place it can go.
Because ring and multi-access topologies can connect many nodes on a common medium, addressing is required for these typologies. When a frame reaches each node in the topology, the node examines the destination address in the header to determine if it is the destination of the frame.
Data Link layer protocols add a trailer to the end of each frame. The trailer is used to determine if the frame arrived without error. This process is called error detection. Note that this is different from error correction. Error detection is accomplished by placing a logical or mathematical summary of the bits that comprise the frame in the trailer.
Frame Check Sequence
The Frame Check Sequence (FCS) field is used to determine if errors occurred in the transmission and reception of the frame. Error detection is added at the Data Link layer because this is where data is transferred across the media. The media is a potentially unsafe environment for data. The signals on the media could be subject to interference, distortion, or loss that would substantially change the bit values that those signals represent. The error detection mechanism provided by the use of the FCS field discovers most errors caused on the media.
To ensure that the content of the received frame at the destination matches that of the frame that left the source node, a transmitting node creates a logical summary of the contents of the frame. This is known as the cyclic redundancy check (CRC) value. This value is placed in the Frame Check Sequence (FCS) field of the frame to represent the contents of the frame.
When the frame arrives at the destination node, the receiving node calculates its own logical summary, or CRC, of the frame. The receiving node compares the two CRC values. If the two values are the same, the frame is considered to have arrived as transmitted. If the CRC value in the FCS differs from the CRC calculated at the receiving node, the frame is discarded.
There is always the small possibility that a frame with a good CRC result is actually corrupt. Errors in bits may cancel each other out when the CRC is calculated. Upper layer protocols would then be required to detect and correct this data loss.
The protocol used in the Data Link layer, will determine if error correction will take place. The FCS is used to detect the error, but not every protocol will support correcting the error.