How to add additional IP address on CentOS servers?

Create file: /etc/sysconfig/network-scripts/ifcfg-eth0:0

DEVICE="eth0:0"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=80.80.25.25
#HWADDR=00:0C:29:28:4C:4C
#GATEWAY=80.80.25.1
NETMASK=255.255.255.0

 

do this for each additional IP address, you only need to increase virtual interface number by one for each additional IP.

Like eg. eth0:1, eth0:2, eth0:3 ...

 

**if you don't have HWADDR then delete that line.

 

Restart Network

service network restart

 

Check all IP's configured on the server

ifconfig

 

if your new IP address is listed then you have successfully added a new IP address.

Was this answer helpful? 0 Users Found This Useful (0 Votes)