Knowledge Base

Manually adding a 2nd IP address to a CentOS installation?

If you have purchased a second ip address for your Centos installation and need to add the new static ip address, follow these simple steps:

Create the following file:

/etc/sysconfig/network-scripts/ifcfg-eth0:1

And inside this file add the following contents, be sure to replace 123.45.67.89 with your new ip address:

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=123.45.67.89
NETMASK=255.255.255.0
ONBOOT=yes

Once completed, activate this and restart networking with the following commands:

# ifup eth0:1
# service network restart

Please rate this article to help us improve our Knowledge Base.

0 0