DEVICE=eth0:1Īfter adding each device remember to run ifup eth0:1
Each device should have a different eth0 and IP. To add further IPs to your guest machine simply add more network devices. That’s the process complete and you can repeat this process to add more additional IPs. Next all that’s needed to be done is to bring the additional network interface up.
Remove any reference to “GATEWAY” there is no need to specify a gateway as all additional IPs will be routed to the MAC address of your NVMe VPS The file will look like this NM_CONTROLLED="no" If your server is running CentOS 7 remove the # from the above code. NETMASK=255.255.255.255 Additional IPs CentOS 7 / 8įor CentOS 7 or CentOS 8 KVM servers, you will need to ensure Network Manager is disabled for additional interfaces.
Replace Additional IP with your IP address. Just delete everything and copy the below code. You will now see the device configuration which should be like this, your screen will show DEVICE=eth0.Ĭhange the values in this file to reflect the below. nano /etc/sysconfig/network-scripts/ifcfg-eth0:0 Now we can edit this file, don’t worry if you make a mistake as this is a secondary device it won’t harm the connection to your guest virtual machine. Configure Additional IPs In CentOSįirstly we take a copy of the eth0 file cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
This is the manual way of configuring additional IPs. This setup guide relates to our network and will not work with other providers. This guide will also work on CentOS Dedicated Servers. This would save time having to create an interface for each IP. If you have a subnet you could also use a range file to deploy the whole subnet to the server. Because of our network configuration and the way our KVM NVMe VPS servers are configured, to get any additional IPs or subnets to ping inside your virtual container and be accessible from the outside you need to add separate network interfaces for each additional IP.