Data Link Layer: Protocols, Error Control, and Flow Control

Data Link Layer

Liaison Service Layers

Ensures the integrity of packets received from the physical layer, controlling errors, and managing flow control.

Background

Divides the sequence of bits into transmission frames. A computing algorithm checks these frames to avoid bandwidth waste and facilitate error checking, allowing for less competition in the physical environment.

Framing Methods

  • Character Count: An additional character indicates the number of characters in the frame.
  • Character Stuffing: Flags indicate the beginning and end of the frame.
  • Start and End Flags with Bit Insertion: Divides bits in messages with an arbitrary number of bits.
  • Code Violation: High-low transition transmits bit 1, and low-high transition transmits bit 0.

Error Control

Uses protocols for error detection and correction. An error control algorithm is used; the receiver redoes the calculation and checks if it matches the transmitter’s. While retransmission is possible for corrupted data, it depends on factors like satellite distance and error rates. For better medium utilization, the link layer often performs only error detection. If the error is minor, correcting the algorithm is faster.

If the transmitter detects a lost frame, it sends a confirmation packet. Duplicate frames are handled by adding headers for identification.

Flow Control

The receiver repeats and compares the results with the transmitted data. One flow control method involves acknowledging the frame; the transmitter waits for acknowledgment before sending the next frame, preventing receiver overload.

Sliding Window Protocol (1-Bit)

Both transmitter and receiver exchange data frames and acknowledgments simultaneously. The frame sent by the transmitter serves as confirmation at the receiver, and this confirmation allows the transmitter to send more frames. Unlike Stop-and-Wait, transmission time is reduced, and bandwidth is used more efficiently.

Go-Back-N Protocol

This protocol increases the transmission window to N bits, while the acknowledgment window remains at 1. If a frame has an error, all subsequent unacknowledged frames are discarded, and transmission resumes from the error point.

Selective Repeat Protocol

This protocol uses a buffer. When a frame arrives with an error, it’s kept in the buffer. The transmitter sends only the missing frame. This is more efficient than Go-Back-N, as it avoids discarding potentially correct frames.

Examples of Data Link Protocols

  • HDLC: Point-to-point communication.
  • SLIP: Simple, but with poor error detection and security.
  • PPP: Includes authentication.

Medium Access Control Protocols

Aloha Protocol

Transmission starts at any time, leading to frequent collisions and inefficiency.

Slotted Aloha

Transmission occurs at the beginning of a specific time slot, improving bandwidth utilization and reducing collisions.

CSMA (Carrier Sense Multiple Access)

Listens to the environment before transmitting. Collisions can still occur if two devices detect a free environment simultaneously.

1-persistent CSMA

Listens to the environment and transmits immediately when free.

Non-persistent CSMA

If the medium is busy, waits a random time before checking again.

p-persistent CSMA

Waits a random time and transmits with a certain probability if the medium is free.

CSMA/CD (Collision Detection)

More efficient than traditional CSMA; aborts transmission if a collision is detected.

Bitmap Protocol

Works with rounds. All stations announce their intention to transmit, and transmission occurs in a defined order. Efficiency decreases with a high number of machines.

Binary Countdown Protocol

Each station has a fixed-size binary address. The station wanting to transmit sends its binary number. Efficient but suffers from fixed priority and collision issues.

Contention Protocols

  • With Limits: Work well in low traffic.
  • Without Limits: Utilize the medium well in high traffic.

Combining protocols like Bitmap with CSMA allows for dividing machines into groups for better efficiency.

WDMA (Wavelength Division Multiple Access)

Avoids limitations of FDM and TDM by dynamically allocating slices of the medium, improving efficiency.

Wireless Networks and CSMA

CSMA faces challenges in wireless networks due to the hidden node problem and the exposed node problem. Protocols like RTS/CTS help mitigate these issues.

IEEE 802 Standards

All use the LLC (Logical Link Control) protocol.

  • 802.1: Defines interface primitives.
  • 802.2: Defines the high-level data link layer.
  • 802.3: Uses 1-persistent CSMA/CD (Ethernet).
  • 802.4: Specifies the Token Bus method for medium access control.
  • 802.5: Specifies the Token Ring method for medium access control.

Popular 802.3 Standards

  • Ethernet: 10 Mbps
  • Fast Ethernet: 100 Mbps
  • Gigabit Ethernet: 1 Gbps
  • 10 Gigabit Ethernet: 10 Gbps

Wireless LANs (WLANs)

Two possible setups: with a base station (access point) and without (ad-hoc).

The IEEE 802.11 standard uses techniques like OFDM (Orthogonal Frequency Division Multiplexing).

802.16 provides service to buildings, but is not designed for mobility. 802.11 addresses mobility.