Configuring an IP address on a Linux is simple when using our 'Network Configuration' tool. Clicking this button will generate and display the necessary contents of each network configuration file that you will need to update on your Linux VPS. Please note that any custom configurations that may be in place will not be included.
Let's imagine we have a server and we just assigned a second IPv4 address:
To configure the second IPv4 address (192.168.11.110) on this server, we can copy the following lines from the 'Network Configuration' tool to the /etc/network/interfaces file:
iface eth0:0 inet static
Once these lines are in place, save the changes to the file and issue the following command via SSH:
ifup eth0:0 – at this point, our second IPv4 address should now be successfully configured and ready to go.
Let's imagine we have a server and we just assigned a second IPv6 address:
To configure the second IPv6 address (fc00:192:168:11::98) on this server, we will require three pieces of information from our 'Network Configuration' tool:
We can then issue the following commands, substituting in the appropriate values, for example:
ip -6 addr add fc00:192:168:11::98/64 dev eth0
ip -6 route add default via fc00:192:168:11::1 dev eth0
At this point, our second IPv6 address should now be successfully configured and ready to go.
Your changes made to IP addresses should start working immediately, without needing to reboot, after performing the above tasks.
However, if you have added an IP address via the Control Panel, and have not yet rebooted your server, it is extremely important that your next reboot is done via the Control Panel, not via the command line. For this reason you may decide to perform a reboot via the Control panel, immediately after adding an IP address. Future reboots can then be performed via the command line, and your new IP will continue to work.