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:

  1. 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.
  2. 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.
  3. 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:

  1. 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], where 5 indicates the number of characters.
  2. 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.
  3. Bit Stuffing Example:

    • Original data: 01111110.
    • After bit stuffing: 011111010, where an extra 0 is inserted after five consecutive 1s to avoid confusion with the frame delimiter 01111110.

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

Popular posts from this blog

DSA Lab 8 program

DSA Lab 7 Program

Network Layer: Design Issues and Key Concepts