LCM multicast across two PC

296 views
Skip to first unread message

Lin Zhang

unread,
Mar 26, 2019, 5:08:49 PM3/26/19
to Lightweight Communications and Marshalling
Hello,

I have read: https://lcm-proj.github.io/multicast_setup.html and all issues and topics in Github and Google groups related to "multicast".
I've tried several settings I can but no success. Note that for single host (send and receive program running on the same computer), the same programs can be ran without issue.

Purpose: 
Send LCM message from one computer A (Ubuntu) to another computer B (Ubuntu).

Things I have done:
I have tried to connect computer A and B via: direct connection, network switch and local LAN network (company LAN).

For both computers:
1. Ensure the loopback interface is enabled with multicast:
$ sudo ifconfig lo multicast

2. setup routing table
$ sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
(let's assume both computers have a Ethernet port called eth0 and they are connected)
$ sudo route add -net 239.255.76.67 netmask 255.255.255.255 dev lo

3. Create LCM interface on both computers:
lcm::LCM lcm("udpm://239.255.76.67:7667?ttl=1")



Problem:
The LCM can be setup without any error (i.e. loopback self test is fine). But computer B cannot received message from the other computer A (the handler functions was not called).
I double checked the topic name, it is same for both computers.

Question:
It's not clear in the wiki page that in the case of multiple hosts, what shall be done for the loopback(lo) interface. As the LCM traffic will now go to the hardware (eth0) interface instead of the local machine.
In addition, do I need to setup any routing on switch/router.

Thank you!

Regards,
Lin
Reply all
Reply to author
Forward
0 new messages