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 / componentResponsibilityExample
Diagnostic applicationDefines the diagnostic operation requested by the testerRead data, clear diagnostic information, routine control
UDSDefines diagnostic services, request parameters and diagnostic responsesDiagnostic Session Control, ReadDataByIdentifier
DoIPCarries diagnostic messages and manages diagnostic communication pathsRouting activation and diagnostic message transport
IP and transportProvides network addressing and transport connectionsIP, UDP and TCP as used by the applicable DoIP procedure
EthernetTransfers frames over the vehicle networkMAC addresses, switch ports and VLANs
Physical layerProvides the electrical Ethernet linkAutomotive 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.
Rendering diagram...

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 activityCommon transport contextWhat to verify
Vehicle discovery / identificationUDPCorrect network interface, discovery procedure and response visibility
Vehicle announcementUDPWhether the entity announces itself as configured by the vehicle
Diagnostic connectionTCPConnection establishment, endpoint and connection state
Routing activationTCP diagnostic connectionRequest parameters and activation response
Diagnostic message exchangeTCP diagnostic connectionLogical 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:

  1. Whether the tester is connected to the intended physical network.
  2. Whether the tester's IP configuration is compatible with the vehicle network.
  3. Whether the discovery request is transmitted on the intended interface.
  4. Whether UDP traffic is allowed by the test setup, switch configuration and network security policy.
  5. Whether the vehicle's DoIP entity is powered and configured to respond.
  6. Whether the response is visible at the tester's capture point.
  7. 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 fieldPurpose
Protocol versionIdentifies the DoIP protocol version used by the message
Inverse protocol versionProvides the corresponding inverse value used for header consistency checking
Payload typeIdentifies the kind of DoIP message carried in the payload
Payload lengthSpecifies 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.

Rendering diagram...

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:

  1. The tester establishes the required TCP connection to the DoIP entity.
  2. The tester sends a routing-activation request containing its source logical address and the activation information required by the selected procedure.
  3. The DoIP entity checks the request against its supported activation behavior and configured conditions.
  4. The DoIP entity returns a routing-activation response indicating the outcome.
  5. 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

TestStimulusEvidence to inspect
Valid activationSend a valid request using the approved tester configurationPositive activation response and usable diagnostic path
Unsupported activationRequest an activation type not supported by the test profileDefined rejection behavior
Invalid source addressUse a source logical address not accepted by the configurationDefined rejection behavior
Malformed requestSend a request with invalid framing or inconsistent fields in a controlled testDefined protocol error handling
ReconnectClose and re-establish the diagnostic connectionRouting 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 typeIdentifiesExample use
MAC addressEthernet interface at Layer 2Frame forwarding on a local Ethernet network
IP addressNetwork-layer endpointReaching the DoIP entity
TCP/UDP portTransport endpointSelecting the relevant transport service
DoIP logical addressDiagnostic participant in the DoIP contextIdentifying 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:

  1. The tester constructs a UDS request.
  2. The tester places the UDS payload in the appropriate DoIP diagnostic message.
  3. The DoIP entity checks and routes the message according to its configuration.
  4. The target ECU's diagnostic application processes the UDS request.
  5. The ECU generates a UDS response.
  6. The response is returned through the DoIP path to the tester.
Rendering diagram...

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.

ObservationWhat it indicatesWhere to investigate
TCP connection failsDiagnostic transport connection was not establishedIP path, port filtering, endpoint state and network configuration
Routing activation rejectedDoIP entity did not establish the requested diagnostic routeActivation request, tester address, entity state and vehicle profile
DoIP diagnostic-message errorThe DoIP layer could not process or route the diagnostic message as expectedMessage format, logical addresses, target availability and routing
UDS negative responseThe diagnostic request reached the ECU diagnostic application far enough for it to return a UDS responseUDS 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).

MechanismProtocol layerPurpose
DoIP Alive CheckDoIP connection managementChecks the status or presence of the diagnostic tester on the relevant DoIP connection
UDS TesterPresent (0x3E)UDS diagnostic applicationHelps 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.

Rendering diagram...

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 stageWhat to inspectTypical question
DiscoveryUDP request and response/announcementIs the intended DoIP entity visible?
TCP connectionConnection establishment and closureCan the tester establish the diagnostic transport connection?
Routing activationRequest, response and statusWas the diagnostic route accepted?
Diagnostic requestDoIP payload type, logical addresses and UDS bytesWas the request addressed and framed correctly?
Diagnostic responseDoIP response and UDS payloadDid the target ECU respond, and what did it return?
Connection supervisionAlive Check and connection lifecycle messagesIs 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:

  1. Confirm that discovery responses come from the intended vehicle or DoIP entity.
  2. Check whether the tester establishes the expected TCP connection.
  3. Inspect the routing-activation request and response.
  4. If activation is rejected, investigate the source logical address, activation information, entity state and OEM policy.
  5. If activation succeeds, inspect the diagnostic message framing and target logical address.
  6. Check whether the target ECU receives the request.
  7. If the ECU receives it, analyze the UDS response and diagnostic preconditions.
  8. 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 IDTest objectiveStimulusExample expected observation
DOIP-001Vehicle discoverySend the supported identification requestExpected entity response is visible at the tester
DOIP-002Vehicle announcementObserve the network during the configured announcement conditionAnnouncement behavior matches the vehicle profile
DOIP-003TCP connectionEstablish the diagnostic connectionConnection is established with the intended DoIP entity
DOIP-004Valid routing activationSend an approved activation requestActivation is accepted and diagnostic routing becomes available
DOIP-005Invalid routing activationUse an unsupported or invalid activation parameter in a controlled testDefined DoIP rejection behavior is observed
DOIP-006Logical-address handlingSend a request to a configured diagnostic targetRequest is routed to the intended target
DOIP-007UDS positive responseSend a valid UDS request with satisfied preconditionsExpected UDS positive response is returned through DoIP
DOIP-008UDS negative responseSend a request that violates a defined ECU preconditionExpected UDS negative response is carried through DoIP
DOIP-009Connection interruptionInterrupt the TCP connection during a controlled exchangeCleanup and reconnection follow the vehicle profile
DOIP-010Alive CheckExercise the configured connection-supervision procedureTester 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

SymptomLikely areaChecks
No vehicle discovery responseUDP / networkTester interface, IP configuration, switch/VLAN path, filtering and DoIP entity state
Discovery works but TCP failsTCP / endpointCorrect endpoint, connection state, routing, firewall and port policy
TCP connects but routing activation is rejectedDoIP activationSource logical address, activation information, entity state and OEM authorization conditions
Activation succeeds but no UDS responseDoIP routing / target ECUTarget logical address, gateway route, target availability and ECU diagnostic state
DoIP error responseDoIP framing / routingPayload type, message length, logical addresses and target route
UDS NRC receivedUDS applicationService support, diagnostic session, security/authentication and request parameters
Connection closes unexpectedlyConnection supervision / networkAlive Check handling, network interruption, entity state and configured lifecycle behavior
Request appears at tester but not ECUGateway / routingDoIP 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

  1. Confirm the baseline: Identify the applicable ISO 13400 edition, OEM profile, supported message types and diagnostic architecture.
  2. Review the network design: Confirm the Ethernet topology, VLANs, IP addressing, routes and access-control policy.
  3. Configure the DoIP entity: Align protocol configuration, endpoint behavior, logical addresses and routing policy with the vehicle design.
  4. Configure the tester: Use the approved network interface, IP configuration, tester source logical address and diagnostic target data.
  5. Verify discovery: Capture and confirm the expected identification behavior.
  6. Verify TCP and routing activation: Confirm connection establishment and the activation response before sending diagnostic requests.
  7. Verify UDS exchange: Start with a known, permitted diagnostic request and evaluate the UDS response separately from the DoIP transport.
  8. Test faults and recovery: Exercise invalid activation, target unavailability, connection interruption and applicable connection-supervision behavior.
  9. 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

  1. What is the difference between DoIP and UDS?
  2. Why can vehicle discovery succeed while diagnostic communication still fails?
  3. What is the purpose of routing activation?
  4. How is a DoIP logical address different from an IP address?
  5. Why should a TCP packet capture not be treated as a sequence of complete DoIP messages?
  6. What does a routing-activation rejection tell you, and why is it not a UDS NRC?
  7. How does DoIP Alive Check differ from UDS TesterPresent (0x3E)?
  8. Which logs and captures help isolate a failure between the tester, gateway and target ECU?

Suggested answers

  1. UDS defines diagnostic services and their application behavior; DoIP transports diagnostic messages over IP and provides diagnostic communication mechanisms such as routing activation.
  2. Discovery identifies a reachable DoIP entity. A diagnostic TCP connection and successful routing activation are separate steps.
  3. Routing activation establishes or authorizes the diagnostic routing relationship between the tester and DoIP entity.
  4. An IP address identifies a network-layer endpoint; a DoIP logical address identifies a diagnostic participant in the DoIP context.
  5. TCP is a byte stream. DoIP message boundaries must be reconstructed using the generic header and payload-length information.
  6. 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.
  7. Alive Check is DoIP connection supervision; TesterPresent is a UDS diagnostic service used in diagnostic-session management.
  8. Use the tester log, packet capture, DoIP entity or gateway log, ECU diagnostic log and aligned timestamps.

Related articles

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.