What is the advantage of having multiple ports being used in UDP transport of RTI connext DDS whereas only one port is being used in TCP/IP of RTI connext DDS??
The UDP port mapping is defined by the OMG RTPS DDS Interoperability Wire Protocol Specification (http://www.omg.org/spec/DDSI-RTPS/), Platform Specific Model (PSM) : UDP/IP.
There are a few advantages/requirements that justify using different ports for discovery and data traffic. The most relevant ones are:
RTI Connext TCP Transport design meets those two requirements, but it has an additional requirement:
RTI Connext TCP Transport supports a mode where it opens only one server port for accepting all the connections (on the configured server_bind_port) needed for communicating two Participants. This way, it is compatible with NAT environments where only the Participant running the RTI TCP server has a publicly reachable address and port. Then, the Participants running RTI TCP clients will just open connections to that server.
Note that even if RTI TCP Transport opens just one server port/socket, the server only uses that socket for accepting connections. RTI TCP Transport is still opening a different connection for handling each traffic kind and direction (incoming/outcoming discovery, incoming/outcoming user data). Parallelism requirement is still met.
About traffic differentiation, RTI TCP Transport adds additional headers to the RTPS traffic, so it can be easily identified on the wire.
Note this is specific to RTI, as currently there is no specification for an OMG TCP PSM model, nonetheless it is currently on the works by the OMG.