[lime] LibreMesh specific multicast ping address [was: GSoC …

Delete this message

Reply to this message
Autor: pony
Data:  
Para: LibreMesh.org project mailing list
Tópicos Antigos: [lime] Filter DHCP offers from LAN [was: GSoC - Cable purpose autodetection]
Assunto: [lime] LibreMesh specific multicast ping address [was: GSoC - Cable purpose autodetection]
Hi all!

On Friday, 21 June 2024 17:37:57 CEST I wrote:

> Re: a2) Using ping6:
> `ping ff02::1%interface` could give false positives. Also ff02::2 could give false positives, since everything that considers itself a router would respond to it. Maybe LibreMesh could use it's own ipv6 multicast address, like ff12::bee, and use that to discover other LibreMesh nodes?


> Re: c) Detect whether neighboring LibreMesh router is in the same or another cloud:
> Maybe yet another ipv6 multicast address could be used for this? One that is unique to each mesh cloud?


I did some research on this. One needs to register a (dummy) multicast listener on application level in order to get a custom multicast address pingable. I managed to do that using socat:

# socat STDIO UDP6-DATAGRAM:[ff12::bee]:8889,ipv6-join-group=[ff12::bee]:eth0.1

Then I can ping ff12::bee%lan1 from another node and get replies. ::bee can be anything. The port 8889 does not matter when we only want to get working ping. socat has the disadvantage that it is necessary to specify the interface to listen on. Using socat for this simple task might also be a bit overkill. I found an example of how one could archive this in C and also register on all interfaces: https://stackoverflow.com/a/45296984/15269751
I haven't tried it though.

I wonder if shared-state could use multicast for communication? It seems to me that multicast would be ideal for this.

Liebst
Pony