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:
- Network Interface Cards (NICs): Also known as network adapters, these are hardware components that allow devices to connect to the network. Each NIC has a unique MAC address burned into its firmware.
- Cables: Various types of cables are used, most commonly Twisted Pair cables (like Cat5e, Cat6, Cat7) and Fiber Optic cables for longer distances and higher speeds.
- Connectors: RJ45 connectors are standard for Twisted Pair cables, while various connectors like LC and SC are used for Fiber Optic cables.
- Hubs and Switches:
- Hubs (obsolete): Devices that broadcast incoming data to all connected devices. Inefficient and prone to collisions.
- Switches: Intelligent devices that learn the MAC addresses of connected devices and forward data only to the intended recipient, significantly improving network performance.
- Routers: Devices that connect different networks and direct traffic between them, operating at Layer 3 of the OSI model.
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.
Ethernet Standards and Speeds
Ethernet standards have evolved significantly over the years, increasing speeds and improving efficiency:
- Ethernet (10BASE-T): 10 Mbps, using twisted pair cable.
- Fast Ethernet (100BASE-TX): 100 Mbps.
- Gigabit Ethernet (1000BASE-T): 1 Gbps (1000 Mbps).
- 10 Gigabit Ethernet (10GbE): 10 Gbps.
- 40 Gigabit Ethernet (40GbE), 100 Gigabit Ethernet (100GbE), and beyond: Higher speeds for data centers and high-performance networks, often using fiber optics.
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:
- A device listens to the network to see if it's busy.
- If the network is free, the device sends its data.
- While sending, the device continues to listen for any "collisions" (when two devices transmit simultaneously).
- If a collision is detected, both devices stop transmitting, wait a random amount of time, and then try to resend.
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:
- Full-Duplex Operation: Eliminates collisions by allowing simultaneous transmission and reception on separate communication paths.
- Auto-Negotiation: Devices automatically negotiate the highest possible speed and duplex mode supported by both ends.
- VLANs (Virtual LANs): Allows for logical segmentation of a physical network, improving security and manageability.
- Power over Ethernet (PoE): Delivers electrical power along with data over Ethernet cables, simplifying deployment for devices like IP phones, wireless access points, and cameras.