Adding additional IPv4 to CentOS

To View Network Gateway and Netmask

Click on "Manage" beside the VPS you wish to manage

switch tab

Next, Click on the "Manage Network" tab

gateway info

Here you will find the gateway and netmask of each IP address attached to your VPS, which is required later on.

Configuring additional IPv4

Edit the interfaces file,

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

Add the following into it,

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=IP_ADDRESS
GATEWAY=GATEWAY
NETMASK=NETMASK
ONBOOT=yes

Once the interfaces file is updated,

ifup eth0:1

Should activate up the interface with the new additional IP

To add more IPs,

  1. change ifcfg-eth0:1 to ifcfg-eth0:2, ifcfg-eth0:3, ifcfg-eth0:4 etc
  2. change DEVICE=eth0:1 to DEVICE=eth0:2, DEVICE=eth0:3, DEVICE=eth0:4 etc

in the files


Last Modified: April 10 2018 16:06:07