Configure IPs On your CentOS Dedicated Server
On some dedicated services, First2Host uses Failover IP blocks. To use Failover IPs you have to configure the IPs in your server. A Failover IP block is an IP block that can be routed to different servers. If you have Failover IPs and multiple dedicated servers you can change the routing of your whole IP block to point to a different dedicated server. This is useful if you are upgrading your dedicated server to a larger one or if you want to use the IP block on a different server.
The setup of Failover IP blocks is much the same Configuring IPs in a KVM VPS although you cannot yet install your IP block automatically from the control panel like you can a KVM VPS. Here we are going to create network interfaces and install your IP block manually.
Copy Network Interface
First, log in to your dedicated server and take a copy of the existing eth0 interface. We will use this as a template to create interfaces for each IP in the block.
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Next, edit the copied file using your favourite text editor and delete all of the text in the file. Replace the text with the below code
cd/etc/sysconfig/network-scripts/ ; nano ifcfg-eth0:0
Replace FAILOVER IP with the first IP in your block so, if your subnet was 192.168.0.1/29 you would put 192.168.0.1 in the APADDR and BROADCAST fields. Save and close the file.
#NM_CONTROLLED="no" DEVICE=eth0:0 BOOTPRONTO=static ONBOOT=yes IPADDR=FAILOVER IP BROADCAST=FAILOVER IP NETMASK=255.255.255.255
Next, we need to take down any existing interface and bring it back up. We do this with the ifdown and ifup commands.
Restart Interface
To bring down the interface enter;
ifdown eth0:0
Then to bring it backup enter;
ifup eth0:0
At this point, you should now be able to ping the IP address you just configured. If you cannot ping the IP please submit a ticket to our product support team. We will double-check the routing of the IP block for you.
Repeat the steps above to configure the rest of your IP block on your server. For the next IP, you can open up the existing interface, change the APADDR and BROADCAST fields to represent the next IP and save the file as eth0:1. The video below will show you how to do this.
How was this article? – How To Configure FailOver IPs On your CentOS Dedicated Server
You might also like
More from All About Linux
How to install FTP and configure FTP on an Ubuntu 22 LTS instance
If you need to upload files to your NVMe VPS you have a couple of options. You can use a …
How to install a Cloudflare Origin SSL Certificate – NGINX
An SSL Certificate is vital to encrypt data between you and your clients. SSLs can be complicated things. If they …
How To Open Port FirewallD and Close Port FirewallD -CentOS 7
Open And Close Ports In FirewallD - Manage Zones In FirewallD Like IPtables, FirewallD is a Linux firewall that filters packets …