53.2.4 Setting the Initial Peers

Note: You must specify the initial peers (you cannot use the defaults because multicast cannot be used with TCP).

For TCP Transport, the addresses of the initial peers (NDDS_DISCOVERY_PEERS) that will be contacted during the discovery process have the following format:

  • For WAN communication using TCP: tcpv4_wan://<IP address or hostname>:<port>
  • For WAN communication using TLS: tlsv4_wan://<IP address or hostname>:<port>
  • For LAN communication using TCP: tcpv4_lan://<IP address or hostname>:<port>
  • For LAN communication using TLS: tlsv4_lan://<IP address or hostname>:<port>

For example (enter this on one line):

export NDDS_DISCOVERY_PEERS=
tcpv4_wan://10.10.1.165:7400,tcpv4_wan://10.10.1.111:7400,tcpv4_lan://192.168.1.1:7500

When the TCP transport is configured for LAN communication (with the parent.classid property), the IP address is the LAN address of the peer and the port is the server port used by the transport (the server_bind_port property).

When the TCP transport is configured for WAN communication (with the parent.classid property), the IP address is the WAN or public address of the peer and the port is the public port that is used to forward traffic to the server port in the TCP transport.