Show understanding of Ethernet and how collisions are detected and avoided

Resources | Subject Notes | Computer Science | Lesson Plan

2.1 Networks: Ethernet and Collision Detection/Avoidance

Introduction

This section explores the fundamental principles of Ethernet, a widely used networking technology, with a particular focus on how collisions are detected and mitigated. Understanding these mechanisms is crucial for comprehending network performance and troubleshooting.

Ethernet Basics

Ethernet is a family of networking technologies used for local area networks (LANs). It operates on the principle of transmitting data in frames over a shared medium or a dedicated connection.

Key components of an Ethernet network include:

  • Network Interface Card (NIC): The hardware interface between a computer and the network.
  • Cables: Typically twisted-pair copper cables (e.g., Cat5e, Cat6) or fiber optic cables.
  • Hubs (obsolete): Simple devices that broadcast all received data to all connected ports. Rarely used now.
  • Switches: More intelligent devices that learn MAC addresses and forward data only to the intended destination port.
  • Routers: Connect different networks together.

Collision Detection and Avoidance

In early Ethernet implementations, collisions were a significant concern. When two devices transmit data simultaneously over a shared medium, a collision occurs. Modern Ethernet uses switched networks to largely eliminate collisions, but understanding the collision mechanisms is important for historical context and understanding older network designs.

Collision Detection (CSMA/CD)

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was a common method for handling collisions in older Ethernet networks. Here's how it worked:

  1. Carrier Sense: Before transmitting, a device listens to the network to see if another device is currently transmitting.
  2. Start Transmission: If the network is idle, the device begins transmitting.
  3. Monitor for Collision: While transmitting, the device continuously monitors the network for a collision.
  4. Collision Detected: If a collision is detected (while transmitting), the device immediately stops transmitting, sends a jam signal to alert other devices, and waits a random amount of time before attempting to retransmit.

The process of detecting a collision involves observing the signal strength on the wire. A collision is indicated by a sustained high signal level.

Collision Avoidance (Switched Ethernet)

Modern Ethernet networks predominantly use switches, which significantly reduce the likelihood of collisions. Switches create dedicated connections between devices, eliminating the shared medium problem. Each port on a switch is connected to a different device, so simultaneous transmissions do not interfere with each other.

The use of switches eliminates the need for CSMA/CD and the associated collision detection mechanisms.

Collision Resolution (CSMA/CD - Historical Context)

When a collision occurred in a CSMA/CD network, the following steps were taken:

  1. Stop Transmitting: The transmitting devices immediately stop sending data.
  2. Jam Signal: Devices send a \"jam\" signal to alert other devices that a collision has occurred.
  3. Random Backoff: Each device waits a random amount of time before attempting to retransmit. The amount of time is chosen randomly from a range. This helps to avoid repeated collisions. The backoff time increases exponentially with each subsequent collision.

Table: Comparison of CSMA/CD and Switched Ethernet

Feature CSMA/CD Switched Ethernet
Medium Access Shared Medium Dedicated Connections
Collision Handling Collision Detection and Retransmission No Collisions (typically)
Complexity More Complex Simpler
Scalability Limited Scalability Highly Scalable

Conclusion

Ethernet's evolution from CSMA/CD to switched networks demonstrates the ongoing effort to improve network efficiency and reliability. While CSMA/CD is largely obsolete, understanding its principles provides valuable insight into the history of networking and the fundamental challenges of shared media.