How do I raise an additional IP address on my CentOS virtual machine?
You can buy additional IPs for your 20i virtual machine.
You must raise the IP address on the virtual machine for it to begin working.
To begin, connect to the VPS using SSH.
After connecting via SSH, you will need to head to the network-scripts directory by using the following command:
You'll then need to use the ifconfig command to check the current network interfaces. You should see something like this:
[root@vps-3f44d1 network-scripts]# ifconfig
inet 126.96.36.199 netmask 255.255.255.0 broadcast 188.8.131.52
inet6 fe80::5054:ff:fed1:de53 prefixlen 64 scopeid 0x20
ether 52:54:00:d1🇩🇪53 txqueuelen 1000 (Ethernet)
RX packets 2840575155 bytes 183137039747 (170.5 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20430463 bytes 3227329206 (3.0 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Once you have determined the network interface, you'll need to use a text editor of your choice to create a file within the network-scripts directory (based on the network interface name).
In our example, we'll need to create a script with a name of ifcfg-eth0:1. Within that file, the following will need to be added:
IPADDR=”[the new additional IP address]”
NETMASK=”[the Subnet Mask for the IP address, which can be found via Manage VPS IP Addressing]”
Once added, you'll need to restart networking on the virtual machine using:
service network restart
Upon successfully restarting, the new additional IP address should be raised.