DoIP – ISO 13400
DoIP (Diagnostic over Internet Protocol) describes the transport protocol for using the Ethernet interface in the field of vehicle diagnostics. It is used in particular for data-intensive applications, such as flashing infotainment systems. The issue of cybersecurity—which is ubiquitous today—also has implications for DoIP. With new DoIP implementations, it is also possible to use certificates (TLS) to secure communication.
DoIP gateways are also frequently used to provide access to the vehicle’s internal, well-known bus systems (CAN, FlexRay, LIN, etc.). With DoIP, the familiar UDS diagnostic services are encapsulated and utilized via TCP/IP and Ethernet.

Overview
Before communication can take place via the vehicle’s Ethernet interface, the Ethernet interface must be activated by a signal from the tester. This is also referred to as Ethernet activation; PIN 8 of the OBD connector is often used for this purpose.
When establishing a connection, each DoIP control unit generates a Vehicle Announcement Message (VAM) after an IP address has been assigned. In this process, the control unit or gateway transmits information regarding the Vehicle Identification Number (VIN), the UDS diagnostic address of the control unit/gateway, and other hardware information multiple times via UDP. All DoIP control units are required to repeat Vehicle Announcement Messages if the tester sends a request to do so in the form of a VIR (Vehicle Identification Request).
These two messages are exchanged as broadcasts, while the actual diagnostic communication takes place over “normal” TCP connections.
To facilitate this communication, the DoIP protocol provides mechanisms that ensure the relatively short diagnostic messages from the control units interact effectively with the characteristics of Ethernet communication. For example, by default, Ethernet bundles multiple messages together—provided they fit within an MTU—to achieve efficient transmission (Nagle algorithm). However, this behavior would be counterproductive for short diagnostic messages and their timing. Further details are described in ISO 13400.

If the DoIP control unit is a gateway, the tester sends a Routing Activation Request to it. This instructs the gateway to forward subsequent requests to the control units. Using the gateway’s UDS diagnostic address, it is possible to address a specific gateway. By using additional parameters, login and authentication mechanisms can also be utilized.
