OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: IsaacFL on July 25, 2021, 05:33:16 PM

Title: Isn't this a bug in the ipv6 RA configuration?
Post by: IsaacFL on July 25, 2021, 05:33:16 PM
In the Router Advertisements configuration, I tried to change AdvRDNSSLifetime and AdvDNSSLLifetime to 43200.

When I did this I get a Red Error:
The following input errors were detected:

    AdvRDNSSLifetime must be between 600 and 1200 seconds.
    AdvDNSSLLifetime must be between 600 and 1200 seconds.


My Maximum Interval is set to 600 so I think it is tied to that.

According to RFC 8106, IPv6 Router Advertisement Options for DNS Configuration:

Paragraph 5.1 Recursive DNS Server Option

   Lifetime    32-bit unsigned integer.  The maximum time in seconds
               (relative to the time the packet is received) over which
               these RDNSS addresses MAY be used for name resolution.
               The value of Lifetime SHOULD by default be at least
               3 * MaxRtrAdvInterval, where MaxRtrAdvInterval is the
               maximum RA interval as defined in [RFC4861].  A value of
               all one bits (0xffffffff) represents infinity.  A value
               of zero means that the RDNSS addresses MUST no longer
               be used.


So it should be AT LEAST 1800 and the error message seems to be enforcing a maximum of 1200 seconds.

further in the a paragraph:

         The rationale of the default value of the Lifetime field is as
         follows.  The Router Lifetime field, set by AdvDefaultLifetime,
         has the default of 3 * MaxRtrAdvInterval as specified in
         [RFC4861], so such a default or a larger default can allow for
         the reliability of DNS options even under the loss of RAs on
         links with a relatively high rate of packet loss.  Note that
         the ratio of AdvDefaultLifetime to MaxRtrAdvInterval is the
         number of unsolicited multicast RAs sent by the router.  Since
         the DNS option entries can survive for at most three
         consecutive losses of RAs containing DNS options, the default
         value of the Lifetime lets the DNS option entries be resilient
         to packet-loss environments.

Same at Paragraph 5.2 DNS Search List Option


   Lifetime    32-bit unsigned integer.  The maximum time in seconds
               (relative to the time the packet is received) over which
               these DNSSL domain names MAY be used for name resolution.
               The Lifetime value has the same semantics as the
               semantics for the RDNSS option.  That is, Lifetime SHOULD
               by default be at least 3 * MaxRtrAdvInterval.  A value of
               all one bits (0xffffffff) represents infinity.  A value
               of zero means that the DNSSL domain names MUST no longer
               be used.


I think this may be left over from the old RFC 6106, since in the Appendix A.  Changes from RFC 6106

   o  This document allows a higher default value of the lifetime of the
      DNS RA options than RFC 6106 in order to avoid the frequent expiry
      of the options on links with a relatively high rate of packet
      loss; at the same time, this document also makes additional
      clarifications.  The lifetime's lower bound of
      2 * MaxRtrAdvInterval was shown to lead to the expiry of these
      options on links with a relatively high rate of packet loss.  To
      avoid this problem, this revision relaxes the lower bound and sets
      a higher default value of 3 * MaxRtrAdvInterval.

Title: Re: Isn't this a bug in the ipv6 RA configuration?
Post by: IsaacFL on July 27, 2021, 03:01:53 AM
Looks like this is already being addressed:

https://github.com/opnsense/core/pull/4893