[Dnsmasq-discuss] Unable to configure router advertisements priority

Tobias Boesch tobias.boesch at googlemail.com
Sat Jan 25 05:55:26 UTC 2025


Hello everyone,

I need to work around NetworkManagers (NM) router advertisements (RA)
not sending upstream DNS information.

On a home network linux router that shares an internet connection with
five parties, I receive a /56 upstream (delegated) prefix and share
this with five local connections.
I would like devices on those connections to use the prefix selected
for the respective connection and then configure themselves an address
using this prefix.

This works already fine using NM.

Now I use dnsmasq (already used as DNS resolver and cache, configured
in NM) for sending RA containing DNS information additionally to the RA
sent from NM.

This also works already fine. The two devices I test with this get the
delegated prefix from upstream and DNS information.

The devices now get two RA. One that additionally contains DNS
information and slightly different flags:

tcpdump trace of both RA:
-----------------------------------------------------------------------
06:24:51.671198 IP6 (class 0xc0, flowlabel 0x00180, hlim 255, next-
header ICMPv6 (58) payload length: 88) fe80::7f0a:973f:xxxx:xxxx >
tobias-pc.local: [icmp6 sum ok] ICMP6, router advertisement, length 88
	hop limit 64, Flags [none], pref medium, router lifetime
1800s, reachable time 0ms, retrans timer 0ms
	  prefix info option (3), length 32 (4): dynamic-2a02-3100-
xxxx-xxxx-0000-0000-0000-0000.310.pool.telefonica.de/64, Flags [onlink,
auto], valid time 257539s, pref. time 171139s
	  mtu option (5), length 8 (1):  1500
	  source link-address option (1), length 8 (1):
e6:e3:54:85:bd:50
	  rdnss option (25), length 24 (3):  lifetime 171139s, addr:
fe80::7f0a:973f:xxxx:xxxx
-----------------------------------------------------------------------
06:24:51.704773 IP6 (flowlabel 0x9af60, hlim 255, next-header ICMPv6
(58) payload length: 48) fe80::7f0a:973f:xxxx:xxxx > ff02::1: [icmp6
sum ok] ICMP6, router advertisement, length 48
	hop limit 0, Flags [none], pref medium, router lifetime 900s,
reachable time 0ms, retrans timer 0ms
	  prefix info option (3), length 32 (4): dynamic-2a02-3100-
xxxx-xxxx-0000-0000-0000-0000.310.pool.telefonica.de/64, Flags [onlink,
auto], valid time 259200s, pref. time 172800s
-----------------------------------------------------------------------

(The second RA is from NM, since it does not contain DNS options)
(Yes, I unnecessarily hide (xxxx) link local ipv6 addresses)

Now I would like to prioritise the RA from dnsmasq.
For this I add:

	ra-param=bond0.10,high

besides other options:

	dhcp-range=::,constructor:bond0.10,ra-
only                           

Adding the option ra-param=bond0.10,high, results in

	dnsmasq[1776]: bad RA-params at line 4 of
/etc/NetworkManager/dnsmasq.d/stateless-dhcpv6.conf

Why is that and how can I prioritise the RA?

Best wishes
Tobias




More information about the Dnsmasq-discuss mailing list