problem about sending and receiving datas

7 posts / 0 new
Last post
Offline
Last seen: 2 years 5 months ago
Joined: 01/13/2016
Posts: 43
problem about sending and receiving datas

Hi,

        I create two apps and one called sender, the other called receiver. when they run in local area network(the ip address is configed at 192.168.1.101), whey work well. but when i change my ip address to 

        ip : 10.40.5.17 netmask: 255.255.255.224 geteway: 10.40.5.30

        the communication between sender and receiver stop. no messages are received by receiver.

        why it happened?

Offline
Last seen: 2 years 5 months ago
Joined: 01/13/2016
Posts: 43

I try different ip address between 192.0.1.2~192.168.1.101, it works well, but when I change IP address below 192.0.1.1(191.254.1.2 for examples), it can not communication again.

Does it because i use the open source rti dds?

now i use the open source rti dds ndds.5.2.0.

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 592

Hi,

I assume you are not changing addresses while the DDS applicatons are running, right? Dynamic address changes for runnign DDS applications are currently not supported. If you chnage your address you need to re-start your DDS applicationg afterwards.

DDS operates on top of the network TCP/IP layer. It does not really interpret network address or masks. It just keeps track of the IP addresses/ports of the different DDS Entities it discovers and then relies on the operting system network stack to do the "right thing" when sending to an IP address/port.

So to trouble shoot this I would first check that you have IP reachability between the different computers. This can be easily done using the ping utility included with the operating system.

If you can ping successfully then I would check whether rtiddsping and rtiddsspy also can communicte successfully. This will test that not only you have IP level connectivity but also that discovery (which by default uses 239.255.0.1) is also able to reach all the participants.

Interestingly the address range that youy said works 192.0.1.2~192.168.1.101 is within the traditional class C range (defaulting to a 24 bit mask 255.255.255.0), whereas IP addresses below 192.0.1.1 fall within the traditional class B range ( defaulting to a 16 bit mask 255.255.0.0) I wonder if this has something to do with it... Are all computers connected to the same switch with no routers in between? Are you configuring IP adresses and masks explicitly on your interfaces?

Regarding your last point, there should be no differences in behavior  between the open community source and the commercial bundles of RTI Connext DDS. They are using the same codebase. It is just the licensing that is different. 

Gerardo

 

Offline
Last seen: 2 years 5 months ago
Joined: 01/13/2016
Posts: 43

thanks for your reply.
yes, every time i change the address, i re-started the dds apps.the network is good between computers.I can ping successly,but both of rtiddsping and rtiddsspy communicate failed.

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 592

I assume that you are leaving the default NDDS_DISCOVERY_PEERS unchanged, is this right? If so discovery is using the default multicast address 239.255.0.1

In this case I would suspect that the IP address range or mask is somehow affecting how your network handles multicast.

One quick test you could do is explicitly set the discovery peers to the IP addresses of the two computers as in (assuming a unix/linux environement) and your IP addresses are 10.40.5.17 and 10.40.5.18 then you would use:

$ export NDDS_DISCOVERY_PEERS=10.40.5.17;10.40.5.18

on the same shell before running the DDS application.

If the applications discover each other with NDDS_DISCOVERY_PEERS set to the IP addresses, but not when it is set to 239.255.0.1 (or left unset) it would indicate that the problem is caused by the multicast packets not being able to reach the other computer.

You can also validate the hypothesis by running one of the DDS applications in one computer and Wireshark on the other. You should see the periodic RTPS messages being sent to the 239.255.0.1. If you do not see this something it would conform something is not configured properly with the interface.

Another thing to check is of it shows your interfaces are being enabled for multicast.

What platform are you running on? On Linux/MacOS you can see this running ifconfig for example  when I run it on Mac I get

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ...

Which shows MULTICAST among the flags. 

Gerardo

 

 

 

Offline
Last seen: 2 years 5 months ago
Joined: 01/13/2016
Posts: 43

sorry,i find the problem, it's non of bussiness of dds. thanks for you advices.

jwillemsen's picture
Offline
Last seen: 1 month 3 days ago
Joined: 09/24/2013
Posts: 53

It could help others when you would clarify the non-DDS issue, helps people when they encounter something similar