Skip to main content

Command Palette

Search for a command to run...

Ethernet

Published
โ€ข3 min read

๐Ÿ“˜ Ethernet

1) Concept

Ethernet is the most widely used wired communication standard in local area networks (LAN). It allows computers, servers, and embedded systems to exchange data over a shared network.

PC โ†” Switch โ†” Router โ†” Embedded Device โ†” Industrial Equipment

2) MAC + PHY Architecture

Ethernet is composed of two major functional blocks:

BlockRole
MAC (Media Access Control)Frame formatting, addressing, CRC; located inside the MCU/SoC
PHY (Physical Layer Transceiver)Converts digital signals to physical electrical signals and transmits through the cable

Typical embedded configuration:

MCU/SoC (with Ethernet MAC)
        โ†“ RMII / MII interface
External PHY chip (e.g., DP83848, LAN8720)
        โ†“
RJ45 Connector / Ethernet Cable

3) Cable & Data Rates

StandardSpeedCable Type
10BASE-T10 MbpsCAT3 / CAT5
100BASE-TX (Fast Ethernet)100 MbpsCAT5
1000BASE-T (Gigabit Ethernet)1 GbpsCAT5e / CAT6

In embedded devices, 100 Mbps (100BASE-TX) is the most common.


4) Data Unit: Ethernet Frame

Ethernet transmits data in frames:

[ Destination MAC | Source MAC | Type | Payload | CRC ]
  • MAC Address: 48-bit unique hardware identifier

  • Payload: Usually carries IP packets, ARP, VLAN frames, etc.

  • CRC ensures integrity and detects transmission errors


5) Ethernet Alone Is Not Enough (Layered Model)

Ethernet corresponds to the link layer. Real communication uses upper-layer protocols:

Application Layer  โ† HTTP / MQTT / Modbus-TCP / Custom Protocol
Transport Layer    โ† TCP / UDP
Network Layer      โ† IP
Link Layer         โ† Ethernet

Example use cases:

FunctionProtocol Stack
Web communicationHTTP over TCP/IP over Ethernet
Sensor data streamingUDP + Custom payload over Ethernet
Industrial controlModbus-TCP, PROFINET, EtherCAT, etc.

6) Role of Switches

Ethernet networks use switches with MAC address tables. The switch forwards frames only to the port where the destination MAC is located.

โ†’ Reduces collisions โ†’ Improves efficiency and scalability


7) Ethernet Workflow in Embedded Systems

Application generates data
        โ†“
TCP/UDP stack (e.g., lwIP, FreeRTOS+TCP) builds a packet
        โ†“
MAC encapsulates it into an Ethernet frame
        โ†“
PHY converts to electrical signal
        โ†“
Frame travels through the cable โ†’ switch โ†’ router โ†’ destination device

Reception is the reverse process.


8) Why Ethernet Is Widely Used

FeatureBenefit
Universal standardWorks everywhere
High bandwidth10/100/1000 Mbps+
Easy to expandJust add a switch
Flexible protocolsSupports TCP/UDP/IP and higher-layer systems