Framing in Data Link Layer
Sure! Here’s a summary of the article on “Framing in Data Link Layer” from GeeksforGeeks, along with some examples:
Framing in Data Link Layer
Overview: Framing is a crucial function of the Data Link Layer in computer networks. It involves dividing the stream of data into manageable units called frames. This process ensures that data is transmitted efficiently and accurately between devices.
Key Concepts:
Purpose of Framing:
- Error Detection: Frames include error-checking codes to detect and correct errors during transmission.
- Addressing: Frames contain source and destination addresses to ensure data reaches the correct recipient.
- Flow Control: Helps in managing the rate of data transmission between sender and receiver.
Types of Framing:
- Fixed-Size Framing: Each frame has a fixed size, making it easy to detect the start and end of frames. Example: ATM cells.
- Variable-Size Framing: Frames can have different sizes, requiring special markers to indicate frame boundaries. Example: Ethernet frames.
Framing Methods:
- Character Count: Uses a field in the header to specify the number of characters in the frame.
- Character Stuffing: Special characters are added to the data to differentiate between frame data and frame delimiters.
- Bit Stuffing: Extra bits are inserted into the data to prevent confusion with frame delimiters.
Examples:
Character Count Example:
- Suppose we have a frame with the following data:
HELLO
. - The frame might look like this:
[5, H, E, L, L, O]
, where5
indicates the number of characters.
- Suppose we have a frame with the following data:
Character Stuffing Example:
- Original data: ABCDEDLEFGHI.
- After character stuffing: DLE STX ABCDEDLEDLEFGHI DLE ETX, where
DLE
is a special character used to escape the STX, ETX delimiter.
Bit Stuffing Example:
- Original data:
01111110
. - After bit stuffing:
011111010
, where an extra0
is inserted after five consecutive1
s to avoid confusion with the frame delimiter01111110
.
- Original data:
Problems in Framing:
- Detecting Frame Boundaries: Ensuring the receiver can correctly identify the start and end of each frame.
- Handling Errors: Using error detection and correction mechanisms like CRC (Cyclic Redundancy Check) to maintain data integrity.
- Framing Overhead: The additional bits used for framing reduce the available bandwidth for actual data transmission.
Comments
Post a Comment