Why is multicast not working on my LynxOS target?

Note: Applies to NDDS 3.x, RTI Connext 4.x and above.

The LynxOS 4.0 IP stack (and many other BSD-derived network stacks) will fail to send multicast messages unless there is an entry in the routing table that matches the destination multicast IP address.

In practice, this means that either: 

  • a route for the multicast IP address space should exist; or 
  • a default route should exist for the target. (A default route specifies how to reach the addresses that don't match the other routing table entries.) 

This requirement is the most common cause of multicast problems on LynxOS, where neither of these routes is usually present by default. 

If your routing table includes a default route, that will be sufficient to enable multicast datagrams. Otherwise, you will need to set up a "multicast route" (i.e., a route for the multicast IP address range) to allow multicast datagrams to be sent. This is done by running the following command as the super-user (root) on the target machine: 

 route add -net -netmask –interface if0  

You will need to replace if0 with any network interface actually present in your target.

The above routing command is most conveniently performed in a system start-up script, such as /net/rc.local

Note that the specified route will never be used for multicast datagrams sent by RTI Data Distribution Service, which uses the IP_MULTICAST_IF socket option to explicitly select the interface when sending outgoing multicast datagrams. So in theory, a route should not be necessary, but the stack requires it anyway.