India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How to Add an Additional IP to a Server

Last updated on February 1st, 2025 at 09:33 am

To add an additional IP to a server, follow these steps:

  1. Login to your Server via SSH Terminal
  2. Make sure you are logged in as the root user
  3. Run the following command: cd/etc/sysconfig/network-scripts/
  4. View current Network Adapters by running ls ifcfg*
  5. Note that the servers’ primary IP displays as “ifcfg-eth0” and “ifcfg-lo”
  6. Additional IPs on the server displays as “ifcfg-eth0:0”, “ifcfg-eth0:1”,
  7. To add an additional IP please run the command cp ifcfg-eth0 ifcfg-eth0:0
  8. Edit the ifcfg-eth0:0 configuration file by running vi ifcfg-eth0:0
  9. On the configuration file edit to change the “IPADDR” value to the new IP address and the “DEVICE” value to eth0:0
  10. Save the changes and exit the editor
  11. For changes to take effect and the IP to be recognized within the network run the following command
  12. /etc/init.d/network restart

 

Adding a Second and a Subsquent Additional Ip

– Just repeat the Processs

  1. Run the command cp ifcfg-eth0 ifcfg-eth0:0
  2. To open and edit the configuration file
  3. Run the command vi ifcfg-eth0:0
  4. On the configuration file edit to change the “IPADDR” value to the new IP address and the “DEVICE” value to eth0:0
  5. Save the changes and exit the editor
  6. For changes to take effect and the IP to be recognized within the network run the following command
  7. /etc/init.d/network restart

Well done You Have now added additional IP to the Server

× Let's Talk