Skip to main content

IPv6 Address

When you create an instance in the Arvancloud Cloud Server, by default it gets an IPv4 address so it can communicate with other servers or systems. In addition, all instances can use free IPv6, and you can add an IPv6 address to an instance during or after its creation.

When you enable IPv6 while creating the instance, its network interfaces are configured automatically, and you can use it without further manual configuration. That is why we recommend using this option for faster setup and to prevent configuration errors. However, you can also enable IPv6 on existing instances in your account after they are created, with manual configuration.

Enabling IPv6 When Creating an Instance​

When creating a new instance, you can build a server with the settings you want in a few simple steps. After choosing the region, operating system, instance size, and disk, you can add an IPv6 address to your new instance in the Network section.

Note that to enable IPv6, you must keep the IPv4 address enabled too.

After setting the other options and reviewing them, click Create Instance to create and start the server.

When the server is created, you can see the IPv6 address assigned to the server's network in the instance list, in the IP address section, or by clicking the instance details. This IP needs no configuration and is ready to connect.

Enabling IPv6 After Creating an Instance​

If you have an instance you created earlier and want to add an IPv6 address to it, go to Public IP in the Cloud Server panel, click Add Public IP, and select IPv6.

When you enable IPv6 on an existing instance, you need to configure its network settings manually on the server. These settings disable automatic network configuration and add information such as the name server, gateway address, and IPv6 address to the server.

To get the gateway address and subnet, go to Network and then Public IP in the Cloud Server panel.

Connect to the server through the instance console or SSH and change the settings based on your operating system distribution:

Open the /etc/netplan/50-cloud-init.yaml file and add the following lines to it:

network:
version: 2
ethernets:
eth0:
dhcp4: true
mtu: 1500
set-name: eth0
eth1:
accept-ra: false
addresses:
- {your_ipv6_and_subnet}
mtu: 1500
nameservers:
addresses:
- 2606:4700::1111
- 2001:4860:4860::8888
routes:
- to: ::/0
via: {gateway_address}
set-name: eth1

Then restart the network service:

sudo netplan apply

Checking the IPv6 Connection​

Note

To use IPv6, both sides of a connection must be able to send and receive IPv6 traffic. Since not all ISPs provide IPv6 addresses, you may not be able to connect to your instance's IPv6 address from your own system.

To check the IPv6 settings and connection, you can ping Google's IPv6 address from your instance:

ping6 2001:4860:4860::8888

If the settings are applied correctly and IPv6 works properly, the ping returns replies from that address with no packet loss.

Disabling IPv6​

To disable IPv6, connect to the server through the console or SSH and change the settings based on your operating system distribution:

Open the /etc/netplan/50-cloud-init.yaml file and remove the following lines from it:

network:
version: 2
ethernets:
eth0:
dhcp4: true
mtu: 1500
set-name: eth0
eth1:
accept-ra: false
addresses:
- {your_ipv6_and_subnet}
mtu: 1500
nameservers:
addresses:
- 2606:4700::1111
- 2001:4860:4860::8888
routes:
- to: ::/0
via: {gateway_address}
set-name: eth1

Then restart the network service:

sudo netplan apply