The DNS-SD/mDNS discovery mechanism (also known by the Apple trademark name 'Bonjour') is the currently preferred discovery mechanism in DoIP networks. Services are advertised by DNS records, that can be retrieved in a local network by means of multicast DNS (mDNS). This means that devices using IPv6 can generate their own IP address each time they start up, and still be discovered.
DoIP devices advertise a service with type '_ep._tcp'. The service has a name that should be unique on the host that is advertising the service and is also shown to the user. The protocol that is used to download the definition file from the device is specified in the 'EPProtocol' attribute. On the right, a screenshot of Bonjour Browser can be seen that shows an advertised endpoint service.
Commonly, HTTP is used as the protocol to download definition files in the negotiation phase (EPProtocol=HTTP). In this case, the port number of the service points to an HTTP-server running on the advertising host. The service also has an attribute to specify the path at which the definition file can be downloaded on the HTTP server (EPDefinitionPath). This attribute always starts with a '/' and exactly specifies the path that should be sent in the 'GET'-request by the downloader.
Optionally, an additional attribute (EPMagicNumber) can be published to prevent a process from discovering services it advertises itself. The EPMagicNumber can be a random value of any type and should never be used to uniquely identify services on other nodes.
Optionally, the mediation level of a device is specified in the 'EPMediationLevel' attribute.