OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: flushell on May 24, 2025, 07:33:58 PM

Title: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: flushell on May 24, 2025, 07:33:58 PM
I'm moving to dnsmasq from ISC DHCP4/6. I will use Router Advertisements offered by dnsmasq and disable the other one in Services (seems more logical to me). In the dnsmasq docs under dhcpv6 and router advertisements found here (https://docs.opnsense.org/manual/dnsmasq.html#dhcpv6-and-router-advertisements) it is stated:

Quote! Attention
With ra-stateless, clients will only generate a SLAAC address. If clients should additionally receive a DHCPv6 address, set slaac instead.

I wonder if this is correct (or maybe I do not understand this correctly).

I want clients to be able to use SLAAC and DHCPv6.

Per above statement I should set RA mode to slaac only (at least that's how I read this), while it seems to me that setting slaac and ra-stateless achieves this. Am I right, or is the statement right?
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: Monviech (Cedrik) on May 24, 2025, 07:57:49 PM
Check out the note we added here:

https://docs.opnsense.org/manual/dnsmasq.html#dhcp-settings
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: flushell on May 24, 2025, 08:08:47 PM
Quote from: Monviech (Cedrik) on May 24, 2025, 07:57:49 PMCheck out the note we added here:

https://docs.opnsense.org/manual/dnsmasq.html#dhcp-settings

Thanks, I've read that: and I saw I can combine them. That's why I asked the question, because in the statement quoted in my first post it says:

Quote[...]set slaac instead.

That confuses me, because I read that as: Use slaac instead of ra-stateless.
In my old setup I had "Assisted" as an option under Services-Router Advertisements. I want the same behavior.
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: Monviech (Cedrik) on May 24, 2025, 08:39:37 PM
Only set "slaac" if you want both
- a slaac address
- a dhcpv6 address
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: flushell on May 24, 2025, 10:35:53 PM
Thanks!
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: Vexz on May 25, 2025, 06:59:36 AM
For clarification:
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: cinergi on May 26, 2025, 12:28:30 AM
What if I want only stateful DHCPv6 without SLAAC, which corresponds to the "Managed" mode under Services > Router Advertisements?  None of the DNSmasq RA modes seem to do this.  Possible using DNSmasq?
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: IsaacFL on May 26, 2025, 12:54:26 AM
Quote from: cinergi on May 26, 2025, 12:28:30 AMWhat if I want only stateful DHCPv6 without SLAAC, which corresponds to the "Managed" mode under Services > Router Advertisements?  None of the DNSmasq RA modes seem to do this.  Possible using DNSmasq?

RA Mode set to "Default" will be same as "Managed" mode I believe. ?
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: cinergi on May 26, 2025, 03:51:49 AM
Yes you're right.  The "Default" mode is not one of the modes described in the DNSmasq Man page, so I missed it.  Thanks!
Title: Re: dnsmasq: SLAAC + DHCPv6 - Router Advertisements
Post by: flushell on May 26, 2025, 12:52:35 PM
Quote from: IsaacFL on May 26, 2025, 12:54:26 AM
Quote from: cinergi on May 26, 2025, 12:28:30 AMWhat if I want only stateful DHCPv6 without SLAAC, which corresponds to the "Managed" mode under Services > Router Advertisements?  None of the DNSmasq RA modes seem to do this.  Possible using DNSmasq?

RA Mode set to "Default" will be same as "Managed" mode I believe. ?

I ended up using Services-Router Advertisements in Assisted mode again because I couldn't make it to work in dnsmasq... I did not try to set it to default and I'm too lazy to try it now, now thay it's working like I want.

I think it's nice to put this in the docs: https://docs.opnsense.org/manual/dnsmasq.html

Thanks.