In DCPS, a domain is uniquely identified by a non-negative integer, the domain id. DDSI maps this domain id to UDP/IP port numbers to be used for communicating with the peer nodes — these port numbers are particularly important for the discovery protocol — and this mapping of domain ids to UDP/IP port numbers ensures that accidental cross-domain communication is impossible with the default mapping. see https://kbase.zettascale.tech/article/ddsi-networking-service-ports/ for more detail
DDSI does not communicate the DCPS port number in the discovery protocol; it assumes that each domain id maps to a unique port number. While it is unusual to change the mapping, the specification requires this to be possible, and this means that two different DCPS domain ids can be mapped to a single DDSI domain.
In that respect the DDSI Domain ID for this service is usually the same as the global Domain/Id and no extra configuration is required. However the specification allows this to be overridden and this can be achieved with the DDSI2Service/Discovery/DomainId attribute. This will then allow the possibility of two different Domain IDs to be mapped to a single DDSI domain, and therefore the specific ports this DDSI domain use.