RA config page



  • Hi all!
    Please see post: https://forum.pfsense.org/index.php?topic=89123.0 first.

    Now the RA page needs some love :)

    Is it possible to add this to the GUI:
                    $radvdconf .= "\tMinRtrAdvInterval 5;\n";
    $radvdconf .= "\tMaxRtrAdvInterval 20;\n";
                    $radvdconf .= "\tAdvDefaultLifetime 7200;\n";
    I editied /etc/inc/services.inc to made this changes, but it would be great to have it in the gui.

    Now as far as my android device was concerned…
    When I set AdvDefaultLifetime to 7200, my issue with ipv6 and ipv4 dual stack immediatly dissapeared.
    Router lifetime of 60 seconds (which is the default value) IS TOO LOW.

    See here: https://code.google.com/p/android/issues/detail?id=79576

    What do you guys think about that?

    BR,
    m



  • Adding comment from google:

    MaxRtrAdvInterval 20 means that the device's CPU has to wake up to receive packets at least once every 20 seconds. That can get expensive when the device is on battery. In a network that doesn't change often, something one packet every 15 minutes (e.g., MinRtrAdvInterval 600, MaxRtrAdvInterval 1200) is more appropriate.



  • IPv6 is down at the moment for me but once its back up, I'll have to try this. I'm using track interfaces so there is no GUI for RA, even tho its still used (radvd that is)
    IMHO, I think there should be a RA advance-config page to fine-tune settings with a big warning.. Depending on your setup/config you can easily break IPv6.



  • I registered just for this :)

    https://redmine.pfsense.org/issues/4470



  • Hi guys!

    Would this be hard to add to 2.3 because of now everytime I have to edit services.inc to adjust it after upgrade or gitsync.

    Thanks!



  • @maverick_slo:

    Would this be hard to add to 2.3 because of now everytime I have to edit services.inc to adjust it after upgrade or gitsync.

    If you create a patch, and put that patch in System Patches with Auto Apply on, the change will be made for you automatically following an upgrade. If you gitsync, you can always apply the patch manually using System Patches.

    This should work:
    cp -p /etc/inc/services.inc /etc/inc/services.inc.original

    then edit services.inc

    diff -u /etc/inc/services.inc.original /etc/inc/services.inc | sed -Ee 's/^([+-]{3} .*).original/\1/' > /root/services.inc.patch

    then copy /root/services.inc.patch to your computer (for example using SFTP) or to some web space.

    Finally, to clean up:
    rm /etc/inc/services.inc.original

    Once you've done that, create a patch in System Patches. You can copy and paste the patch into System Patches or enter the URL if you've copied it to some web space (in which case you will need to press the Fetch button). Base Directory should be / and Path Strip Count should be 1.

    If you know how to use git and GitHub, it's easier to clone the pfSense repository and create a feature branch in your clone, then use GitHub's patch functionality in System Patches. Doing things thing way has the advantage of being able to submit a pull request easily, but it can take a while to learn how to get the best from git, even if you are used to other revision control systems.



  • @maverick_slo:

    Now as far as my android device was concerned…
    When I set AdvDefaultLifetime to 7200, my issue with ipv6 and ipv4 dual stack immediatly dissapeared.
    Router lifetime of 60 seconds (which is the default value) IS TOO LOW.

    The default value of 60 seconds appears too low, and it might be significant that it is 3 times MaxRtrAdvInterval. However, 7200 will be way too high in some cases, especially for those whose ISPs change the prefixes leased to them via DHCP-PD periodically.

    Does AdvDefaultLifetime of 300 (5 minutes) or 600 (10 minutes) solve your problem? That would be a more conservative choice than 7200 (2 hours)?

    If you followed my route to generating a patch, you can change 7200 for other values in the patch itself. Revert the patch, edit the patch directly in System Patches, then reapply the patch.

    As the patch is so short, It appears in the code block below:

    
    --- /etc/inc/services.inc	2015-12-15 23:09:39.000000000 +0000
    +++ /etc/inc/services.inc	2016-01-10 14:19:28.265281000 +0000
    @@ -123,6 +123,7 @@
     		$radvdconf .= "\tAdvSendAdvert on;\n";
     		$radvdconf .= "\tMinRtrAdvInterval 5;\n";
     		$radvdconf .= "\tMaxRtrAdvInterval 20;\n";
    +		$radvdconf .= "\tAdvDefaultLifetime 7200;\n";
     		$mtu = get_interface_mtu($realif);
     		if (is_numeric($mtu)) {
     			$radvdconf .= "\tAdvLinkMTU {$mtu};\n";
    
    


  • Hello!

    Prefixes don`t change at all in my case.

    Thanks for the patch heads-up it newer crossed my mind :)

    But still, to configure this via GUI on RA page, well this would be really cool :)



  • Oh and BTW, I had to change whole bunch of things that things started to work properly.
    Also for route and DNS etc…

    Thing is, after I did all the changes till now Android devices are working as expected. They don`t loose IPv6 at all.

    This is actually not Android bug, but manufactorers who produce radio and wlan chips.
    When Android goes to sleep it discards ALL RA packets which is not good. And this is why high values are needed.

    But when all chips will accept RA packets even when asleep pfSense 5-20 seconds ($radvdconf .= "\tMinRtrAdvInterval 5;\n"; AND $radvdconf .= "\tMaxRtrAdvInterval 20;\n";) will have significantly negative impact on battery life as android would wake up every (insert number between 5 and 20) seconds :)



  • Hmmm.
    Is this maybe it: https://github.com/pfsense/pfsense/pull/2393 ??
    :)
    Yay?



  • @maverick_slo:

    Hmmm.
    Is this maybe it: https://github.com/pfsense/pfsense/pull/2393 ??
    :)
    Yay?

    Yes - that (now committed) pull request adds configurability of these values in 2.3.



  • Seen it few days ago…
    But still, there is no way co configure min and max send interval (5 - 20 seconds is still way to high IMHO).



  • Hi!

    Ive updated [https://redmine.pfsense.org/issues/4470](https://redmine.pfsense.org/issues/4470) after Iv seen progress with one option now available in GUI.
    Is there any takers, this would be huge step up to RA configurability.

    I would do it myself, really, but my coding skills are ermmmm well I have almost none :)