0
votes

With tcpdump I see these Multicast messages on ETH0:

19:50:31.493386 IP 169.254.17.110.60000 > 239.1.0.8.60000: UDP, length 273
19:50:31.493962 IP 169.254.17.110.60000 > 239.1.0.8.60000: UDP, length 153

But I don't receive them with a client program. I tried Python and NodeJS:

const PORT = 60000;
const HOST = '10.100.0.1';
const MCAST = '239.1.0.8';

const dgram = require('dgram');
const client = dgram.createSocket('udp4');
client.bind({address: HOST, port: PORT}, () => {
    const address = client.address();
    console.log('UDP Client listening on ' + address.address + ":" + address.port);
    client.setBroadcast(true);
    client.setMulticastTTL(128);
    client.addMembership(MCAST, HOST);
});

client.on('message', (message, remote) => {
    console.log('From: ' + remote.address + ':' + remote.port +' - ' + message);
});

My ETH0 IP is 10.100.0.1. I tried not binding to my HOST w/o success.

If I send me a Multicast message with another NodeJS script to the same address and port (239.1.0.8:60000) it's received with my client program.

I'm working on Debian Stretch:

Linux car 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

Thanks for any guidance on that.

1

1 Answers

0
votes

Try to catch errors with

client.on('error', (err) => {
  console.error(err);
});