[Dnsmasq-discuss] Question about IPv6 settings
Simon Kelley
simon at thekelleys.org.uk
Sat Dec 13 12:42:34 UTC 2025
On 11/12/2025 13:47, Andreas Kuropka via Dnsmasq-discuss wrote:
> Hello,
>
> I have one "shared" network with two gateways. Different devices use different gateways.
>
> Until now I used IPv4 where I was able to set the gateway with the option:router,IP directive. Hosts have tags and for different tags I use different IPs as router.
>
> Unfortunately the mobile ISP I use switched from dual-stack to IPv6-only (DNS64+NAT64 and 464-XLAT). One router gets 2a01:: addresses, the other one 2003:: ones, both routers have each a fe80:: LL-address which can be used as router option.
>
> How can I set up dnsmasq that I can set the gateway/router on device/tag-basis as I had with IPv4 until now.
>
> I would appreciate any help.
>
You can't control the default router using DHCP, as you can in IPv4,
since DHCPv6 is not involved in router discovery. That's done using the
router advertisement protocol.
Each of your routers will be advertising it's own prefix, and it's own
LL address as router for that prefix, and you have to go with that.
One thing that MIGHT work, is to configure dnsmasq to do DHCPv6, but NOT
Router advertisement. Configure dnsmasq to give either a 2a01 or a 2003
addresses as preferred. If you're lucky, the IPv6 stack will use the
default route associated with the prefix of the address that the host
has and all will work as desired.
Simon.
More information about the Dnsmasq-discuss
mailing list