To configure the network in your Linux Cloud Servers, the network card connected to the Virtual Switch
needs to have its own private IP address. To do this on Linux operating systems you need to connect to the Cloud Server via SSH
or via the Recovery Console
. You can also configure the network card in Linux either temporarily (until the next reboot), or permanently.
To configure the card temporarily, for diagnostic purposes or to check or test its functionality, proceed as follows:
- Run the
ifconfig command like so:
ifconfig <interface> <ip_address> netmask <netmask>
<interface> is the card that you want to configure (eth0 eth1 eth2);
<ip_address> is the private IP address that you wish to configure;
<netmask> the sub netmask that you want to use;
E.g. by running
ifconfig eth2 18.104.22.168 netmask 255.255.255.0 you will configure the "eth2" adapter with the "22.214.171.124" IP and the "255.255.255.0" subnet mask.
- Run the ifconfig command:
to check that the card has been configured correctly (e.g.
ifconfig eth2 to check the new setting on the card eth2).
To configure the network interface permanently, proceed as follows:
iface lo inet loopback
iface eth0 inet static
- Run the command:
to edit the configuration file.
- Edit the file by entering the data for the IP previously recorded for the network card that you want to configure. Remember that to move around inside the text file you can use the arrows and to enter the new text just add it below to the existing rows (in the example you are configuring the network card eth0 with the network IP 192.168.0.99 with netmask 255.255.255.0).
- Once you have finished entering your data press "CTRL+O" to save the changes and then "CTRL+X" to exit the editor.
To assign IP addresses we recommend that you follow some basic rules to avoid any problems. For more details see the Private IP Address.
Repeat the operation described above for all the Cloud Servers that are part of the network you are configuring. We remind you that the IP selected for each Cloud Server of your network must be unique, otherwise a clash of IP’s could be generated which prevents the communication between the Cloud Servers via the private network.