Learn IVN and V2X
(In-Vehicle Networking, focus Automotive Ethernet)
"Ethernet has been around for 40 years, what took the automotive world so long?"
Quote from the founder of Ethernet, Bob Metcalfe.
The main concern back in September 2011 was that transmitting Ethernet packets at 100 Mbps over a single Unshielded Twisted Pair (UTP) cable would not be possible under the harsh automotive electromagnetic conditions. At this period in time, it was still BroadR-Reach and neither was published in the OPEN Alliance or by IEEE. At this period in time BMW was the only one seriously interested in Ethernet. BMW had been in production with 100BASE-TX (shielded cabling) for diagnostics and flash updates for three years and had decided to go into production in 2013 with what is now called 100BASE-T1 in its new surround view system.
Key drivers and advantages identified with Automotive Ethernet are the very high bandwidth compared to existing technologies and worldwide adopted technology. The non-proprietary technology (ISO/OSI model) provides availability to second-sources, worldwide IP-based know-how of developers and tools.
Techteal offer various types of professional trainings, off- or on-site, such as:
In addition, there are product specific trainings.
Ethernet resides within the OSI model. The OSI model is a conceptual model that standardizes the communication functions of a computing system without regard to its underlying internal structure and technology. The model partitions a communication system into abstraction layers.
Ethernet was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3, and has since retained a good deal of backward compatibility and been refined to support higher bit rates.
Systems communicating over Ethernet divide a stream of data into shorter pieces called frames. Each frame contains source and destination addresses, and error-checking data so that damaged frames can be detected and discarded; most often, higher-layer protocols trigger re-transmission of lost frames. As per the OSI model, Ethernet provides services up to and including the data link layer (OSI layer 2).
Common protocols in Automotive
The picture below shows the most commonly used protocols in Automotive. All of them are open and are adopted of several other industries than Automotive, such as Industrial, Medical and IT in general.
Common protocols in Automotive
Layer 1 (Physical)
The lack of interest of the automotive industry in Ethernet as next generation networking standard was partly caused by the lack of a physical layer suitable for the usage in vehicles.
The BroadR-Reach technology (from Broadcom) allowing the usage of unshielded twisted-pair cable and makes Ethernet cost competitive for automotive applications.
How BroadR-Reach became IEEE 100Base-T1
IEEE 100Base-T1 (same as IEEE 802.3bw) is the IEEE's specification for 100-Mb/s Automotive Ethernet. The "-T1" appendage is an important distinction that lets you know the name refers to Automotive Ethernet, which is distinct from 100Base-T.
The -T1 variant is interoperable with OPEN Alliance BroadR-Reach. They’re very nearly identical (the names are often used interchangeably), with two small exceptions. In the physical-layer electrical (physical medium attachment or PMA) test suite, the 100Base-T1 specification defines a test for the maximum Transmit Peak Differential Output. This parameter isn’t explicitly defined in the BroadR-Reach specification. The second exception is that the 100Base-T1 specification has some differences in the protocol timing for wakeup commands to make those periods shorter. Those are the only differences worth noting, though.
The white paper 100BASE-T1 Ethernet: the evolution of automotive networking discusses very well the 100BASE-T1 in-depth from a PHY perspective, clarifying how 100BASE-T1 meets automotive system requirements of low EMI, low cost, reduced cabling weight and higher bandwidth.
Example of commonly used connectors in Automotive are for example from vendors Tyco (MATenet, NanoMQS), Rosenberger (H-MTD), Aptiv (AMEC, H-MTD (2nd source)), Molex (Mini50) and JAE (MX77).
Tyco, Rosenberger and Aptiv are example of vendors having connectors for both 100BASE-T1 and 1000BASE-T1 and also having support for both unshielded and shielded cables. Molex and JAE has to our knowledge only support for unshielded 100BASE-T1.
All vendors above have a connector called HSD (originally from Rosenberger) that support from 100 Mbits and up to 10 Gbits, but only for shielded cables.
Layer 2 (Data Link)
The data link layer provides the functional and procedural means to transfer data between network entities and might provide the means to detect and possibly correct errors that may occur in the physical layer.
The data link layer is concerned with local delivery of frames between nodes on the same level of the network. Data-link frames, as these protocol data units are called, do not cross the boundaries of a local area network. Inter-network routing and global addressing are higher-layer functions, allowing data-link protocols to focus on local delivery, addressing, and media arbitration. In this way, the data link layer is analogous to a neighborhood traffic cop; it endeavors to arbitrate between parties contending for access to a medium, without concern for their ultimate destination.
Ethernet, IEEE 802.3 defines the frame formats or frame structures that are developed within the MAC layer of the protocol stack.
( 2 bytes)
Source MAC address
Destination MAC address
( 4 bytes)
The basic Ethernet frame in use today is referred to as the Ethernet type II frame. This is the frame format developed by the layer 2 elements of the stack, and this is then passed to the layer 1 physical layer to put it into the format for sending.
Essentially the same frame structure is used for the different variants of Ethernet, although there are some changes to the frame structure to extend the performance of the system should this be needed.
With the high speeds and variety of media used, this basic format sometimes needs to be adapted to meet the individual requirements of the transmission system, but this is still specified within the amendment / update for that given Ethernet variant.
A general summary of the Ethernet, IEEE 802.3, data frame format or structure and how Ethernet data frames are sent can be found in this article.
A new device in the Automotive IVN is a switch. Switches provide a separate connection for each node. Essentially, a switch creates a series of instant networks that contain only the two devices communicating with each other at that particular moment.
First some short explanations of abbreviations you probably come across:
Network Interface Card (NIC) - Most devices is connected to a network through an NIC, often plugged into a slot on the computer's motherboard
Media Access Control (MAC) address - This is the physical address of any device -- such as the NIC -- on the network. The MAC address, which is made up of two equal parts, is 6 bytes long. The first 3 bytes identify the company that made the NIC. The second 3 bytes are the serial number of the NIC itself
Unicast - A unicast is a transmission from one node addressed specifically to another node
Multicast - In a multicast, a node sends a packet addressed to a special group address. Devices that are interested in this group register to receive packets addressed to the group
Broadcast - In a broadcast, a node sends out a packet that is intended for transmission to all other nodes on the network.
Switching allows a network to maintain full-duplex Ethernet. Before switching, Ethernet was half-duplex, which means that data could be transmitted in only one direction at a time. In a fully switched network, each node communicates only with the switch, not directly with other nodes. Information can travel from node to switch and from switch to node simultaneously. In other words, traffic flowing in each direction has a traffic lane to itself. This allows nodes to transmit to the switch as the switch transmits to them -- it's a collision-free environment. Possible congestion however may occur in the switch itself competing on the very same resources, i.e. outbound links.
Automotive has mostly chosen to go for Layer 2 switching (compare to Layer 3 routing). A Layer 2 switch is primarily responsible for transporting data on a physical layer and in performing error checking on each transmitted and received frame. A Layer 2 switch requires MAC address of NIC on each network node to transmit data. They learn MAC addresses automatically by copying MAC address of each frame received, or listening to devices on the network and maintaining their MAC address in a forwarding table. This also enables a Layer 2 switch to send frames quickly to destination nodes. However, like other layer switches (3,4 onwards), a Layer 2 switch cannot transmit packet on IP addresses and don’t have any mechanism to prioritize packets based on sending/receiving application.
Virtual Local Area Network (VLAN IEEE 802.1Q) - tracing the communication
At its time of conception in the 80s, the purpose of VLANs was to allow multiple separate logical networks to communicate over a link shared between these separate networks. Since this work was done many years ahead of the initial version of the 802.1Q standard and predated the point to point based nature of today’s MAC and Physical layer (PHY) standards, the communication was done as broadcasts on a single collision domain, very similar to a traditional, bus-based backbone in the automotive world. By the introduction of the VLAN concept, which was accomplished by adding an additional header to each frame, bridges could easily determine what frames were of interest to relay into each separate network by looking if they were members of the group denoted by the header.
This construct allowed for large networks consisting of sub networks to communicate
efficiently, without the cost or penalties that would be needed to route traffic using IP, and for network sizes that would be impossible to fit in the addressing tables of the network equipment at the time. The header that was introduced is what evolved into what today is known as the VLAN tag.
A look at current and emerging Automotive VLAN use-cases are found in Time Critical Networks (TCN's) report from 2018 called State of VLAN in the Automotive Domain.
Basic Ethernet frame
Layer 3 (Network)
Layer 3 is responsible for all packet forwarding between intermediate routers, as opposed to Layer 2 (the data link layer), which is responsible for media access control and flow control, as well as error checking of Layer 1 processes.
Layer 3 provides the network’s routing and switching technologies that create logical paths known as Virtual Circuits (VC), which are used for the transmission of data between network nodes. The main functions of Layer 3 include routing and forwarding, as well as internetworking, addressing, packet sequencing, congestion control and further error handling.
There are several protocols use on Layer 3 where Automotive mainly are interested in:
Internet Protocols IPv4/IPv6 -
The first major version of IP, Internet Protocol Version 4 (IPv4), is the dominant protocol of the Internet. Its successor, Internet Protocol Version 6 (IPv6), has been growing in adoption, reaching almost 25% of all Internet traffic as of October, 2018
Address Resolution Protocol (ARP) -
ARP is a low-level network protocol for translating network layer addresses into link layer addresses. ARP lies between layers 2 and 3 of the OSI model, although ARP was not included in the OSI framework and allows computers to introduce each other across a network prior to communication.
More information about ARP
Before two NICs communicate, each must know the other’s relative IP or MAC addresses. If NIC A only has NIC B’s MAC address, NIC A can reveal its IP address by sending an ARP request to NIC B. NIC B may then reply by attaching its IP address with ARP to NIC A. This simple address translation and exchange process is the primary role of ARP.
ARP tables can be stored to increase transmission rates by keeping track of addresses known to the network and transmitting any MAC or IP address changes via ARP.
There is no authentication required at this level, so spoofing of IP and MAC addresses is possible. Additional software may be required to police the ARP tables and prevent malicious user attacks.
Layer 4 (Transport)
Layer 4, known as the Transport layer, provides the transparent transmission or transfer of data between end systems or hosts and is responsible for end-to-end error recovery, as well as flow control. The transport layer ensures complete data transfers.
Layer 4 contains the creation of data packets from raw data and the addition of source and destination specifics like port numbers. Working together with destination IP addresses, these ports form a network socket or simply the identification address of the process-to-process communication (used in Layer 5).
There are several protocols on Layer 4 where Automotive are interested in:
User Datagram Protocol (UDP) -
The most common protocol is UDP uses a simple connectionless communication model with a minimum of protocol mechanisms. UDP provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram. It has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection
Transmission Control Protocol (TCP) -
TCP is one of the most used protocols in digital network communications and is part of the Internet Protocol Suite, commonly known as the TCP/IP suite. Primarily, TCP ensures end-to-end delivery of data between distinct nodes. TCP works in collaboration with Internet Protocol (IP), which defines the logical location of the remote node, whereas TCP transports and ensures that the data is delivered to the correct destination. Before transmitting data, TCP creates a connection between the source and destination node and keeps it live until the communication is active. TCP breaks large data into smaller packets and also ensures that the data integrity is intact once it is reassembled at the destination node.
Internet Control Message Protocol (ICMP) -
ICMP provides troubleshooting, control and error message services. ICMP basically transmits error messages found in IP datagrams. These errors are reported to the originating datagram's source IP address. An ICMP message is encapsulated directly within a single datagram and reports errors in the processing of datagrams.
Layer 5,6 & 7 (Session, Presentation & Application)
Layer 5, the Session layer manages a session by initiating the opening and closing of sessions between end-user application processes. This layer also controls single or multiple connections for each end-user application, and directly communicates with both the presentation and the transport layers. The services offered by the session layer are generally implemented in application environments using remote procedure calls (RPCs).
Layer 6, the Presentation layer is responsible for the following:
The Presentation layer mainly translates data between the application layer and the network format. Data can be communicated in different formats via different sources. Thus, the Presentation layer is responsible for integrating all formats into a standard format for efficient and effective communication.
Layer 7, The Application layer interacts directly with the application which is responsible for displaying images and data to the user as a human-recognizable format in order to allow the user to interface with Layer 6, the Presentation layer. Do note that both OSI and TCP/IP both use the same term for their respective highest level layer, the detailed definitions and purposes are different:
In TCP/IP, the Application layer contains the communications protocols and interface methods used in process-to-process communications across an IP network. The Application layer only standardizes communication and depends upon the underlying transport layer protocols to establish host-to-host data transfer channels and manage the data exchange in a client-server or peer-to-peer networking model. Though the TCP/IP Application layer does not describe specific rules or data formats that applications must consider when communicating, the original specification (in RFC 1123) does rely on and recommend the robustness principle for application design.
In the OSI model, the definition of the application layer is narrower in scope. The OSI model defines the Application layer as the user interface responsible for displaying received information to the user. In contrast, the Internet Protocol Suite does not concern itself with such detail. OSI also explicitly distinguishes additional functionality below the Application layer, but above the transport layer at two additional levels: the Session layer, and the Presentation layer. OSI specifies a strict modular separation of functionality at these layers and provides protocol implementations for each layer.
DHCP (Dynamic Host Configuration Protocol) is a protocol used to provide quick, automatic, and central management for the distribution of IP addresses within a network. DHCP is also used to configure the proper subnet mask, default gateway, and DNS server information on the device.
DoIP (Diagnostic over IP) is the automotive diagnostics protocol based on IP. Defined by ISO 13400-2 standard, DoIP facilitates diagnostics related communication between external test equipments and automotive ECU using IP, TCP and UDP. DoIP also supports communication between on-board and off-board diagnostic systems of a vehicle.
Because DoIP enables access to the vehicle electronic components (a.k.a Automotive ECU) through Internet, it becomes possible to fetch diagnostic data from vehicle remotely, without requiring physical access to the vehicle. In simple words, DoIP stack serves as a gateway.
SOME/IP (Scalable service-Oriented MiddlewarE over IP) is an automotive middleware solution that can be used for control messages. It was designed from beginning on to fit devices of different sizes and different operating systems perfectly. This includes small devices like cameras, AUTOSAR devices, and up to head units or telematics devices. It was also made sure that SOME/IP supports features of the Infotainment domain as well as that of other domains in the vehicle, allowing SOME/IP to be used for MOST replacement scenarios as well as more traditional CAN scenarios.
Interesting middleware features to follow:
SOME/IP Service Discovery (SD) – dynamically finding and functionality and configuring its access
SOME/IP Transport Protocol (SOME/IP-TP) – segment larger SOME/IP messages on UDP.
In version 4.2.1 of AUTOSAR IPv6 has been added. It has support for DHCP v4 and DHCP v6. SOME/IP and Ethernet time synchronization (PTP module) has also been added.
In addition that a vehicle will be a node in a V2X network and that Ethernet is a fairly new communication technology within the vehicle, cyber security is very important to address in the design of the IVN. It is advisable to keep in mind that whatever protection you choose it has to be updated regularly, generally within maximum 4 years.
Do find the basics at https://en.wikipedia.org/wiki/Automotive_security
More will come - Don't hesitate feed back your experience on this page
Additional topics that are planned to be covered:
Start-up & Shut down
UDP-NM (Network Management)
Timing and QoS
Some applications running on your network are sensitive to delay. These applications commonly use the UDP protocol as opposed to the TCP protocol. The key difference between TCP and UDP as it relates to time sensitivity is that TCP will retransmit packets that are lost in transit while UDP does not.
If your network has plenty of bandwidth and no traffic that bursts above what it can handle, you won't have a problem with packet loss, delay or jitter. But in many networks, there will be times where links become overly congested to the point where routers and switches start dropping packets because they are coming in/out faster that what can be processed. If that's the case, your streaming applications are going to suffer. This is where Quality of Service (QoS) comes in.
QoS helps manage packet loss, delay and jitter on your network infrastructure. Since we're working with a finite amount of bandwidth, our first order of business is to identify what applications would benefit from managing these three things.
There are various protocols to handle timing and QoS in Ethernet. There are several ways to identify or mark the traffic that need priority. Class of Service (CoS) will mark a data stream in the layer 2 frame header. Various applications can be marked differently, which allows the network equipment to be able to categorize data into different groups.
The Real-time Transport Protocol (RTP) is a network protocol for delivering audio and video over IP networks. RTP typically runs over UDP. RTP is used in conjunction with the RTP Control Protocol (RTCP). While RTP carries the media streams (e.g., audio and video), RTCP is used to monitor transmission statistics and quality of service (QoS) and aids synchronization of multiple streams. RTP/RTCP on UDP is not deterministic and is rather old and it is recommend to consider Ethernet AVB (TSN standards).
The Time-Sensitive Networking (TSN) standards define mechanisms for the time-sensitive transmission of data over Ethernet networks. TSN is a set of different standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group, formed 2012 by renaming the existing Audio Video Bridging Task Group.
As an example, a central component of the TSN standards is called Time-Aware Scheduler (TAS) and without the TAS, low-priority traffic could delay high-priority traffic at each Ethernet switch along the transmission path, causing unnecessary and undesired interruptions. The reason for this is that Ethernet frames cannot overtake each other – even if one frame has a higher priority than others.
The TAS allows for time-critical and background data to share the same network. TAS allows assigning specific time slots to best-effort and high-priority Ethernet traffic, where only one traffic group (either high priority or background) can use the network at defined points in time. For you it means that you'll get guaranteed delivery at a well-defined point in time for time-critical traffic, while background traffic can utilize the remaining available bandwidth.
Vehicle-to-everything (V2X) communication is the passing of information from a vehicle to any entity that may affect the vehicle, and vice versa. There are two types of V2X communication technology depending on the underlying technology being used; Wifi-based, and Cellular-based.
IEEE first published the specification of Wifi-based V2X (IEEE 802.11p) in 2012. It supports direct communication between vehicles (V2V) and between vehicles and infrastructure (V2I). This technology is referred to as Dedicated Short Range Communication (DSRC). DSRC uses the underlying radio communication provided by 802.11p and known in the US as Wireless Access in Vehicular Environments (WAVE) and in Europe as ITS-G5.
In June 2017, 3GPP completed the standardisation of Cellular Vehicle-to-Everything
(C-V2X) technology. Based on LTE (and 5G in the future), this cellular technology is designed to connect vehicles to each other, to roadside infrastructure, to other road-users and to cloud-based services.
C-V2X has several key advantages over wifi-based technologies. It can:
Leverage the comprehensive coverage of secure and well-established cellular (LTE) networks
Enable highly reliable, real-time communication at high speeds and in high-density traffic
Support both short-range and long-range transmissions between vehicles and roadside infrastructure
It is part of the roadmap to 5G connectivity.
Combining secure wide area and short-range connectivity in one module, C-V2X is a versatile and cost-effective solution for automakers looking to improve road safety.
Crucially, C-V2X leverages the robust security built into cellular networks.
C-V2X employs two complementary transmission modes:
Direct communications between vehicles, between vehicles and infrastructure, and vehicles and other road users, such as cyclists and pedestrians. In this mode, C-V2X works independently of the cellular networks
Network communications, in which C-V2X employs the conventional mobile network to enable a vehicle to receive information about road conditions and traffic in the area.
Sources & References:
Automotive Ethernet, 2nd Edition, 2017, by Kirsten Matheus, BMW and Thomas Königseder, Technica Engineering
Automotive Software Architectures: An Introduction, 2017, by Miroslaw Staron
State of VLAN in the Automotive Domain, 2018, by Patrik Thunström, TCN
Time-Sensitive Networking For Dummies, 2018, a Belden/Hirschmann Special Edition
Cellular Vehicle-to-Everything (C-V2X) pdf, by GSMA