Configure Failover/Floating IPs in vRack

Overview

If you are building a high‑availability network, you may also need to use public IPv4 addresses. This is often required for applications such as cPanel, which depend on publicly routed IPs to remain reachable during failover events. You cannot configure fixed IP blocks directly inside the vRack. When you purchase a failover IP block, the first address, the second‑to‑last address, and the final address in the block are reserved for network functions.

For example, if your failover block is 54.34.12.0/29, the reserved and usable addresses are:

54.34.12.0 <--- RESERVED / Network Address
54.34.12.1
54.34.12.2
54.34.12.3
54.34.12.4
54.34.12.5
54.34.12.6 <---- RESERVED / Gateway
54.34.12.7 <---- RESERVED / Broadcast

Server Configuration

Download iproute2. It might already be installed.

Debian / Ubuntu 

apt-get install iproute2

Red Hat / AlmaLinux / RockyLinux

dnf install iproute

Within your server, create the following file. If it already exists, edit the file. 

nano /etc/iproute2/rt_tables

Within the file, add the following vRack line.

#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 vrack

Save and close the file. The next steps depend on your distribution.

Debian 12 / Ubuntu 24

Open up the Cloudinit file and specify your failover IP block.

nano /etc/netplan/50-cloud-init.yaml

Remember to add your own Gateway and IP block.

eno2:
dhcp4: false
addresses:
- FIRST_USABLE_IP/29
routes:
- to: FULL_FAILOVER_BLOCK/29
  via: BLOCK_GATEWAY (2nd to last IP)
Debian 11  / Ubuntu 22

Open up the Cloudinit configuration file. 

/etc/network/interfaces.d/50-cloud-init

Inside the file, add your IP block and define the routing for the gateway. You’ll find these details in your failover IP block information, as shown in the example above.

auto eth1
iface eth1 inet static
address 54.34.12.1
netmask 255.255.255.240
broadcast 54.34.12.7
post-up ip route add 54.34.12.0/29 dev eth1 table vrack
post-up ip route add default via 54.34.12.6 dev eth1 table vrack
post-up ip rule add from 54.34.12.0/29 table vrack
post-up ip rule add to 54.34.12.0/29 table vrack
RHEL / AlmaLinux / RockyLinux 8 + 9

Copy the current interfaces file.

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1

Now, inside the copied file, define your failover IP block. Begin by declaring the first usable IP address from the block.

DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.240
IPADDR=54.34.12.1
ARP=yes

Now create a rule file to route traffic for your failover IP block through the vRack interface.

/etc/sysconfig/network-scripts/rule-eth1

Inside the file, add the rule.

from 54.34.12.0/29 table vrack
to 54.34.12.0/29 table vrack

Finally, add a static route.

/etc/sysconfig/network-scripts/route-eth1

Define the route in this file, making sure to specify the correct gateway for the block. The gateway is always the second‑to‑last IP address in your failover range.

54.34.12.0/29 dev eth1 table vrack
default via 54.34.12.6 dev eth1 table vrack

Reboot the server to apply the new configuration or, bring the new link up

RHEL / AlmaLinux / RockyLinux 10+
Gather your connection name from the system connections folder.

cd /etc/NetworkManager/system-connections

Next, using the connection name, add the IP block to the interface. In our example, our connection name is Private_Network.

nmcli connection modify Private_Network IPv4.address 54.34.12.0/29

Now, add the Gateway for your failover IP Block

nmcli connection modify Private_Network IPv4.gateway 54.34.12.6

Change the configuration from auto to manual:

nmcli connection modify Private_Network IPv4.method manual

Make the configuration persistent.

nmcli con mod 'Private_Network' connection.autoconnect true

Finally, add the static route.

ip route add 54.34.12.0/29 via 54.34.12.6 dev eno2

To Finish

You must repeat this process on every server that needs to use your failover IP block.



Revision #2
Created 2026-05-02 21:51:22 UTC by F2HCloud
Updated 2026-05-02 22:34:35 UTC by F2HCloud