Tutorial: Configuring UCARP/VRRP Failover Advanced Settings
Overview
This tutorial covers setting a unique VHID and configuring additional UCARP parameters for Access Server.
Installed Access Servers configured for failover.
Console access (both nodes) with root privileges.
Proper planning to handle two failover events during the configuration.
Connect to the primary node console and get root privileges.
Switch to the scripts directory:
cd /usr/local/openvpn_as/scripts/Adjust the VHID:
./sacli --key "ucarp.vhid" --value <NUMBER> ConfigPut systemctl restart openvpnasReplace <NUMBER> with a value from 1 to 255.
Wait a full minute for the primary node to relay the new configuration to the secondary node.
Connect to the secondary node console and get root privileges.
Restart the Access Server service:
systemctl restart openvpnas
To pass additional parameters to UCARP, use the following command:
./sacli --key "ucarp.extra_parms" --value "<PARAMETERS>" ConfigPut systemctl restart openvpnasReplace <PARAMETERS> with the desired UCARP parameters.
Suppose, for example, you want to override the standard scripts that Access Server uses when the node becomes active or assumes the standby role. In that case, you can pass new --upscript and --downscript parameters directly to UCARP and specify new scripts instead. For example, you could copy the original ucarp_standby and ucarp_active up/down scripts in the /usr/local/openvpn_as/scripts/ directory and edit them to suit your needs. If you edit the scripts directly, they will be reset to standard whenever you upgrade or reinstall Access Server. Thus, we recommend creating copies of the up/down scripts to customize instead with the following commands.
Create your up/down scripts.
To override the default UCARP scripts:
./sacli --key "ucarp.extra_parms" --value "--upscript /root/up --downscript /root/down" ConfigPut systemctl restart openvpnasTo revert to the default scripts:
./sacli --key "ucarp.extra_parms" ConfigDel systemctl restart openvpnas