# 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

```sh
apt-get install iproute2
```

Red Hat / AlmaLinux / RockyLinux

```sh
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.

```sh
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.

```sh
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.

```sh
/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

```sh
ip link set eth1 up
```

##### RHEL / AlmaLinux / RockyLinux 10+

<div class="panel tabs-panel-container" id="bkmrk-gather-your-connecti"><div class="panel tabs-panel"><div class="tab-content"><div class="tab-pane active" role="tabpanel"><div class="code-toolbar"><div class="toolbar-item">Gather your connection name from the system connections folder.</div><div class="toolbar-item">  
</div></div></div></div></div></div>```sh
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.

```sh
nmcli connection modify Private_Network IPv4.address 54.34.12.0/29
```

Now, add the Gateway for your failover IP Block

```sh
nmcli connection modify Private_Network IPv4.gateway 54.34.12.6
```

Change the configuration from **auto** to **manual**:

```sh
nmcli connection modify Private_Network IPv4.method manual
```

Make the configuration persistent.

```sh
nmcli con mod 'Private_Network' connection.autoconnect true
```

Finally, add the static route.

```sh
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.

<div id="bkmrk-">  
</div>