Learn how to configure an IPv6 address on a Public Cloud instance.
Internet Protocol version 6 (IPv6) is the latest version of Internet Protocol (IP). It is designed to solve the long-anticipated exhaustion of IPv4 addresses by using 128-bit addresses rather than the standard 32-bit IPv4 addresses.
Each Public Cloud instance is delivered with an IPv4 address and an IPv6 address.
Floating IP and Gateway currently do not support IPv6. You can only use IPv6 with instances in Public Mode.
Requirements
- A Public Cloud instance (any model)
- Administrative access (root) via SSH or remote desktop (Windows) to your server
- A basic understanding of networking
OVHcloud Control Panel Access
- Direct link: Public Cloud Projects
-
Navigation path:
Public Cloud> Select your project
Instructions
The following sections contain configurations for the distributions we currently offer, as well as the most commonly used distributions/operating systems. The first step is always to log in to your server via SSH or a GUI login session (RDP for a Windows instance).
NOTE: On recent Linux distributions, IPv6 is configured by default on Public Cloud instances. Be sure to check your OS configuration file before making any changes.
Glossary
Here is a short glossary of the terms used in this tutorial:
| Glossary | Description |
| YOUR_IPV6 | The IPv6 address assigned to your service. |
| IPV6_PREFIX | The prefix of your IPv6 block (e.g. 2607:5300:60:62ac::/128 -> netmask = 128) |
| IPV6_GATEWAY | The gateway of your IPv6 block. |
Retrieve your network information
In your Public Cloud project, click on Instances in the left-hand menu.
Click the more options ... button next to the corresponding instance and choose Instance details.
All the information you need is in the Networks section.
Examples of persistent configuration
Examples
- The information below is provided as an example.
- Since you are the admin of your services, you will need to adapt the information to match your distribution or operating system.
NOTE: Before modifying a configuration file, always create a backup of the original.
First of all, connect to your instance via SSH.
Select the tab corresponding to your operating system.
Debian (excluding Debian 12)
By default, the configuration files are located in /etc/network/interfaces.d/.
The best practice is to create a separate configuration file in the /etc/network/interfaces.d/ directory to configure IPV6. In our example, our file is called 51-cloud-init-ipv6:
This separates the IPv6 configuration and lets you revert changes easily if needed.
Add the following lines to the file. Replace the generic elements (i.e. YOUR_IPV6, IPV6_PREFIX and IPV6_GATEWAY) as well as the network interface (if your server is not using eth0) with your specific values:
Configuration example
Then restart your network service with one of the following commands:
Ubuntu and Debian 12
The network configuration files are located in the /etc/netplan/ directory.
The best practice is to create a separate configuration file in the /etc/netplan/ directory to configure IPV6. In our example, our file is called 51-cloud-init-ipv6.yaml:
This separates the IPv6 configuration and lets you revert changes easily if needed.
Add the following lines to the file. Replace the generic elements (i.e., YOUR_IPV6, IPV6_PREFIX, and IPV6_GATEWAY) as well as the network interface (if your server is not using eth0) with your specific values:
It is important to respect the alignment of each element in this file as represented in the example above. Do not use the tab key to create your spacing. Only the space key is needed.
Configuration example
You can test your configuration using this command:
If it is correct, apply it using the following command:
RedHat / CloudLinux / Rocky Linux (8 & 9) / AlmaLinux (8 & 9)
The network configuration files are located in the /etc/sysconfig/network-scripts/ directory. We recommend that you start by backing up the relevant configuration file.
In our example, our file is called ifcfg-eth0, so we make a backup of the ifcfg-eth0 file using the following commands. Remember to replace eth0 with your actual interface if necessary.
You will then be able to revert the changes, using the commands below:
Then we edit the ifcfg-eth0 file, adding only the lines for the IPv6 configuration of the server. Replace the generic elements (i.e., YOUR_IPV6, IPV6_PREFIX, and IPV6_GATEWAY) with your specific values.
We have omitted the IPv4 configuration to avoid confusion, but the IPv6 configuration is made in the same configuration file.
Configuration example
Restart the network interface using one of the following commands:
Fedora / Rocky Linux (10) / AlmaLinux (10)
The network configuration file is located in the /etc/NetworkManager/system-connections/. We recommend that you start by backing up the relevant configuration file.
In our example, our file is called cloud-init-eth0.nmconnection, so we make a copy of the cloud-init-eth0.nmconnection file using the following commands. Remember to replace eth0 with your actual interface if necessary.
Then we edit the cloud-init-eth0.nmconnection file, adding only the lines for the IPv6 configuration of the server. Replace the generic elements (i.e., YOUR_IPV6, IPV6_PREFIX, and IPV6_GATEWAY) with your specific values.
If we assume that your interface is eth0, the configuration should look like this:
We have omitted the IPv4 configuration to avoid confusion, but the IPv6 configuration is made in the same configuration file.
Configuration example
Windows
By default, IPv6 is not configured on Windows Servers. To enable it, perform the following steps:
Go to Network Connections in Windows.
Then go to Properties for your network card by right-clicking on it.
Next, click on IPv6, and Properties.
Lastly, enter your IPv6 details.
Diagnostic
Have you configured your IPv6, but found that nothing works?
There is a simple operation to determine whether the error is in your configuration, or on the OVHcloud network.
Firstly, put your instance into rescue-pro mode.
Next, use the template commands below to configure your IP non-persistently, replacing ‘YOUR_IPV6’, ‘IPV6_PREFIX’, etc. with your own details:
Test your network again via a ping6, for example:
If your instance responds, there is likely an error in one of the steps taken for your initial configuration.
In any case, please feel free to reach out to our support team with the elements tested above, and we can perform an analysis on our end.
Go further
For more information and tutorials, please see our other Public Cloud Networking support guides or explore the guides for other OVHcloud products and services.