Securing the In-Vehicle Network: MACsec, Firewalls and ISO/SAE 21434

March 10, 2026 5 min read Insights
Server rack with a dense mass of network cables
Photo: Kim Scarborough / Wikimedia Commons, CC BY-SA 2.0

The more a vehicle is connected — to the cloud, to chargers, to phones, to other vehicles — the more its internal network becomes a target. Multi-Gig Ethernet brings enormous capacity into the car, and with it a responsibility: every link, switch and endpoint must be designed to resist attack. This article outlines a defense-in-depth approach for in-vehicle Ethernet and how it maps to regulation.

Key takeaways

  • Regulation now requires cybersecurity management for new vehicles in many markets (UN Regulation No. 155) and engineering per ISO/SAE 21434.
  • MACsec (IEEE 802.1AE) authenticates — and can encrypt — every Ethernet frame between neighbouring nodes at line rate.
  • Segmentation (VLANs), switch firewalls, per-stream policing and intrusion detection limit what an attacker can reach.
  • Security starts at boot: secure boot, hardware security modules and protected keys anchor trust.

The regulatory backdrop

UN Regulation No. 155 (UN R155) requires vehicle manufacturers in participating markets to operate a certified Cyber Security Management System and to demonstrate that vehicle types are protected against identified threats; UN R156 covers software update management. ISO/SAE 21434, “Road vehicles — Cybersecurity engineering”, defines the engineering process: threat analysis and risk assessment (TARA), cybersecurity goals and requirements, verification and validation, and post-production monitoring. The in-vehicle network is central to many identified threats — spoofing of messages, tampering with sensor data, denial of service and lateral movement from a compromised ECU.

Threats to in-vehicle Ethernet

Threat Example Mitigations
Spoofing A compromised ECU sends fake brake or camera data MACsec, message authentication, switch ingress filtering
Tampering Device inserted into a harness alters traffic MACsec integrity protection, link monitoring
Eavesdropping Interception of personal or proprietary data MACsec encryption, TLS at higher layers
Denial of service Flooding the backbone Per-stream policing (802.1Qci), rate limits, segmentation
Lateral movement From infotainment to safety domain VLAN segmentation, firewalls in switches and gateways
Persistence Malicious firmware on an ECU Secure boot, signed updates (UN R156), attestation

MACsec: security at the link layer

MACsec, standardized in IEEE 802.1AE, protects Ethernet frames hop by hop. Each protected frame carries a security tag and an integrity check value computed with AES-GCM; optionally the payload is encrypted. Because MACsec operates at Layer 2, it protects all traffic on a link — IP, AVTP video, SOME/IP, diagnostics — without changes to applications. Modern automotive PHYs and switches implement MACsec in hardware at full Multi-Gig line rate with minimal added latency.

Key management

MACsec needs keys. IEEE 802.1X defines the MACsec Key Agreement protocol (MKA), which uses pre-shared or derived connectivity association keys to distribute and rotate session keys. In vehicles, long-term keys are typically provisioned at the end of line and stored in a hardware security module; MKA then establishes sessions automatically at every start-up. The design must balance security with fast network start-up.

Authentication-only or encryption?

Many automotive use cases need integrity and authenticity more than confidentiality: it matters that a camera frame is genuine, less that it is secret. Authentication-only (integrity) mode keeps payloads in clear text for diagnostics while preventing tampering. Encryption is applied where privacy or intellectual property is at stake.

Why not only TLS or IPsec?Higher-layer protocols protect specific applications end to end and remain useful. MACsec complements them by protecting every frame on every link, including non-IP traffic such as IEEE 1722 sensor streams.

Segmentation and firewalls

Not every ECU needs to talk to every other ECU. VLANs divide the physical network into logical segments — for example safety, body, infotainment and diagnostics — and switches forward frames only within allowed segments. Automotive switches increasingly include Layer 2–4 firewall functions: access-control lists that check addresses, protocols and ports at line rate. Central gateways or zone controllers enforce policies between domains and towards external interfaces such as the telematics unit or the diagnostic connector.

Policing, monitoring and intrusion detection

TSN per-stream filtering and policing (IEEE 802.1Qci) limits each stream to its expected rate and timing, containing faulty or compromised nodes — see TSN in the vehicle. On top of that, intrusion detection systems (IDS) monitor traffic patterns, unexpected addresses, protocol violations and timing anomalies. Switches can mirror or summarize traffic for a host-based IDS, and security events are reported to the vehicle security operations centre as required for post-production monitoring under ISO/SAE 21434.

Secure boot and trusted firmware

Network protection is only as strong as the devices it connects. Every switch, PHY with integrated processor, zone controller and computer should verify the signature of its firmware at start-up (secure boot), store keys in a hardware security module or secure element, and accept only signed and authorized updates. Debug interfaces must be locked in production.

Security by design in the architecture

  • Minimize the attack surface: disable unused ports and services.
  • Apply least privilege to communication: allow-list flows, deny everything else.
  • Separate safety-critical and non-critical traffic physically or logically.
  • Protect sensor links — spoofed camera images are a credible threat for automated driving. Asymmetrical Ethernet sensors can use MACsec like any other node.
  • Plan for crypto agility and key rotation over a fifteen-year vehicle life.
  • Log securely and support forensic analysis.

Performance considerations

Hardware MACsec adds a few bytes per frame (security tag and integrity check value) and a small fixed latency. At Multi-Gig speeds the overhead is negligible for large frames but noticeable for very small control frames; designers include it in bandwidth budgets. Key exchange time affects network start-up and must be considered for fast-wake requirements.

Frequently asked questions

Is MACsec mandatory?

No standard mandates MACsec specifically, but UN R155 and ISO/SAE 21434 require appropriate mitigations for identified risks, and MACsec is a widely adopted solution for link-level protection.

Does MACsec work across switches?

MACsec is hop-by-hop: each link has its own security association, and switches decrypt and re-protect frames. Switches therefore must be trusted and secured themselves.

Does the NAV Alliance address security?

Creating procedures and specifications to ensure interoperability, security and reliability of the network is one of the alliance’s founding objectives. Learn more about the alliance.

Updated November 2026. This article is informational and not legal or compliance advice.

NAV Alliance Editorial Team
Technical content prepared with input from NAV Alliance working-group experts. Questions? Contact us.

Related reading