[Dnsmasq-discuss] Zeroing lifetime of ULA router advertisements
Chris Webb
chris at arachsys.com
Sat Dec 10 15:02:19 UTC 2022
I'm using dnsmasq 2.88 on a little 4G wwan router in a fairly
standard/boring way.
The lan-facing interface br0 always has a v6 ULA address, but may
sometimes also have a global v6 address with a default v6 route available.
(I fail between carriers: whether I'm v4-only or v4+v6 depends on active
carrier.)
My dnsmasq configuration has
dhcp-range=set:lan,192.168.1.128,192.168.1.254,255.255.255.0,12h
dhcp-range=set:lan,::,constructor:br0,ra-stateless,ra-names
dhcp-option=tag:lan,option6:dns-server,[::]
enable-ra
This works but always advertises a v6 default route, even when there's
just the ULA address on br0. Conversely, adding
ra-param=br0,0,0
offers the prefixes without a default route, even if there's a global
address on br0. (Reading the man page, I thought adding ,64,0 or
,64,deprecated to the v6 dhcp-range would do the same thing, but it
doesn't seem to have any effect?)
Is there an easy way to have non-zero lifetime for advertisements for the
global prefix, but drop the route lifetime to zero for advertisements for
the ULA prefix? (I can hard-code the specific ULA prefix in dnsmasq.conf
if necessary, but not the global prefix as that's dynamically delegated by
the 4G carrier.)
As one attempt, I tried adding the router ULA address as deprecated with
ip address add fd40:xxxx:xxxx::1/64 dev br0 preferred 0
but this just prevented client hosts from receiving ULA addresses at all.
Any hints would be very gratefully received!
Best wishes,
Chris.
More information about the Dnsmasq-discuss
mailing list