COMPUTING > Cloud Servers > Virtual switches and private networks > Configuring a private network in Linux openSuse Cloud Servers

9.3.5 Configuring a private network in Linux openSuse Cloud Servers Cloud Server Pro service guide

To configure the network in your Linux openSuse Cloud Servers, the network card connected to the Virtual Switch needs to have its own private IP address. To do this on Linux openSuse Operating Systems you need to connect to the Cloud Server via SSH or from the Recovery Console. On Linux it is also possible to configure the network adapter both temporarily (up to the next reboot), and permanently.
To configure the network adapter temporarily, for diagnostic purposes or to verify or test how it works, proceed as follows:
  1. Run the ifconfig command like so:
    ifconfig <interface> <ip_address> netmask <netmask>
    whereby:
    <interface> is the adapter that you wish to configure (eth0 eth1 eth2);
    <ip_address> is the private IP address that you wish to configure;
    <netmask> is the sub netmask that you wish to use;
    (E.g. by running ifconfig eth2 10.0.0.1 netmask 255.255.255.0 the "eth2" adapter will be configured with the "10.0.0.1" IP and "255.255.255.0" subnet mask).
  2. Run the ifconfig command:
    ifconfig <interface>
    from the command line to check that the network adapter has been configured correctly (e.g. ifconfig eth2 to check the new setting on the eth2 network adapter).
To configure the network interface permanently, proceed as follows:
  1. Run:
    yast2
    from the command line.
  2. In the graphical interface, move by using the arrow keys and the <Tab> on Network Settings in Network Devices and press "Enter".

  3. A list of the existing network interfaces will appear: move by using the arrow keys and the <Tab> and select the network adapter that you previously associated and after selecting [Edit] press "Enter".

  4. In "Address" make sure that "Statically assigned IP Address" is selected and then indicate the details of the IP Address and the Subnet Mask in the fields. Confirm the changes by click on "Next", wait for the saving process to be completed, confirm by clicking on "OK" and exit by selecting "Quit".

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 above operation for all the Cloud Servers that are included in the network that 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 excluding from the network the Cloud Servers with matching IPs.