Configuring IP aliasing / Additional IP Address on CentOS

Step 1: Create the config file

First, make a copy of the source file so that you can use it as a template:

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

Step 2: Edit the config file

You can now modify the eth0:0 file in order to replace the IP:

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

First, replace the name of the device, then replace the existing IP with the Additional IP you have received:

DEVICE="eth0:0"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="ADDITIONAL_IP"
NETMASK="255.255.255.255"
BROADCAST="ADDITIONAL_IP"

Step 3: Start the alias interface

You now need to start your alias interface:

ifup eth0:0

 

  • ip alias, ip aliasing, additional ip, extra ip
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 Server

Introduction A "LAMP" stack is a group of open source software that is typically installed...

perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

If you are getting the following error in your VPS / Dedicated server running linux, there is a...

Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 7 Server

Introduction A "LAMP" stack is a group of open source software that is typically installed...