The data link layer has two sublayers: logical link control (LLC) and media access control (MAC).
Logical link control sublayer
The uppermost sublayer, LLC, multiplexes protocols running atop the data link layer, and optionally provides flow control, acknowledgment, and error notification. The LLC provides addressing and control of the data link. It specifies which mechanisms are to be used for addressing stations over the transmission medium and for controlling the data exchanged between the originator and recipient machines.
Media access control sublayer
MAC may refer to the sublayer that determines who is allowed to access the media at any one time (usually CSMA/CD).
Other times it refers to a frame structure with MAC addresses inside. There are generally two forms of media access control: distributed and centralized. Both of these may be compared to communication between people. In a network made up of people speaking, i.e. a conversation, we look for clues from our fellow talkers to see if any of them appear to be about to speak. If two people speak at the same time, they will back off and begin a long and elaborate game of saying “no, you first”. The Media Access Control sublayer also determines where one frame of data ends and the next one starts – frame synchronization. There are four means of frame synchronization: time based, character counting, byte stuffing and bit stuffing. The time based approach simply puts a specified amount of time between frames.
Some companies can give their suppliers and customers access to their databases. But this access must be limited only for some kind of transactions for security reasons. For example companies don't give access to their human resources data. This kind of sensitive data may fall into the hands of competitors. Giving limited access to suppliers or customers to the company's database provide some ...
The major drawback of this is that new gaps can be introduced or old gaps can be lost due to external influences. Character counting simply notes the count of remaining characters in the frame’s header. This method, however, is easily disturbed if this field gets faulty in some way, thus making it hard to keep up synchronization. Byte stuffing precedes the frame with a special byte sequence such as DLE STX and succeeds it with DLE ETX. Appearances of DLE (byte value 0x10) have to be escaped with another DLE. The start and stop marks are detected at the receiver and removed as well as the inserted DLE characters.
Similarly, bit stuffing replaces these start and end marks with flag consisting of a special bit pattern (e.g. a 0, six 1 bits and a 0).
Occurrences of this bit pattern in the data to be transmitted is avoided by inserting a bit. To use the example where the flag is 01111110, a 0 is inserted after 5 consecutive 1’s in the data stream. The flags and the inserted 0’s are removed at the receiving end. This makes for arbitrary long frames and easy synchronization for the recipient. Note that this stuffed bit is added even if the following data bit is 0, which could not be mistaken for a sync sequence, so that the receiver can unambiguously distinguish stuffed bits from normal bits.