52.4.1 Peer-to-Peer Communication between Internal Participant and External Participant

In this scenario, one or more DomainParticipants behind any kind of NAT (including symmetric NATs) communicate with a DomainParticipant with a well-known public IP transport address (see Figure 52.7: Peer-to-Peer between a Participant behind Any Kind of NAT and an External Participant).

Figure 52.7: Peer-to-Peer between a Participant behind Any Kind of NAT and an External Participant

 

Note that Cloud Discovery Service (CDS) is not needed to facilitate NAT traversal in this scenario because the external DomainParticipant can figure out the public IP transport addresses at which the Internal Participant is reachable by looking at the UDP packets coming from the Internal Participant.

The external DomainParticipant must be reachable at a well-known public address (50.10.23.45:2345 in this example). What this means is that the address must be routable on the WAN.

There are two configurations that allow the association of External Participant with a well-known public address:

  • Sub-Scenario 1: The DomainParticipant is associated directly with the public address 50.10.23.45:2345, or
  • Sub-Scenario 2: The DomainParticipant is behind a NAT-enabled router in which you have created a static NAT mapping from the DomainParticipant private IP transport address 192.168.1.1:1234 to the public IP transport address 50.10.23.45:2345.

For a detailed description of how the communication establishment protocol works in this scenario, see 52.10.4 Communication Establishment Protocol for Peer-to-Peer Communication with a Participant that has a Public Address.

The following section provides an example configuration for the scenario described in Figure 52.7: Peer-to-Peer between a Participant behind Any Kind of NAT and an External Participant.

52.4.1.1 External Participant Configuration: Sub-Scenario 1

<dds>
    <qos_profile name="ExternalParticipant">
        <domain_participant_qos>
            <transport_builtin>
                <mask>UDPv4_WAN</mask>
                <udpv4_wan>
                    <public_address>50.10.23.45</public_address>
                    <comm_ports>
                        <default>
                            <host>2345</host>
                        </default>
                    </comm_ports>
                </udpv4_wan>
            </transport_builtin>
        </domain_participant_qos>
    </qos_profile>
</dds>
  • To enable Real-Time WAN Transport, <mask> within <transport_builtin> must contain UDPv4_WAN.
  • <public_address> contains the IP address of the host where the external DomainParticipant is running.
  • <comm_ports> defines the port (<host>) in which the external DomainParticipant receives/sends data.

52.4.1.2 External Participant Configuration: Sub-Scenario 2

<dds>
    <qos_profile name="ExternalParticipant">
        <domain_participant_qos>
            <transport_builtin>
                <mask>UDPv4_WAN</mask>
                <udpv4_wan>
                    <public_address>50.10.23.45</public_address>
                    <comm_ports>
                        <default>
                            <host>1234</host>
                            <public>2345</public>
                        </default>
                    </comm_ports>
                </udpv4_wan>
            </transport_builtin>
        </domain_participant_qos>
    </qos_profile>
</dds>
  • To enable Real-Time WAN Transport, <mask> within <transport_builtin> must contain UDPv4_WAN.
  • <public_address> contains the public IP address in the NAT-enabled router to which the private IP address is mapped.
  • <comm_ports> defines the mapping between the following ports:
    • <host>: local UDP port in which the external DomainParticipant receives/sends data in the machine where it is running.
    • <public>: public port to which the local UDP port is mapped in the NAT-enabled router.

52.4.1.3 Internal Participants Configuration

<dds>
    <qos_profile name="InternalParticipant">
        <domain_participant_qos>
            <transport_builtin>
                <mask>UDPv4_WAN</mask>
            </transport_builtin>
            <discovery>
                <initial_peers>
                    <element>0@udpv4_wan://50.10.23.45:2345</element>
                </initial_peers>
            </discovery>
        </domain_participant_qos>
    </qos_profile>
</dds>
  • To enable Real-Time WAN Transport, <mask> within <transport_builtin> must contain UDPv4_WAN.
  • In addition, the InternalParticipant must set its initial peers to point to the external DomainParticipant public address.