Fixed - Size Framing
• Drawback: It suffers from internal fragmentation if the data size is less
than the frame size
• Solution: Padding
Variable – Size Framing
Problems in Framing
• Detecting start of the frame: When a frame is transmitted, every station must be able to detect
it. Station detects frames by looking out for a special sequence of bits that marks the
beginning of the frame i.e. SFD (Starting Frame Delimiter)
• How does the station detect a frame: Every station listens to link for SFD pattern through a
sequential circuit. If SFD is detected, sequential circuit alerts station. Station checks
destination address to accept or reject frame
• Detecting end of frame: When to stop reading the frame
Framing Methods
Any of these 4 methods can be used to mark the start and
end of each frame
⚫ Character count or Byte count
⚫ Byte Stuffing
⚫ Bit Stuffing
⚫ Physical layer coding violation
Character Count
Character - Oriented Framing
Character - oriented protocols are suited for transmission of texts in point-point data transfer
The flag is chosen as a character that is not used for text encoding
However, if the protocol is used for transmitting multimedia messages, there are chances that the
pattern of the flag byte is present in the message byte sequence. In order that the receiver does not
consider the pattern as the end of the frame, byte stuffing mechanism is used.
Byte Stuffing
A problem with character - oriented framing is that it adds too much overhead on the message, thus
increasing the total size of the frame .Another problem is that the coding system used in recent times
have 16-bit or 32-bit characters that conflicts with the 8-bit encoding
Bit Stuffing
Bit Stuffing – Problem
⚫ A bit string, 0111101111101111110, needs to be transmitted at the data link layer. If the flag
used is 01111110, what is the string actually transmitted after bit stuffing?
Error Control
Also called Backward error correction
Forward error correction: In this case, the receiver uses the error-correcting code which
automatically corrects the errors
Backward error correction: Once the error is discovered, the receiver requests the sender to
retransmit the entire data unit.
Phases of Error Control
Error Detection
Acknowledgement (ACK)
Positive ACK
Negative ACK
Retransmission – Error Correction
Error Correction Techniques
Error correction techniques find out the exact number of bits that have been corrupted and as
well as their locations. There are two principle ways:
• Backward Error Correction (Retransmission) − If the receiver detects an error in the
incoming frame, it requests the sender to retransmit the frame. It is a relatively simple
technique. But it can be efficiently used only where retransmitting is not expensive as in fiber
optics and the time for retransmission is low relative to the requirements of the application.
• Forward Error Correction − If the receiver detects some error in the incoming frame, it
executes error-correcting code that generates the actual frame. This saves bandwidth required
for retransmission. It is inevitable in real-time systems. However, if there are too many errors,
the frames need to be retransmitted.
• The four main error correction codes are
• Hamming Codes
• Binary Convolution Code
• Reed – Solomon Code
• Low-Density Parity-Check Code