Multicast Issue

I need some help using multicast in node-red.

I have some light switches that do a multi-cast communications on

I have set up a UDP IN multicast node to this addr/port. When I do a tcpdump on port 4447 I can see the multi-cast messages. This is on the same node-red machine.

But I do not see anything coming in on the UPD node.

Do you have multiple network adapters ? Is it using the correct one ?

I don't, but I went ahead and entered it anyway. It did not help. I have en01: and lo:

And the source is another device ?

I have tried both, from another device and from the same device.

What is really puzzling is that I can see the traffic with a tcpdump.

I think it doesn’t listen to itself so needs to be another device ( but would need to check the source)

I am not sure if they are connected, but a few of us have also been having trouble with discovery when trying to use the Alexa nodes. We have not been able to get them to work recently.

What is confusing to me is my ability to see the traffic with the tcpdump but not in NR.

Do I maybe need to run nodered with sudo? I would guess not as I am trying to get data from port 4447, but I do not know what else to try.

I know it's been asked before but for clarification sake, can you confirm node-red (not the node-red editor, but the node-red installation) is installed on the machine you are running tcpdump?

Is this a docker or normal install of node-red?

How exactly did you configure it ?

Good question on the first one as I run about 12 different machines. Yes, I have verified the server is the same.

It is not in a docker installation. It is an Ubuntu OS if that makes a difference.

Listen For: multicast messages
Group: (this is correct for what I am watching for)
Local IF: I have tried leaving this blank as well as the ip address of the server. The only interfaces are eno1 and lo.
on PORT: 4447
using IPv4
Output: I have tried all choices.

At the bottom of the node UI there are two messages.

  1. Tip: Make sure your firewall will allow the data in (I am not running a firewall currently)
  2. Ports already in use: 4447 (I have nothing else on the server using this port. I find this odd.)

edit: I changed the port number and message #2 at the bottom also changed to the new port. So it IS talking about itself.

Have you still got tcpdump watching it? I don't know if that could be it. Otherwise see

I had shut down the tcpdump.

Here is the relevant result from netstat:

udp 0 0* 893/node-red

Also, some of the other lines have the word LISTEN in them. Although they are tcp lines. For example:

tcp 0 0* LISTEN 893/node-red

edit: Also, when I delete the node from nodered, it does disappear from the netstat listing

edit2: It also does not seem to matter what value I put in the Local IF textbox. netstat always shows

Odd - here are my test flows

receiving end

[{"id":"191ad772.218719","type":"udp in","z":"3e6448b5.f21398","name":"","iface":"","port":"4447","ipv":"udp4","multicast":"true","group":"","datatype":"buffer","x":190,"y":1060,"wires":[["77ae1bac.806f94"]]},{"id":"77ae1bac.806f94","type":"debug","z":"3e6448b5.f21398","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":1060,"wires":[]}]

sending end

[{"id":"85716442.fb4208","type":"inject","z":"ab9333b5.f44f6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":2260,"wires":[["2b9912dd.4420de"]]},{"id":"2b9912dd.4420de","type":"udp out","z":"ab9333b5.f44f6","name":"","addr":"","iface":"","port":"4447","ipv":"udp4","outport":"","base64":false,"multicast":"multi","x":380,"y":2260,"wires":[]}]

and yes
udp 0 0*

All working here of course... (two machines on same network segment etc etc)

1 Like

Thanks for the test flows.

My WiFi switches communicate on the multicast I am trying to emulate their communications in nodered.

Here is what I am experiencing. I have now set up two NR implementations for testing. I set up one to send a multicast message on and another to receive on the same ip:port combo (I did change the random port selection from your post). I am also running tcpdump on the receiving server so I can look at the traffic. When I send from the sending NR server I can see the multicast message on NR and tcpdump. When I activate a switch I can see the multicast traffic in the tcpdump but it does not show up in NR. I do not know where to go from here.

Can you share both tcpdumps here ? Or pcap files of each

Here is a snipit of the tcpdump. > [udp sum ok] UDP, length 13
22:02:47.067688 IP (tos 0x0, ttl 255, id 23875, offset 0, flags [none], proto UDP (17), length 54) > [udp sum ok] UDP, length 26
22:02:52.161804 IP (tos 0x0, ttl 1, id 40750, offset 0, flags [DF], proto UDP (17), length 128)

The .96 is from the other node-red server. The .32 is form one of my switches. The .96 makes it through node-red but the .32 does not. And these two messages were literally one after the other. I did not cut and paste them together.

well i was hoping to see he complete packet... but...
only thing of interest there is that the ttl is only 1 which means it won't go across any hops - but if this is literally on the same piece of wire / side of the switch that the Node-RED receiver is on then it would appear to be there. A pcap file would be better as we can then replay it to try it.

Thanks for the help and my apologies for my ignorance in this area. I will create a pcap file and post it.

Is there a specific command for tcpdump that I should use?

I'd have to google it.. - or use wireshark and just file save