Automotive Ethernet: The Master Guide

Automotive Ethernet

1. The Weight Problem

Before Ethernet, cars used massive harnesses. Modern cars generate 4TB of data per hour. We needed a cable that was light but fast.

Standard Ethernet (CAT5)

Too Heavy. 8 Wires. Noisy.

Auto Ethernet (100BASE-T1)

The Solution.

2 Wires. Full Duplex via PAM-3.

2. Switched vs Broadcast

Ethernet uses Switches to route data. CAN Bus just "shouts" to everyone. Click below to see the difference.

📷 Cam
🖥️ Screen
📡 Lidar
🔧 Engine
⚙️ SWITCH
System Ready...

3. The Automotive Frame

Click fields to explore. Note the VLAN Tag (Priority) which is critical for safety data.

Preamble7 Bytes
Dest/Src MAC12 Bytes
802.1Q (VLAN)4 Bytes
EtherType2 Bytes
Payload46-1500 B
FCS4 Bytes

Select a field above

Breakdown of the IEEE 802.3 frame structure.

4. Standard Comparison

Feature 100BASE-T1 1000BASE-T1 (Gigabit) Standard Ethernet
Wires 1 Pair (Unshielded) 1 Pair (Shielded/UTP) 4 Pairs (Twisted)
Speed 100 Mbps 1000 Mbps 100/1000 Mbps
Duplex Full (Echo Cancellation) Full (Echo Cancellation) Full (Dedicated Wires)
Max Distance 15m 15m / 40m 100m

5. The Automotive OSI Stack

Click each layer to see the Explanation and a Real-World Example.

L7 Application
High-Level Communication & Logic.
  • SOME/IP: Service-Oriented Middleware (RPC / Pub-Sub).
  • DoIP: Diagnostics over IP (ISO 13400) for flashing/coding.
  • DHCP: Dynamic IP assignment for new ECUs.
🚗 Car Example: The Rear View Camera (Server) sends a "New Video Frame Available" event to the Head Unit (Client).
L6 Presentation
Data Serialization & Formatting.
  • Serialization: Converting complex data (structs/classes) into a byte stream.
  • Endianness: Handling Big Endian vs Little Endian byte order.
🚗 Car Example: Converting the floating point value Speed = 50.5 km/h into the hex bytes 0x42 0x4A 0x00 0x00 for transmission.
L5 Session
Communication Management.
  • SOME/IP-SD: (Service Discovery) checks availability of services.
  • Session IDs: Tracking the state of a conversation between ECUs.
🚗 Car Example: The Cluster asks "Is the Engine Speed Service online?". The Engine replies "Yes, I am offering it."
L4 Transport
End-to-End Reliability.
  • UDP: Fast, Low Overhead. Used for real-time data (Video, Radar).
  • TCP: Reliable, Guaranteed Delivery. Used for large downloads (Flashing).
🚗 Car Example: Flashing a 500MB firmware update uses TCP to ensure 100% data integrity (Zero errors allowed).
L3 Network
Addressing & Routing.
  • IPv4 / IPv6: Assigns logical addresses (e.g., 192.168.1.50) to ECUs.
  • ICMP: Used for "Ping" commands to check if an ECU is alive.
🚗 Car Example: The Gateway routes a Diagnostic Request from the OBD Port (IP A) to the Engine ECU (IP B).
L2 Data Link
Switching & Traffic Priority.
  • MAC Address: Hardware ID for the switch to route frames.
  • VLAN (802.1Q): Tags frames with Priority (0-7) and Virtual LAN ID.
🚗 Car Example: Automatic Emergency Braking data is tagged with Priority 7 so it bypasses Netflix traffic (Priority 0).
L1 Physical
Hardware Signal Transmission.
  • 100BASE-T1: The standard for sending bits over copper.
  • PAM-3: Modulation scheme using 3 voltage levels (+1V, 0V, -1V).
🚗 Car Example: The Transceiver chip generates electrical pulses to send data 15 meters down an unshielded twisted pair cable.

6. SOME/IP: The "Netflix" of Cars

Why SOME/IP?

Traditional CAN (Radio): Broadcasts data blindly. Wastes bandwidth.

SOME/IP (Netflix): Service Oriented. You only get data if you subscribe.

1. Service Offer:
Server says "I have data."
2. Subscribe:
Client says "I want it."
3. Notify:
Data starts streaming.
🔧
Engine Idle
📟
Cluster Idle
Waiting for Service Offer...

7. SOME/IP and Service Discovery Service

A Service is defined by its Service Interface. This is comparable to a MOST Functional Block (FBlock) and may include:

Methods & Events

  • Methods: Can be with response (Request/Response) or without response (Fire&Forget).
  • Events: Message from Server to Client when something happens.

Fields & Eventgroups

  • Fields: Getter/Setter/Notifier of a property/status.
  • Eventgroups: A logical group of Events and Fields used for publish/subscribe handling.

Interactive Learning: Click the buttons below to visualize how data moves across different Service Interfaces.

💻
Client [C]
🗄️
Server [S]
Select an interface pattern to test...

8. SOME/IP Header Structure

Explore the structure of a SOME/IP packet.

Message IDService(16) + Method(16)
Length32 bit
Request IDClient(16) + Session(16)
VersionsProto(8) + IF(8)
Type & CodeMsg(8) + Ret(8)
Payload0+ Bytes

Select a field above

Breakdown of the SOME/IP specific payload encapsulation.

Packet Sizes Note: IPv4 + UDP is 1472 Bytes (without fragmentation). SOME/IP is 1416 Bytes (UDP). SOME/IP is 4095 Bytes (TCP). TCP could be longer, but CAN/FlexRay and AUTOSAR cannot.

9. SOME/IP Message Types

The "Message Type" field in the header defines the purpose of the packet.

Number Value Description
0x00 REQUEST A request expecting a response (even void).
0x01 REQUEST_NO_RETURN A fire&forget request.
0x02 NOTIFICATION A request of a notification/event callback expecting no response.
0x80 RESPONSE The response message.
0x81 ERROR The response containing an error.