Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Own IPv6 broadcast domain #1120

Open
ilario opened this issue Jul 26, 2024 · 2 comments
Open

Own IPv6 broadcast domain #1120

ilario opened this issue Jul 26, 2024 · 2 comments

Comments

@ilario
Copy link
Member

ilario commented Jul 26, 2024

@pony1k proposed to have a LibreMesh-specific IPv6 broadcast domain.

Background:
Now one can do ping6 ff02::1%name_of_interface and get answers from all directly reachable devices.

Proposal:
One could ping another address for getting answers from all and only the LibreMesh devices, something like ping6 ff12::bee%name_of_interface

This would be convenient for general network maintenance, and specifically it would help shared-state to detect other LibreMesh nodes replacing the generic IPv6 broadcast address here:

ping -i 0.1 -c 2 ff02::1%${iface} 2> /dev/null | \
awk '{if ($3 == "from") print substr($4, 1, length($4)-1)'"\"%${iface}\""'}'
done | sort -u -r)"
babelCandidateAddresses="$([ -e /var/etc/babeld.conf ] &&
for iface in $(grep interface /var/etc/babeld.conf | awk '{print $2}'); do
ping -i 0.1 -c 2 ff02::1%${iface} 2> /dev/null | \
awk '{if ($3 == "from") print substr($4, 1, length($4)-1)'"\"%${iface}\""'}'
done | sort -u -r)"
wifi_get_macs="
wireless = require('lime.wireless')
iwinfo = require('iwinfo')
utils = require('lime.utils')
for _, ifc in ipairs(wireless.mesh_ifaces()) do
for mac, sta in pairs(iwinfo.nl80211.assoclist(ifc)) do
if sta.inactive < 5000 then
print(utils.mac2ipv6linklocal(mac) .. '%' .. ifc)
end
end
end
"
wirelessCandidateAddresses=$(echo "$wifi_get_macs" | lua - | sort -u -r)
candidateAddresses="$batmanNonMeshCandidateAddresses
$babelCandidateAddresses
$wirelessCandidateAddresses
$(ping -i 0.1 -c 2 ff02::1%br-lan | \

The original proposal here, for easing the identification of the devices reachable from a specific interface:
https://lists.autistici.org/message/20240621.153757.1eab7dbb.en.html

A proposal of implementation here:
https://lists.autistici.org/message/20240726.154215.73440c31.en.html

@pony1k
Copy link
Contributor

pony1k commented Jul 26, 2024

I also wanted to share the idea that shared-state could use multicast-addresses for communication. Currently, it uses multicast ping to discover neighbors, then communicates with them via TCP. But I'm not qualified to decide whether that makes sense.

@ilario
Copy link
Member Author

ilario commented Nov 7, 2024

@javierbrk @G10h4ck opinions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants