2.0-ALPHAALPHA CARP with Virtual IP Aliases



  • When trying to configure CARP for IP alias subnet (w.x.y.1/24) on any interface, Virtual CARP IP screen fails with the following error:

    The following input errors were detected:

    * Sorry, we could not locate an interface with a matching subnet for w.x.y.z/24. Please add an IP alias in this subnet on this interface.

    Also, if the IP alias interface is changed, IP is added to the new interface, but not removed from the old interface until a reboot.



  • After looking at firewall_virtual_ip_edit.php around line 139, function get_configured_interface_list doesn't seem to return the virtual ip alias address/subnet defined for an interface. 
    There currently don't seem to be any extra checks for virtual ip aliases, leading to the error message.

    Is the intent to update get_configured_interface_list to list virtual ip aliases or use/create another function to scan them?

    As always, great work so far.



  • Try next snap i checked in a fix.



  • Thanks,

    Virtual IP aliases now move as expected when interface is changed via the GUI.  I noticed that Virtual IP alias is NOT removed from last active interface upon deletion of the alias.

    CARP seems to behave as before.



  • As I'm not skilled enough to fix the problem with virtual IP aliases not being reported as interfaces when trying to add a CARP IP, I bypassed to check in the GUI and backend code.

    The next problem I ran into, is that CARP addresses on IP alias networks did not startup correctly on boot.

    I believe the problem lies in:

    /etc/inc/interfaces.inc around line 710

    It appears that CARP is being configured before IP alias interfaces on boot.  As a result, CARP is unable to determine the physical interface to attach to.  Reversing the startup order has fixed this specific problem.


Log in to reply