[Dnsmasq-discuss] ipv6 - How to add static route with metric

Simon Kelley simon at thekelleys.org.uk
Thu Sep 9 22:52:31 UTC 2021

On 09/09/2021 10:22, Daniel via Dnsmasq-discuss wrote:
> Hello,
> using dnsmasq for office network, I would like to add an ipv6 static
> route. My configuration looks like
> dhcp-range=set:computer6, fd00:5678:beef:cafe::ff:0,
> fd00:5678:beef:cafe::ff:ffff, slaac, ra-names, 1h
> dhcp-option=tag:computer6,option6:3,fd00:5678:beef:cafe::2
> dhcp-option=tag:computer6,option6:6,fd00:5678:beef:cafe::1
> dhcp-option=tag:computer6,option6:ntp-server,fd00:5678:beef:cafe::2
> Now I want to add route like <destination network,metric,GW>
> dhcp-option=tag:computer6,option6:3,fd00:5678:beef:cafe:fade::/96,192,fd00:5678:beef:cafe::1
> but this does not work (also tried <GW,metric,destination network>
> What am I doing wrong ?
> Thanks for your support

The space of option numbers in DHCPv6 is not the same as the space of
option numbers in DHCPv4. Just because option  3 in DHCP4 sets the
default route, doesn't mean that option 3 sets the default route on
DHCPv6 - option 3 does something completely different in DHCPv6. The
same is true for option 6 - the option NUMBER for the DNS server in
DHCPv6 is 23.

The function of option 3 in DHCPv4 is done using router advertisements
in IPv6 land - there's no direct equivalent of the DHCP option at all,
and for a generalised static route, I don't believe that a DHCPv6 option
has been defined. There's an expired draft proposal which is insanely


But it has never been ratified as an RFC.


More information about the Dnsmasq-discuss mailing list