Skip to content

ONVIF Discovery Configuration Guide

DiscoveryMode

For docker, set the env var APPCUSTOM_DISCOVERYMODE

DiscoveryMode allows you to select which discovery mechanism(s) to use. The three options are: netscan, multicast, and both.

netscan

netscan works by sending unicast UDP WS-Discovery probes to a set of IP addresses on the CIDR subnet(s) configured via DiscoverySubnets.

For example, if the provided CIDR is 10.0.0.0/24, it will probe all IP addresses from 10.0.0.1 to 10.0.0.254. This will result in a total of 254 probes on the network.

This method is a little slower and more network-intensive than multicast WS-Discovery, because it has to make individual connections. However, it can reach a much wider set of networks and works better behind NATs (such as docker networks).

multicast

multicast works by sending a single multicast UDP WS-Discovery Probe to the multicast address 239.255.255.250 on port 3702. In certain networks, this traffic is blocked and is not forwarded across subnets. As a result, it is not compatible with NATs, such as docker networks (except in the case of running an ONVIF simulator inside the same docker network).

both

This option combines both netscan and multicast.

DiscoverySubnets

For docker, set the env var APPCUSTOM_DISCOVERYSUBNETS

This is the list of IPv4 subnets to perform netscan discovery on, in CIDR format (X.X.X.X/Y) separated by commas ex: "192.168.1.0/24,10.0.0.0/24".

DiscoveryEthernetInterface

For docker, set the env var APPCUSTOM_DISCOVERYETHERNETINTERFACE

This is the target Ethernet Interface to use for multicast discovering. Keep in mind this interface is relative to the environment it is being run under. For example, when running in docker, those interfaces are different from your host machine's interfaces.

ProbeAsyncLimit

For docker, set the env var APPCUSTOM_PROBEASYNCLIMIT

This is the maximum simultaneous network probes when running netscan discovery.

ProbeTimeoutMillis

For docker, set the env var APPCUSTOM_PROBETIMEOUTMILLIS

This is the maximum amount of milliseconds to wait for each IP probe before timing out. This will also be the minimum time the discovery process can take.

MaxDiscoverDurationSeconds

For docker, set the env var APPCUSTOM_MAXDISCOVERDURATIONSECONDS

This is the maximum amount of seconds the discovery process is allowed to run before it will be cancelled. It is especially important to have this configured in the case of larger subnets such as /16 and /8.