DoIP — Diagnostics over Internet Protocol
Diagnostics over Internet Protocol (DoIP) provides a way to exchange automotive diagnostic messages over IP-based networks. It is standardized in the ISO 13400 series and is used in vehicle architectures that support Ethernet-based diagnostics.
DoIP and Unified Diagnostic Services (UDS) have different responsibilities. UDS defines diagnostic services and their application-level behavior. DoIP provides the transport and network-level mechanisms used to carry diagnostic messages between a tester and a vehicle or ECU.
A typical diagnostic path can involve an external tester, an Ethernet connection, a DoIP entity in a vehicle gateway, and one or more target ECUs. The exact architecture depends on the OEM design: the DoIP entity may be integrated into a gateway or diagnostic-capable ECU, and diagnostic messages may be routed to an ECU that is not directly connected to the tester's Ethernet link.
Standards note: ISO 13400 is a standards series with multiple parts and editions. This article explains common engineering concepts, not a substitute for the controlled standard. Confirm message support, protocol version, timing, addressing, security requirements and OEM-specific behavior against the exact project baseline.
1. Where DoIP fits in the diagnostic architecture
A diagnostic tester does not communicate with an ECU through a single undifferentiated protocol. Several layers work together.
| Layer / component | Responsibility | Example |
|---|---|---|
| Diagnostic application | Defines the diagnostic operation requested by the tester | Read data, clear diagnostic information, routine control |
| UDS | Defines diagnostic services, request parameters and diagnostic responses | Diagnostic Session Control, ReadDataByIdentifier |
| DoIP | Carries diagnostic messages and manages diagnostic communication paths | Routing activation and diagnostic message transport |
| IP and transport | Provides network addressing and transport connections | IP, UDP and TCP as used by the applicable DoIP procedure |
| Ethernet | Transfers frames over the vehicle network | MAC addresses, switch ports and VLANs |
| Physical layer | Provides the electrical Ethernet link | Automotive Ethernet PHY, transceiver and cable |
The important distinction is that a DoIP connection can be working while a UDS request is rejected by the ECU. Likewise, an ECU may support a UDS service over another transport but not be reachable through the current DoIP route.
1.1 Typical system elements
- Diagnostic tester: The external or in-vehicle tool that initiates vehicle identification and diagnostic communication.
- DoIP entity: The vehicle-side component implementing DoIP communication. It may provide access to local or downstream diagnostic targets.
- Gateway: Routes diagnostic communication between network segments where the vehicle architecture requires it. The gateway and DoIP entity may be integrated.
- Target ECU: The ECU whose diagnostic application processes the UDS request.
- Ethernet network: The physical and switched network connecting the tester, DoIP entity and relevant vehicle components.
Not every vehicle uses the same topology. Some ECUs may be directly reachable through an Ethernet switch, while others are accessed through a gateway that routes diagnostic messages to another network.
2. DoIP communication paths: UDP and TCP
DoIP uses IP networking, but not every stage of a diagnostic workflow uses the same transport behavior.
A common pattern is:
- UDP: Used for vehicle discovery and identification mechanisms defined by the applicable DoIP procedure.
- TCP: Used for the diagnostic communication connection, including routing activation and diagnostic message exchange in common DoIP implementations.
The exact supported message types and connection behavior must be checked against the applicable ISO 13400 edition and vehicle profile.
| Engineering activity | Common transport context | What to verify |
|---|---|---|
| Vehicle discovery / identification | UDP | Correct network interface, discovery procedure and response visibility |
| Vehicle announcement | UDP | Whether the entity announces itself as configured by the vehicle |
| Diagnostic connection | TCP | Connection establishment, endpoint and connection state |
| Routing activation | TCP diagnostic connection | Request parameters and activation response |
| Diagnostic message exchange | TCP diagnostic connection | Logical addresses, message framing and UDS payload |
Do not infer that a successful UDP discovery proves the TCP diagnostic path is available. Similarly, a successful TCP connection does not prove that routing activation has been accepted.
3. Vehicle discovery and identification
Discovery helps a tester identify a reachable DoIP entity or vehicle on the connected IP network. Depending on the architecture and procedure, the tester may send a vehicle identification request and receive a response. A vehicle may also transmit an announcement according to its configured behavior.
Discovery is not the same as opening a diagnostic session in the ECU. It identifies or locates a DoIP communication endpoint; it does not by itself establish a diagnostic route or execute a UDS service.
3.1 Discovery checks
When discovery does not work, inspect:
- Whether the tester is connected to the intended physical network.
- Whether the tester's IP configuration is compatible with the vehicle network.
- Whether the discovery request is transmitted on the intended interface.
- Whether UDP traffic is allowed by the test setup, switch configuration and network security policy.
- Whether the vehicle's DoIP entity is powered and configured to respond.
- Whether the response is visible at the tester's capture point.
- Whether multiple network interfaces or vehicle segments could cause the tester to use the wrong path.
A packet capture is useful because it separates “the tester did not transmit” from “the vehicle did not respond” and “the response did not reach the tester.”
3.2 Discovery is not diagnostic routing
A common integration mistake is to treat a visible vehicle identification response as proof that the tester can already send UDS requests. Discovery and diagnostic routing are separate steps. The tester still needs to establish the diagnostic communication path and complete the routing-activation procedure required by the vehicle profile.
4. DoIP generic message structure
DoIP messages use a generic header followed by a payload. The header allows the receiver to identify the protocol version context, determine the message type and determine the payload length.
The generic header contains these fields:
| Header field | Purpose |
|---|---|
| Protocol version | Identifies the DoIP protocol version used by the message |
| Inverse protocol version | Provides the corresponding inverse value used for header consistency checking |
| Payload type | Identifies the kind of DoIP message carried in the payload |
| Payload length | Specifies the number of payload bytes that follow the generic header |
The generic header is followed by the message-specific payload. The payload layout depends on the payload type: a vehicle-identification message, routing-activation message and diagnostic message do not carry the same fields.
4.1 Why the payload length matters
The payload length is important when decoding a trace or implementing a DoIP parser. A receiver must use the message framing information to determine where the current message ends and the next message begins.
For a diagnostic implementation, verify that:
- The generic header is complete before parsing the payload.
- The payload type is supported by the implementation and current state.
- The declared payload length is consistent with the received data.
- The receiver handles incomplete data and messages split across TCP segments.
- The receiver does not assume that one TCP segment always contains exactly one complete DoIP message.
TCP is a byte stream. Application message boundaries must be reconstructed using the protocol's framing information, not inferred from packet boundaries.
5. Routing activation
Routing activation establishes or authorizes the diagnostic routing relationship between a tester and the DoIP entity. It is a key step between basic IP connectivity and diagnostic message exchange.
A common sequence is:
- The tester establishes the required TCP connection to the DoIP entity.
- The tester sends a routing-activation request containing its source logical address and the activation information required by the selected procedure.
- The DoIP entity checks the request against its supported activation behavior and configured conditions.
- The DoIP entity returns a routing-activation response indicating the outcome.
- If activation is accepted, the tester can proceed with diagnostic message exchange subject to the vehicle's routing and addressing rules.
The exact activation types, reserved fields, OEM-specific data and response codes must be taken from the applicable standard edition and OEM profile. Do not copy byte values from a different vehicle program without confirming that they apply.
5.1 What can cause routing activation to be rejected?
Potential causes include:
- The tester uses a source logical address that is not accepted by the vehicle configuration.
- The requested activation type is unsupported.
- The DoIP entity is not in a state in which it can accept the request.
- The connection or tester state does not satisfy the applicable procedure.
- OEM-specific authorization or configuration conditions are not met.
- The request is malformed or inconsistent with the expected message format.
A routing-activation rejection is a DoIP-level outcome. It is not a UDS Negative Response Code (NRC), because the UDS diagnostic request may not have been routed to the target ECU at all.
5.2 Routing activation test ideas
| Test | Stimulus | Evidence to inspect |
|---|---|---|
| Valid activation | Send a valid request using the approved tester configuration | Positive activation response and usable diagnostic path |
| Unsupported activation | Request an activation type not supported by the test profile | Defined rejection behavior |
| Invalid source address | Use a source logical address not accepted by the configuration | Defined rejection behavior |
| Malformed request | Send a request with invalid framing or inconsistent fields in a controlled test | Defined protocol error handling |
| Reconnect | Close and re-establish the diagnostic connection | Routing state and recovery behavior follow the profile |
The exact expected response must be specified from the standard and vehicle implementation. The table describes test objectives, not universal response-code values.
6. Logical addressing
DoIP uses logical addresses to identify diagnostic communication participants. These addresses are distinct from IP addresses, MAC addresses and TCP/UDP port numbers.
| Address type | Identifies | Example use |
|---|---|---|
| MAC address | Ethernet interface at Layer 2 | Frame forwarding on a local Ethernet network |
| IP address | Network-layer endpoint | Reaching the DoIP entity |
| TCP/UDP port | Transport endpoint | Selecting the relevant transport service |
| DoIP logical address | Diagnostic participant in the DoIP context | Identifying tester source and diagnostic target |
A diagnostic message carries source and target logical-address information along with the UDS payload. In a routed vehicle architecture, the DoIP entity uses the target information and its configured routing behavior to deliver the diagnostic request to the intended ECU.
Do not assume that an ECU's logical address is derived from its IP address. The address mapping is part of the diagnostic and vehicle network configuration.
6.1 Addressing checks during integration
- Confirm the tester source logical address.
- Confirm the target ECU logical address from the diagnostic configuration.
- Check that the DoIP entity has the expected routing configuration.
- Confirm that the response source and target logical addresses are consistent with the request and protocol procedure.
- Verify that gateway routing does not map the request to an unintended ECU.
- Keep logical-address configuration aligned across tester, vehicle and ECU diagnostic databases.
7. Diagnostic messages and UDS payloads
After the diagnostic path is available, the tester can send diagnostic messages through DoIP. The DoIP diagnostic message contains addressing information and the diagnostic payload.
In a common UDS-over-DoIP use case:
- The tester constructs a UDS request.
- The tester places the UDS payload in the appropriate DoIP diagnostic message.
- The DoIP entity checks and routes the message according to its configuration.
- The target ECU's diagnostic application processes the UDS request.
- The ECU generates a UDS response.
- The response is returned through the DoIP path to the tester.
The UDS payload may contain a positive response or a negative response. The diagnostic service, session requirements, security or authentication prerequisites, data identifiers and response behavior are defined by the applicable UDS specification and ECU implementation.
7.1 DoIP error versus UDS negative response
This distinction is essential during trace analysis.
| Observation | What it indicates | Where to investigate |
|---|---|---|
| TCP connection fails | Diagnostic transport connection was not established | IP path, port filtering, endpoint state and network configuration |
| Routing activation rejected | DoIP entity did not establish the requested diagnostic route | Activation request, tester address, entity state and vehicle profile |
| DoIP diagnostic-message error | The DoIP layer could not process or route the diagnostic message as expected | Message format, logical addresses, target availability and routing |
| UDS negative response | The diagnostic request reached the ECU diagnostic application far enough for it to return a UDS response | UDS service, session, security/authentication, parameters and ECU preconditions |
For example, a tester may establish TCP successfully but receive a routing-activation rejection. That is not a UDS NRC: the diagnostic request may never have reached the ECU. Conversely, a valid DoIP diagnostic message that returns a UDS negative response indicates that the transport path worked far enough for the ECU diagnostic application to respond.
8. Alive Check and connection supervision
DoIP connection supervision includes mechanisms for checking whether a diagnostic connection participant is still present and managing connection state according to the applicable procedure.
An Alive Check is a DoIP-level mechanism. It must not be confused with UDS TesterPresent (0x3E).
| Mechanism | Protocol layer | Purpose |
|---|---|---|
| DoIP Alive Check | DoIP connection management | Checks the status or presence of the diagnostic tester on the relevant DoIP connection |
UDS TesterPresent (0x3E) | UDS diagnostic application | Helps keep a diagnostic session active where required by the ECU's diagnostic-session behavior |
These mechanisms solve different problems. A tester may need to handle both, depending on the vehicle profile, diagnostic session and connection lifecycle.
When implementing or testing connection supervision, verify the applicable request/response behavior, timeout handling, connection closure and recovery procedure using the controlled standard and OEM requirements. Do not reuse a UDS session timeout as a DoIP Alive Check timeout.
9. DoIP state and failure isolation
A practical diagnostic workflow can be viewed as a sequence of states. The names below are conceptual engineering checkpoints, not a claim that every implementation exposes an identical internal state machine.
When a workflow fails, record the last checkpoint completed successfully. This prevents a lower-layer failure from being incorrectly reported as a UDS service defect.
10. Practical packet-trace analysis
A useful DoIP trace review correlates the network capture with the tester log and, where available, the target ECU diagnostic log.
| Trace stage | What to inspect | Typical question |
|---|---|---|
| Discovery | UDP request and response/announcement | Is the intended DoIP entity visible? |
| TCP connection | Connection establishment and closure | Can the tester establish the diagnostic transport connection? |
| Routing activation | Request, response and status | Was the diagnostic route accepted? |
| Diagnostic request | DoIP payload type, logical addresses and UDS bytes | Was the request addressed and framed correctly? |
| Diagnostic response | DoIP response and UDS payload | Did the target ECU respond, and what did it return? |
| Connection supervision | Alive Check and connection lifecycle messages | Is the connection being maintained and closed as expected? |
10.1 Example failure investigation
Symptom: Vehicle discovery succeeds, but the tester cannot execute a UDS request.
A disciplined investigation is:
- Confirm that discovery responses come from the intended vehicle or DoIP entity.
- Check whether the tester establishes the expected TCP connection.
- Inspect the routing-activation request and response.
- If activation is rejected, investigate the source logical address, activation information, entity state and OEM policy.
- If activation succeeds, inspect the diagnostic message framing and target logical address.
- Check whether the target ECU receives the request.
- If the ECU receives it, analyze the UDS response and diagnostic preconditions.
- Correlate tester, gateway and ECU timestamps to identify where the request or response stops.
This method separates network reachability, DoIP routing and UDS application behavior.
11. Verification and test strategy
A complete DoIP verification strategy should cover discovery, connection establishment, routing activation, diagnostic exchange, connection supervision and recovery.
| Test ID | Test objective | Stimulus | Example expected observation |
|---|---|---|---|
| DOIP-001 | Vehicle discovery | Send the supported identification request | Expected entity response is visible at the tester |
| DOIP-002 | Vehicle announcement | Observe the network during the configured announcement condition | Announcement behavior matches the vehicle profile |
| DOIP-003 | TCP connection | Establish the diagnostic connection | Connection is established with the intended DoIP entity |
| DOIP-004 | Valid routing activation | Send an approved activation request | Activation is accepted and diagnostic routing becomes available |
| DOIP-005 | Invalid routing activation | Use an unsupported or invalid activation parameter in a controlled test | Defined DoIP rejection behavior is observed |
| DOIP-006 | Logical-address handling | Send a request to a configured diagnostic target | Request is routed to the intended target |
| DOIP-007 | UDS positive response | Send a valid UDS request with satisfied preconditions | Expected UDS positive response is returned through DoIP |
| DOIP-008 | UDS negative response | Send a request that violates a defined ECU precondition | Expected UDS negative response is carried through DoIP |
| DOIP-009 | Connection interruption | Interrupt the TCP connection during a controlled exchange | Cleanup and reconnection follow the vehicle profile |
| DOIP-010 | Alive Check | Exercise the configured connection-supervision procedure | Tester and DoIP entity handle the exchange and timeout as specified |
A production test specification should add preconditions, test setup, exact message parameters from the approved profile, timing limits, expected logs, pass/fail criteria and evidence-retention rules. Do not invent timeout thresholds, logical addresses or payload bytes: obtain them from the controlled standard, diagnostic database and OEM test specification.
11.1 Test evidence to retain
- Tester software and configuration version.
- Vehicle, gateway and ECU hardware/software baseline.
- IP configuration and network topology.
- Packet capture with capture-interface details.
- Tester diagnostic log.
- Gateway or DoIP entity log where available.
- ECU diagnostic log where available.
- Test preconditions, stimulus, timestamps and verdict.
- Relevant logical-address and routing configuration.
12. Troubleshooting matrix
| Symptom | Likely area | Checks |
|---|---|---|
| No vehicle discovery response | UDP / network | Tester interface, IP configuration, switch/VLAN path, filtering and DoIP entity state |
| Discovery works but TCP fails | TCP / endpoint | Correct endpoint, connection state, routing, firewall and port policy |
| TCP connects but routing activation is rejected | DoIP activation | Source logical address, activation information, entity state and OEM authorization conditions |
| Activation succeeds but no UDS response | DoIP routing / target ECU | Target logical address, gateway route, target availability and ECU diagnostic state |
| DoIP error response | DoIP framing / routing | Payload type, message length, logical addresses and target route |
| UDS NRC received | UDS application | Service support, diagnostic session, security/authentication and request parameters |
| Connection closes unexpectedly | Connection supervision / network | Alive Check handling, network interruption, entity state and configured lifecycle behavior |
| Request appears at tester but not ECU | Gateway / routing | DoIP entity routing, logical-address mapping, target network and gateway logs |
13. Common DoIP engineering mistakes
- Treating DoIP and UDS as the same protocol.
- Assuming vehicle discovery automatically enables diagnostic communication.
- Treating successful TCP connection establishment as proof of routing activation.
- Confusing IP addresses, TCP/UDP ports and DoIP logical addresses.
- Reporting a routing-activation rejection as a UDS NRC.
- Assuming TCP segment boundaries match DoIP message boundaries.
- Confusing DoIP Alive Check with UDS TesterPresent (
0x3E). - Debugging only from the tester side without checking gateway and ECU evidence.
- Reusing logical addresses or timing values from another vehicle program without checking the current configuration.
- Failing to record the standard edition, OEM profile and software/configuration baseline.
14. Recommended DoIP integration workflow
- Confirm the baseline: Identify the applicable ISO 13400 edition, OEM profile, supported message types and diagnostic architecture.
- Review the network design: Confirm the Ethernet topology, VLANs, IP addressing, routes and access-control policy.
- Configure the DoIP entity: Align protocol configuration, endpoint behavior, logical addresses and routing policy with the vehicle design.
- Configure the tester: Use the approved network interface, IP configuration, tester source logical address and diagnostic target data.
- Verify discovery: Capture and confirm the expected identification behavior.
- Verify TCP and routing activation: Confirm connection establishment and the activation response before sending diagnostic requests.
- Verify UDS exchange: Start with a known, permitted diagnostic request and evaluate the UDS response separately from the DoIP transport.
- Test faults and recovery: Exercise invalid activation, target unavailability, connection interruption and applicable connection-supervision behavior.
- Archive evidence: Retain packet captures, logs, configuration versions and test results.
15. Key takeaways
- DoIP is standardized in the ISO 13400 series and carries diagnostic communication over IP networks.
- UDS defines diagnostic services; DoIP provides the diagnostic transport and routing mechanisms.
- Vehicle discovery and identification do not activate a diagnostic route.
- A successful TCP connection does not prove that routing activation has been accepted.
- DoIP logical addresses are distinct from MAC addresses, IP addresses and transport ports.
- DoIP diagnostic messages carry UDS payloads to and from the target ECU.
- A DoIP routing or transport error is different from a UDS Negative Response Code.
- DoIP Alive Check and UDS TesterPresent (
0x3E) operate at different protocol layers. - Reliable debugging correlates tester, network, gateway and ECU evidence.
16. Check your understanding
- What is the difference between DoIP and UDS?
- Why can vehicle discovery succeed while diagnostic communication still fails?
- What is the purpose of routing activation?
- How is a DoIP logical address different from an IP address?
- Why should a TCP packet capture not be treated as a sequence of complete DoIP messages?
- What does a routing-activation rejection tell you, and why is it not a UDS NRC?
- How does DoIP Alive Check differ from UDS TesterPresent (
0x3E)? - Which logs and captures help isolate a failure between the tester, gateway and target ECU?
Suggested answers
- UDS defines diagnostic services and their application behavior; DoIP transports diagnostic messages over IP and provides diagnostic communication mechanisms such as routing activation.
- Discovery identifies a reachable DoIP entity. A diagnostic TCP connection and successful routing activation are separate steps.
- Routing activation establishes or authorizes the diagnostic routing relationship between the tester and DoIP entity.
- An IP address identifies a network-layer endpoint; a DoIP logical address identifies a diagnostic participant in the DoIP context.
- TCP is a byte stream. DoIP message boundaries must be reconstructed using the generic header and payload-length information.
- It indicates that the DoIP entity did not accept the requested diagnostic route. The UDS request may not have reached the ECU, so no UDS NRC is implied.
- Alive Check is DoIP connection supervision; TesterPresent is a UDS diagnostic service used in diagnostic-session management.
- Use the tester log, packet capture, DoIP entity or gateway log, ECU diagnostic log and aligned timestamps.
Related articles
- Automotive Ethernet Explained: Physical Layers, Network Architecture and Packet Flow
- SOME/IP Protocol: A Practical Automotive Engineering Guide
- UDS over Automotive Ethernet: A Practical Engineering Guide
- UDS Protocol Explained
Further reading
Use the applicable parts and edition of the ISO 13400 series, the relevant UDS standard baseline, OEM diagnostic architecture documents, diagnostic databases, DoIP entity documentation and tester implementation manuals. Confirm message support, payload definitions, addressing, timing, connection supervision and security behavior against the controlled project documents.
