Configure an IP as an alias

Configure an IP as an alias

CentOS y Fedora

  1. Create a backup of the configuration file

First, make a backup copy of the interfaces configuration file so that you can use it as a model.

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
  1. Edit the configuration file

You can now edit the eth0: 0 file to replace the IP.

editor /etc/sysconfig/network-scripts/ifcfg-eth0:0

Now change the device name and then the existing IP to your Failover IP.

DEVICE="eth0:0"
ONBOOT="yes"
BOOTPROTO="none" # For CentOS use "static"
IPADDR="IP_FAILOVER"
NETMASK="255.255.255.255"
BROADCAST="IP_FAILOVER"
  1. Restart the interface

Finally, restart the interface with the following command:

ifup eth0:0
Share this

Leave a reply

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.