Setup
Imagine a run-of-the-mill home network with a bunch of devices connected to a router that acts as an internet gateway and DHCP server.
Now one of these devices sometimes possesses its own, independent connection to the internet (e.g. via 5G). It can allow the other devices to use this connection if configured appropriately (allowing packet forwarding & setting up the necessary routes), but in order for them to actually do so, their users have to manually disable/override the settings obtained via DHCP and set the independently internet-connected device's IP address as their new gateway address instead.
My question
Is there a standard protocol that allows a device to advertise its ability to act as an (alternative) internet gateway to other devices on the local network, ideally in a way that is understood (and displayed to the user e.g. in a GUI) by the default networking software of most "common" Linux distributions (Ubuntu, Fedora, Debian, ...)?
Considered so far
Approaches I've thought of and why they don't work or are incomplete:
- DHCP can't be used because all devices are already DHCP-configured and won't re-attempt DHCP discovery until reboot / loss of connection. Even if they did, you'd be competing with the router's DHCP server. As DHCP works by the principle of "first to answer wins", it would mainly come down to luck.
- Advertising services on the local network in general is possible via DNS-SD (part of the zeroconf protocols), and I already use mDNS (also part of zeroconf) to ease the process of finding out the independently internet-connected device's dynamically assigned IP address. But I didn't find "internet gateway" or anything like that in the list of RFC 2782 service types, so it doesn't look like this particular use case is something people are using it for.
- Windows's Internet Connection Sharing, which builds on UPnP, seems relevant to this use case, but I don't think Linux distributions support it and can't find much information about it compared to the zeroconf suite (in particular regarding service types).