Overview

As I briefly covered in Data Link Layer Devices , the data link layer has an Ethernet header and Ethernet trailer containing the MAC address and Frame Check Sequence (FCS), respectively.

Figure 5.11 Data link layer.

Figure 5.11 Data link layer.

For lecture 7, it will be divided into four parts, answering the following questions.

  1. Framing: How to identify the beginning and end of frames?
    1. 7.1 Data Link Layer - Framing
  2. Error Detection and Handling: How to detect and correct errors because of noise at the physical layer? How to retransmit and handle frame loss?
    1. 7.2 Data Link Layer - Error Detection
    2. 7.3 Data Link Layer - Error Correction
  3. Media Access Control (MAC): How to avoid conflict when many hosts use a shared medium, such as a single network cable?
    1. 7.4 Data Link Layer - Collisions

Framing

In computer networks, data is organized into frames or packets. When data is transmitted over a network medium (e.g. a network cable), the medium itself doesn't have a concept of frames or packets. It treats data as a continuous stream of bits.

Figure 7.1 Bit streams in the medium.

Figure 7.1 Bit streams in the medium.

In the process of transmitting data, it's important to break the continuous stream of bits into smaller units (frames or packets). Frame synchronization helps receivers recognize the boundaries of these units.

Frame Synchronization Methods

These methods help in identifying the boundaries of individual frames, which is essential for accurate data processing.

  1. Time Gap Synchronization: Involves leaving a time gap between frames (e.g., a sequence of zeros).
  2. Start & End Flags: Using special data sequences, via start and end flags.

We’ll focus primarily on the start and end flags method. Often, both start and end flags are the same character.

Figure 7.2 Start and end flag.

Figure 7.2 Start and end flag.

The issue comes from the flag selection. If flags aren't restricted to printable characters, ambiguity can occur, causing data corruption.