From b19ab95562b55363216867d48793415cb3dc4970 Mon Sep 17 00:00:00 2001 From: Jesus Perez Date: Thu, 22 Feb 2024 13:05:03 +0100 Subject: [PATCH] Refs #20343: Add tcp documentation clarifications Signed-off-by: Jesus Perez --- docs/rst/user_manual/configuration.rst | 6 ++++-- docs/rst/user_manual/wan_configuration.rst | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/rst/user_manual/configuration.rst b/docs/rst/user_manual/configuration.rst index ab837cdf7..76337eeee 100644 --- a/docs/rst/user_manual/configuration.rst +++ b/docs/rst/user_manual/configuration.rst @@ -535,7 +535,7 @@ An Address is defined by: * *IP*: IP of the host (public IP in case of WAN communication). * *Port*: Port where the Participant is listening. -* *External Port*: Public port accessible for external entities (only for TCP). +* *External Port*: Public port accessible for external entities (only for TCP listening-addresses). * *Transport Protocol*: ``UDP`` or ``TCP``. If it is not set, it would be chosen by default depending on the Participant Kind. * *IP version*: ``v4`` or ``v6``. @@ -567,10 +567,12 @@ External Port ------------- External port is used to configure a Server (Discovery Server or Initial Peers) that runs under a NAT and uses -TCP transport. +TCP transport. It is not needed for LAN cases. This value could be set in a TCP listening address to differentiate the public and the internal port. **In case this value is not set, the external port is considered to be the same as the internal one.** If both ports coincide, external and internal port in the network router port forwarding rules must coincide. +Client's port must match the server's external port unless server's external port is not set, in which case it +should match the server's port. For more information, check section :ref:`user_manual_wan_configuration_nat_traversal_port_forwarding_external_port`. diff --git a/docs/rst/user_manual/wan_configuration.rst b/docs/rst/user_manual/wan_configuration.rst index b00df892a..595c6167c 100644 --- a/docs/rst/user_manual/wan_configuration.rst +++ b/docs/rst/user_manual/wan_configuration.rst @@ -40,17 +40,19 @@ Most network routers support a graphical interface where port forwarding could b External port ^^^^^^^^^^^^^ -In order to configure the |ddsrouter| to connect under a NAT, two ports must be taken into account. -The internal port (a.k.a. ``port``) is the one that the host of the |ddsrouter| will use to open a socket and -to receive information. +In order to configure a |ddsrouter| Server that runs under a NAT and uses TCP transport, two ports must be +taken into account. The internal port (a.k.a. ``port``) is the one that the host of the |ddsrouter| will use +to open a socket and to receive information. The external port (:code:`external-port`) references the public port meant for other entities to be able to locate this |ddsrouter|. Setting the external port is useful so the network router port forwarding could redirect from a public port to a different value of internal host port. +Client's port must match the server's external port unless server's external port is not set, in which case it +should match the server's port. .. note:: - External port configuration is not mandatory. If not set the internal and the external port must coincide + External port configuration is not mandatory. If not set, the internal and the external port must coincide in the network router port forwarding rules. .. warning::