Configuring an Additional IP

Objective

Info

This article is about Additional IPv4 configuration on a public interface. You can also configure IPv6 addresses on your Public Cloud instances using this guide.

Additional IP addresses can also be configured in a vRack (private network), which allows interconnection over a wide range of OVHcloud services, offering more flexibility.

You can find more information about configuring Additional IP addresses in a vRack for usage with Public Cloud instances in the following guides:

You may need to configure Additional IP addresses on your instances, for example if you are hosting multiple websites or international services. OVHcloud Additional IPs allow you to associate multiple IP addresses with a single network interface.

This guide explains how to add Additional IP addresses to your network configuration.

Warning

OVHcloud is providing you with services for which you are responsible, with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.

This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend that you contact a specialist service provider if you have difficulties or doubts concerning the administration, usage or implementation of services on a server.

Requirements

Instructions


OVHcloud Control Panel Access


The following sections contain the configurations for the most commonly used distributions/operating systems. The first step is always to log in to your instance via SSH or a GUI login session (VNC for a Windows instance). The examples below presume you are logged in as a user with elevated permissions (Administrator/sudo).

Info

Concerning different distribution releases, the procedure to configure your network interface and the file names may have changed. We recommend consulting the manuals and knowledge resources of the respective OS versions if you experience any issues.

The following terminology is used in code examples and instructions below:

TermDescriptionExamples
ADDITIONAL_IPAn Additional IP address assigned to your service169.254.10.254
NETWORK_INTERFACEThe name of the network interfaceeth0, ens3
IDID of the IP alias, starting with 0 (depending on the number of additional IPs there are to configure)0, 1
Info

When configuring an Additional IP on a Public Cloud instance, you do not need a gateway and subnet mask.

Tip

Select the tab corresponding to your operating system.

Debian 11
Debian 12+, Ubuntu 22.04+
AlmaLinux (8/9) / Rocky Linux (8/9) / CloudLinux (8/9)
Fedora / AlmaLinux (10) / Rocky Linux (10)
Plesk
Windows Server

Debian 11

Step 1: Disable automatic network configuration

Open the following file path with a text editor:

sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Enter the following line, then save and exit the editor.

network: {config: disabled}

Creating this configuration file will prevent changes to your network configuration from being made automatically.

Step 2: Edit the network configuration file

You can verify your network interface name with this command:

ip a

Open the network configuration file for editing with the following command:

sudo nano /etc/network/interfaces.d/50-cloud-init

Then add the following lines:

auto NETWORK_INTERFACE:ID
iface NETWORK_INTERFACE:ID inet static
address ADDITIONAL_IP
netmask 255.255.255.255

Step 3: Restart the interface

Apply the changes with the following command:

sudo systemctl restart networking

Troubleshooting

First, soft-reboot your instance via the instance's OS or from the OVHcloud Control Panel. If you are still unable to connect to your Additional IP from the public network and suspect a network problem, reboot the instance in rescue mode. Then you can set up the Additional IP address directly on the instance.

Once you are connected in rescue mode via SSH, enter the following command:

ifconfig ens3:0 ADDITIONAL_IP netmask 255.255.255.255 broadcast ADDITIONAL_IP up

To test the connection, simply ping your Additional IP from the outside. If it responds in rescue mode, that probably means that there is a configuration error. If, however, the IP is still not working, please inform our support teams by creating a support request in your OVHcloud Control Panel for further investigations.

Go further

Importing an Additional IP

Migrating an Additional IP

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for assistance with your project.

Join our community of users.

Was this page helpful?