IP addresses > Multi-IP: configuring it on Windows and Linux

07 Multi-IP: configuring it on Windows and Linux

What to know before proceeding

The operations described may affect the system and data, potentially causing malfunctions or data loss:
  • always back up your data or the entire server externally before performing any operation;
  • if available, create a snapshot of the server from the management panel before making changes to the system;
  • for unmanaged services, you are responsible for managing the operating system and software;
  • if in doubt, consult a trusted system administrator or check the latest official documentation for the operating system or software in use.
 
This guide explains how to configure Multi-IP for OpenStack Cloud Server and VMware Cloud Server.

Before configuring Multi-IP in the operating system, you must:
  • have purchased the additional public IP addresses;
  • have noted the network parameters available on the details page of each public IP address;
  • have associated them with the Cloud Server network interface.
The following procedures cover only the permanent addition of public IPv4 addresses to an already configured Cloud Server. The settings must be retained after a restart.

Before changing the network configuration, identify the relevant interface and keep a copy of the existing configuration.
Changing the network configuration may interrupt Cloud Server connectivity. Do not replace the primary IP address or change any existing gateways, DNS servers or routes. Before proceeding, make sure you can use the recovery console.

How Multi-IP configuration works

Multi-IP configuration consists of adding one or more public IPv4 addresses to the same network interface without changing the primary IP address or the default gateway. The additional addresses must be configured permanently in the operating system so that they remain available even after the Cloud Server restarts.

Configuring Multi-IP on Windows

To add one or more public IPv4 addresses to the network interface of a Windows Cloud Server:
  • access the Cloud Server using the recovery console;
  • go to Start > Control Panel > Network and Internet > Network and Sharing Center and select Change adapter settings;
  • locate the network interface with which you have associated the additional public IP addresses;
  • right-click the network interface and select Properties;
  • select Internet Protocol Version 4 (TCP/IPv4) and then Properties;
  • if the interface already uses a static IPv4 configuration, select Advanced;
  • in the IP addresses section of the IP Settings tab, select Add;
  • enter the parameters of the additional public IP address:
    • IP address: the public IPv4 address to configure;
    • Subnet mask: the corresponding subnet mask.
  • select Add to confirm;
  • repeat the procedure for each additional public IP address to configure on the same network interface;
  • confirm the changes and close the network properties windows without modifying any existing IP addresses, gateways or DNS servers;
  • check that all additional IP addresses have been configured on the network interface.
To check the configured IPv4 addresses, open Command Prompt and run:

ipconfig /all

Configuring Multi-IP on Ubuntu

The IPv4 addresses and network prefixes shown in the example are for illustrative purposes only. Use the public IP addresses actually associated with the Cloud Server and their corresponding network parameters.
 
  • Access the Cloud Server using the recovery console;
  • identify the relevant network interface by running:

    ip -4 addr

  • display the Netplan configuration files:

    ls /etc/netplan/

  • identify the YAML file containing the configuration of the relevant interface and make a backup copy;
  • open the configuration file:

    sudo nano /etc/netplan/file-name.yaml

  • in the addresses section of the network interface, add the additional public IPv4 addresses, keeping the primary IP address and the existing gateway and DNS settings:

    addresses:
      - 192.0.2.10/24
      - 192.0.2.20/24
      - 192.0.2.30/24

  • if the interface uses DHCP for its primary address, keep the dhcp4: true setting and add the public IPv4 addresses to the addresses list without disabling DHCP;
  • do not replace the rest of the existing YAML configuration with the example snippet;
  • save the file and check the configuration syntax:

    sudo netplan generate

  • test the configuration:

    sudo netplan try

  • confirm the changes if connectivity is working correctly;
  • check that the additional IP addresses are present on the network interface:

    ip -4 addr

Configuring Multi-IP on AlmaLinux

The IPv4 addresses and network prefixes shown in the example are for illustrative purposes only. Use the public IP addresses actually associated with the Cloud Server and their corresponding network parameters.
 
  • Access the Cloud Server using the recovery console;
  • identify the active network connection and its network interface by running:

    nmcli connection show --active

  • display the IPv4 addresses and gateway configured for the connection:

    nmcli -f ipv4.addresses,ipv4.gateway connection show "connection-name"

  • add the first public IPv4 address to the connection:

    sudo nmcli connection modify "connection-name" +ipv4.addresses "192.0.2.20/24"

    • repeat the command for each additional public IP address to configure:

      sudo nmcli connection modify "connection-name" +ipv4.addresses "192.0.2.30/24"

  • apply the changes to the network interface:

    sudo nmcli device reapply interface-name

  • check that the additional IP addresses are present on the network interface:

    ip -4 addr

 
In the nmcli connection modify command, the + symbol before ipv4.addresses allows you to add an address without replacing those already configured. The changes are saved in the persistent NetworkManager configuration.

If the nmcli device reapply command cannot apply the changes, check the connection status before attempting to reactivate it, as this may temporarily interrupt connectivity.

Configuring Multi-IP on Debian

The IPv4 addresses and network prefixes shown in the example are for illustrative purposes only. Use the public IP addresses actually associated with the Cloud Server and their corresponding network parameters.
 
  • Access the Cloud Server using the recovery console;
  • identify the relevant network interface by running:

    ip -4 addr

  • check the existing network configuration in the file:

    /etc/network/interfaces

  • check the existing network configuration in the directory:

    /etc/network/interfaces.d/

  • if the network interface is managed by ifupdown, identify its configuration file and make a backup copy;
  • open the file and add the commands for configuring the additional IPv4 addresses to the interface section:

    up ip addr add 192.0.2.20/24 dev ens192
    down ip addr del 192.0.2.20/24 dev ens192

  • repeat the up and down directives for each additional public IP address to configure;
  • save the file without changing the primary IP address, gateway or DNS servers already configured;
  • apply the first additional address to the network interface without restarting the connection:

    sudo ip addr add 192.0.2.20/24 dev ens192

  • repeat the ip addr add command for each additional public IPv4 address you want to make immediately available, using the corresponding address and prefix;
  • check that all additional IP addresses are present on the network interface:

    ip -4 addr

 
The up and down directives are executed when the interface managed by ifupdown is brought up and down, respectively. The ip addr add command makes the address available immediately without restarting the connection. The configuration saved in the file allows the additional addresses to be restored whenever the interface is brought up again.

Configuring Multi-IP on openSUSE

The following procedure applies to openSUSE templates that use YaST with the Wicked network manager. If the installed version does not provide the Additional Addresses feature, check the network management system before proceeding.

To add multiple public IPv4 addresses to the existing configuration:
  • access the Cloud Server using the recovery console;
  • start YaST by running:

    sudo yast2

  • go to Network Devices > Network Settings;
  • locate the relevant network interface and select Edit;
  • in the Address section, locate Additional Addresses and select Add;
  • enter the additional public IPv4 address and the corresponding subnet mask, leaving the Alias Name field blank, if present;
  • repeat the procedure for each additional public IP address to configure;
  • confirm the changes, keeping the primary IP address, default gateway and DNS servers unchanged;
  • complete the procedure using Next and OK, if available in the YaST version used;
  • check that the additional IP addresses are present on the network interface by running:

    ip -4 addr