Default TTL to 0 and allow setting with env variable#79
Default TTL to 0 and allow setting with env variable#79
Conversation
it can be configured using an env variable for now RMW_FASTRTPS_TTL_LEVEL
|
We need to investigate whether or not this affects multicast discovery or just the data packets. Ideally we'd want multicast discovery to have nonzero TTL but the data packets to have TTL zero for multicast and TTL nonzero for unicast. In general, this needs to be tested a bit more to make sure this behaves as expected with respect to wireless network behavior and to obtain feedback from eProsima. Let's try to change the locator list from rmw_fastrtps_cpp to just knock out the multicast locators for data. This is just a workaround until a future version of fastrtps which will be more judicious about when to multicast. |
|
This comment is relevant:
I'll try to adapt the logic he provided there to do the opposite and disable multicast all together in favor of just unicast until we can better control it in a new pr. |
|
That sounds great. Since unicast is the default behavior of ROS 1, I think that will be the expectation of users (for data, at least) unless there is a clear win that multicasting is better: for example, if >1 subscribers on the same subnet. |
|
Holding until after Beta 1 |
|
Since the current version of Fast-RTPS has multicast disabled by default, I'll close this for now. We can do a better fix in the future when Fast-RTPS can automatically select between unicast and multicast. |
This pr will detect if Fast-RTPS has the feature that allows us to set the TTL for multicast UDP packets, and if it does it will default it to 0 (rather than 1 as it is now) and will allow users to control that setting using the
RMW_FASTRTPS_TTL_LEVELenvironment variable.The idea behind making the default 0 instead of 1 is to avoid accidentally taking down WiFi networks when people run the camera demo. This will prevent people from using fast rtps across two computers unless they set the TTL to 1 on both machines using the environment variable.
In order for this pr to have any effect we need to either get this pr merged or carry the patch into a fork of Fast-RTPS which we use until it is merged: eProsima/Fast-DDS#68