Ethernet Networking

What is Ethernet?

Ethernet is a family of wired computer networking technologies commonly used in local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). It defines the most common method of computer network cable installation and a set of communication protocols used on these networks.

Developed by Robert Metcalfe at Xerox PARC in the 1970s, Ethernet has become the dominant standard for wired networking due to its reliability, speed, and cost-effectiveness. It operates primarily at the Data Link Layer (Layer 2) and Physical Layer (Layer 1) of the OSI model.

Key Components of Ethernet

Ethernet networks consist of several key components:

Ethernet Frame Structure

Data is transmitted over Ethernet in packets called frames. A standard Ethernet frame consists of the following fields:

Ethernet II Frame Format (Common)

  • Preamble & SFD: 7 bytes of alternating 1s and 0s (Preamble) followed by a Start Frame Delimiter (SFD) to synchronize the receiver.
  • Destination MAC Address: 6 bytes specifying the MAC address of the recipient.
  • Source MAC Address: 6 bytes specifying the MAC address of the sender.
  • EtherType/Length: 2 bytes indicating either the EtherType of the payload (e.g., IPv4, IPv6) or the length of the payload.
  • Payload (Data): 46 to 1500 bytes of actual data.
  • Frame Check Sequence (FCS): 4 bytes used for error detection (CRC).

The minimum frame size is 64 bytes, and the maximum is typically 1518 bytes (or 1522 bytes for VLAN-tagged frames).

MAC Addressing

Media Access Control (MAC) addresses are unique hardware identifiers assigned to each network interface controller (NIC). They are 48-bit numbers, usually represented as six groups of two hexadecimal digits, separated by colons or hyphens (e.g., 00:1A:2B:3C:4D:5E).

The first three octets (Organizationally Unique Identifier - OUI) are assigned by the IEEE to manufacturers, while the last three octets are assigned by the manufacturer to each individual device.

Note: MAC addresses are used for communication within a local network segment. For communication between different networks, IP addresses are used.

Ethernet Standards and Speeds

Ethernet standards have evolved significantly over the years, increasing speeds and improving efficiency:

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

In older, shared Ethernet environments (like those using hubs), CSMA/CD was a protocol used to manage access to the network medium. It works as follows:

  1. A device listens to the network to see if it's busy.
  2. If the network is free, the device sends its data.
  3. While sending, the device continues to listen for any "collisions" (when two devices transmit simultaneously).
  4. If a collision is detected, both devices stop transmitting, wait a random amount of time, and then try to resend.
Warning: CSMA/CD is largely obsolete in modern switched Ethernet networks, as switches prevent collisions by design.

Modern Ethernet

Today's Ethernet networks are almost exclusively based on switches. Switches allow for full-duplex communication, meaning devices can send and receive data simultaneously, dramatically increasing throughput and eliminating collisions.

Key advancements include: