Communication cannot be established using DDS-Router.
Hello.I want to test the cross-domain communication capability of DDS-Router.The server's IP address is 172.16.2.128, and the virtual machine's IP address is 172.19.12.132. The server can ping the virtual machine, but the virtual machine cannot ping the server.
In the YAML file for virtual machine configuration:configuration_server.yaml
version: v5.0
allowlist:
- name: HelloWorldTopic
participants:
-
name: LocalParticipant kind: local domain: 0
-
name: WANServer kind: wan listening-addresses:
- ip: 172.19.12.132 port: 11666 transport: udp In the YAML file for server configuration:configuration_client.yaml
version: v5.0
allowlist:
- name: HelloWorldTopic
participants:
-
name: LocalParticipant kind: local domain: 0
-
name: WANClient kind: wan connection-addresses:
- ip: 172.19.12.132 port: 11666 transport: udp I used the FastDDS example configuration. The previous test of cross-domain functionality was successful, but this time it didn't work.I started the DDS-Router on both the server and the virtual machine separately afterwards.During the server startup process, the publisher(./configuration publisher -n HelloWorldTopic).During the startup of the virtual machine for the subscriber(./configuration subscriber -n HelloWorldTopic),The default domain for the configuration example is 0.There were no errors reported, but no communication was carried out either. It has been confirmed that the server can ping the virtual machine, but the virtual machine cannot ping the server. The server's UDP port 11666 can receive data. After the virtual machine starts ddsrouter, it normally listens on port 11666. Since I haven't used this tool before, I really don't know where the problem lies. So I would like to ask for your help. Thank you for your contribution.
Hi @PineappleY666, I did not understand some parts of your description. Could you please clarify what do you mean by:
- "The server can ping the virtual machine, but the virtual machine cannot ping the server."
- "The previous test of cross-domain functionality was successful, but this time it didn't work."
- "It has been confirmed that the server can ping the virtual machine, but the virtual machine cannot ping the server. The server's UDP port 11666 can receive data."
At first sight this looks like a sheer network issue. I suggest you try tcp communication instead and see if there is any difference.
-
[1] Sorry, my explanation was incorrect. I'll describe it in more detail again.First of all, I want to describe that my DDS-Router has been successfully deployed. I used an example where the publisher and the subscriber were in different Domains (0, 1), and they successfully communicated through the DDS-Router.
-
[2] Therefore, I want to test the cross-subnet capability. The environment consists of a physical host (openEuler22.04) with an IP address of 172.16.2.128, and another virtual machine (Ubuntu22.04) using bridge mode with an IP address of 172.19.12.132. I was able to ping the virtual machine's IP from the physical host, but when using the virtual machine to ping the physical host's IP, there was packet loss and it couldn't be pinged. Additionally, using the virtual machine with sudo nc -u -l 11666, and then testing on the server with the command: echo "test" | nc -u 172.19.12.132 11666, the virtual machine received "test", indicating that the server can access the virtual machine's UDP port 11666. This path is working. My understanding is that it is impossible to communicate between the virtual machine and the physical host using the example in the form of generating a publisher and a subscriber on the virtual machine and the physical host respectively. However, with the Yaml configuration file I set up above, using the DDS-Router solved the cross-domain problem.The physical host uses configuration_client.yaml, while the virtual machine uses configuration_server.yaml. But now it seems to have failed. I don't know what the problem is.
-
[3] I think my configuration file and the use of DDS-Router are not wrong. Could it be that my understanding of the functions of DDS-Router is incorrect? In such cases, communication is impossible. Only when both hosts can ping each other's IP addresses can communication occur? But I saw in the introduction of DDS-Router that it can penetrate NAT. It should be able to solve this situation,.Otherwise, what significant advantages does it have over Discovery Server?
- I am interpreting that you ran this experiment with a DDS-Router instance in each of your devices with the same setup you are describing (openEuler22.04 and the virtual Ubuntu22.04), is that correct? By the way, is the virtual machine running in the same host (openEuler22.04)? If not, are both hosts in the same LAN?
- "However, with the Yaml configuration file I set up above, using the DDS-Router solved the cross-domain problem." Do you mean with the YAML used for the change of domains (0, 1) case?
- Bidirectional communication is required, I would focus on trying to solve the ping issue, that is likely to solve the rest. Did you try TCP as I previously suggested? It might be the solution. Discovery Server is a resource that allows to optimize discovery by centralizing it in a server internally routing the (discovery) traffic that is necessary and filtering out what's not. However, once clients discover each other they establish their dedicated communication channels and forget about the Discovery Server. This can be problematic in WAN, as many ports would need to be exposed. With the DDS-Router, the idea is to only expose a port and channel all communication through it.
-
Actually, what I meant is that I’ve successfully used DDS-Router to enable communication between participants with different Domain IDs. The YAML configuration I mentioned earlier was specifically written for my current cross-LAN (WAN) testing scenario.
-
My virtual machine and physical server are not running on the same host — the VM is created using VMware on a Windows machine — and they are not in the same LAN.
-
Maybe I misunderstood how DDS-Router works. I thought it could handle cross-network communication even if bidirectional ping is not possible, as long as one side can ping the other. For example, in my current setup, the physical server can ping the VM's IP, so I assumed that setting the server as the DDS-Router client and the VM as the server should allow them to communicate through DDS-Router. But now it seems that's not correct — maybe mutual ping is required?
-
Here's another example I want to clarify: suppose I have three machines — a physical server and two virtual machines, each on a different LAN. The two virtual machines cannot communicate with each other, but both can ping the physical server, while the server cannot ping either VM.In this case, can I set both virtual machines as DDS-Router clients, and the physical server as the DDS-Router server, so that the two virtual machines can communicate through the server?Or is that still not enough — does the server also need to be able to ping both VMs for DDS-Router to enable communication between the two VMs in different LANs?
-
I admit I may have misunderstood some of the DDS-Router capabilities. Sorry if my questions sound too simple or naïve — I really appreciate your clarification and support!
@PineappleY666 Did you try my suggestion of using TCP? When using UDP in WAN, clients also need to open a port. And regarding point 3, you seem to be describing the repeater use case.