Joining Multicast IP group

Hello, I have been trying to join a multicast group(226.0.0.59) using the regular Linux commands on the Jetson TX2, but nothing seems to work. I’ve tried the following commands:
sudo ip maddr add 226.0.0.59 dev eth0
sudo route add 226.0.0.59 dev eth0

Unfortunately, when I ping the multicast ip address it doesn’t work. Also, when I run netstat -ng the multicast group is not added:
IPv6/IPv4 Group Memberships
Interface RefCnt Group


lo 1 224.0.0.1
eth0 1 224.0.0.251
eth0 1 224.0.0.1
wlan0 1 224.0.0.1
lo 1 ff02::1
lo 1 ff01::1
dummy0 1 ff02::1
dummy0 1 ff01::1
eth0 1 ff02::fb
eth0 1 ff02::1:ffa7:d709
eth0 1 ff02::1
eth0 1 ff01::1
tunl0 1 ff02::1
tunl0 1 ff01::1
wlan0 1 ff02::1
wlan0 1 ff01::1

Any ideas?

how about

sudo ip addr add 226.0.0.59 dev eth1 autojoin

That seems to add the multicast address to the multicast group shown with nestat -ng, but pinging still does not seem to work:
netstat -ng
IPv6/IPv4 Group Memberships
Interface RefCnt Group


lo 1 224.0.0.1
eth0 1 226.0.0.59
eth0 1 224.0.0.251
eth0 1 224.0.0.1
wlan0 1 224.0.0.1
lo 1 ff02::1
lo 1 ff01::1
dummy0 1 ff02::1
dummy0 1 ff01::1
eth0 1 ff02::fb
eth0 1 ff02::1:ffa7:d709
eth0 1 ff02::1
eth0 1 ff01::1
tunl0 1 ff02::1
tunl0 1 ff01::1
wlan0 1 ff02::1
wlan0 1 ff01::1
ping 226.0.0.59
connect: Invalid argument

I don’t really have much experience on multicast setup. Could you share how to set up a group with 226.0.0.59 IP? It may require an extra router for me to do the test, right?

Typically, I just run one of the following commands on two different computers to get them to join the multicast address:
sudo ip maddr add 226.0.0.59 dev eth0
or
sudo ip maddr add 226.0.0.59 dev eth0
Then, when I ping the multicast address(226.0.0.59) I get a response from both computers independently:
ping 226.0.0.59
PING 226.0.0.59 (226.0.0.59) 56(84) bytes of data.
64 bytes from 1.1.0.1: icmp_seq=1 ttl=64 time=0.141 ms
64 bytes from 1.1.0.3: icmp_seq=1 ttl=64 time=0.256 ms

I have run this test with an ethernet switch between them and connected directly to each other.

So the setup is like

PC1 <—> switch <—>PC2

Could you describe the environment of your PC1/PC2?