Show understanding of Ethernet and how collisions are detected and avoided

Resources | Subject Notes | Computer Science

A-Level Computer Science - Networks: Ethernet and Collisions

2.1 Networks including the internet

Ethernet: Introduction

Ethernet is the most common networking technology used in local area networks (LANs). It provides a reliable and relatively high-speed method for devices to communicate within a limited geographical area. This section will focus on the principles of Ethernet and how it handles collisions.

Ethernet Standards

Ethernet is defined by a set of standards, with the most prevalent being IEEE 802.3. These standards specify the physical and data link layers protocols.

Physical Layer: Cabling

Ethernet utilizes various types of cabling to transmit data. Common types include:

  • Twisted Pair Cable: Uses pairs of wires twisted together to reduce electromagnetic interference (EMI). Common types are UTP (Unshielded Twisted Pair) and STP (Shielded Twisted Pair).
  • Coaxial Cable: A single copper core surrounded by insulation, a braided shield, and an outer jacket. Less common now.
  • Fiber Optic Cable: Transmits data as light pulses, offering higher bandwidth and longer distances than copper cables.

Data Link Layer: MAC Addresses and Frames

At the data link layer, Ethernet uses MAC (Media Access Control) addresses to uniquely identify devices on the network. Data is transmitted in the form of frames.

A typical Ethernet frame contains:

  • Preamble and Start Frame Delimiter (SFD): Used for synchronization.
  • Destination MAC Address: The MAC address of the intended recipient.
  • Source MAC Address: The MAC address of the sending device.
  • EtherType: Indicates the protocol being used in the data portion of the frame (e.g., IPv4, IPv6).
  • Data (Payload): The actual data being transmitted.
  • Frame Check Sequence (FCS): Used for error detection.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

Early Ethernet implementations used CSMA/CD to manage access to the network medium. This method is crucial for understanding collision detection and avoidance.

CSMA stands for Carrier Sense Multiple Access. Devices listen to the network to see if it's currently in use. If the medium is idle, a device can transmit.

CD stands for Collision Detection. If two devices transmit simultaneously, a collision occurs. Both devices stop transmitting and detect the collision.

Collision Detection Explained

During transmission, a device continuously monitors the network medium. If the device detects that the signal strength is significantly lower than what it's transmitting, it indicates a collision has occurred. This is because the device is receiving a signal that is not its own.

Collision Handling

  1. Stop Transmitting: Both devices immediately stop transmitting data.
  2. Wait Randomly: Each device waits a random amount of time before attempting to retransmit. The random waiting time helps to reduce the probability of subsequent collisions.
  3. Retransmission: After the random wait, the devices attempt to retransmit the data.

The Collisison Window

The amount of time a device waits before retransmitting after a collision is determined by the collision window. This window is a random value chosen from a range of possible values.

Modern Ethernet: Switching

Modern Ethernet networks primarily use switches instead of hubs. Switches learn the MAC addresses of devices connected to their ports and forward data only to the intended recipient, reducing the likelihood of collisions and improving network efficiency. Switches operate in a full-duplex mode, allowing simultaneous transmission and reception.

Summary Table: CSMA/CD

Feature Description
Access Method Carrier Sense Multiple Access
Collision Detection Detects collisions during transmission
Collision Handling Stop transmitting, wait randomly, retransmit
Medium Access Devices listen before transmitting
Suggested diagram: A simple illustration showing two devices transmitting simultaneously, resulting in a collision, and the subsequent collision detection and handling process.