How to Add an IPv6 Address to your Xen/KVM Linux VPS

This guide explains how to configure a static IPv6 address on common Linux operating systems.

You will need:

  • IPv6 Address: IPv6/64

  • Gateway: gateway address

  • Network Interface: eth0 or enX0 (replace as applicable)

Replace the above values with your actual details.

Ubuntu (18.04 / 20.04 / 22.04 / 24.04) – Netplan

Step 1: Identify the network interface

 
ip link

Step 2: Edit the Netplan configuration file

 
nano /etc/netplan/01-netcfg.yaml

(On some systems, this may be /etc/netplan/50-cloud-init.yaml)

Step 3: Configure IPv6 (latest Netplan routing method)

 
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      dhcp6: false
      addresses:
        - IPv6/64
      routes:
        - to: ::/64
          via: gateway address
      nameservers:
        addresses:
          - 2001:4860:4860::8888
          - 2606:4700:4700::1111

Replace eth0, IPv6/64, and gateway as required.

Step 4: Apply changes

 
netplan apply

Step 5: Verify

ip -6 addr show eth0
ip -6 route
 
 

Debian (9 / 10 / 11 / 12)

Step 1: Edit the interfaces file

 
nano /etc/network/interfaces

Step 2: Add IPv6 configuration

 
auto eth0
iface eth0 inet6 static
    address IPv6 address
    netmask 64
    gateway gateway address

Step 3: Restart networking

 
systemctl restart networking

Step 4: Verify

ip -6 addr show eth0
ip -6 route
 

CentOS / RHEL / AlmaLinux / Rocky Linux (7 / 8 / 9)

Step 1: Identify the interface

 
ip link

Step 2: Edit the interface configuration file

nano /etc/sysconfig/network-scripts/ifcfg-eth0
 

(or ifcfg-enX0)

Step 3: Add IPv6 configuration

 
IPV6INIT=yes
IPV6ADDR=IPv6/64
IPV6_DEFAULTGW=gateway address

Step 4: Restart networking

CentOS 7

systemctl restart network

CentOS 8 / 9

 
nmcli connection reload
nmcli connection up eth0

Step 5: Verify

ip -6 addr show eth0
ip -6 route

Temporary IPv6 Configuration (All OS – Not Persistent)

ip -6 addr add IPv6/64 dev eth0
ip -6 route add default via gateway
 
 

Note: This configuration will be lost after reboot.

Test IPv6 Connectivity

 
ping6 ipv6.google.com
 

Notes

  • IPv6 must be enabled at the provider level

  • Ensure firewalls allow IPv6 traffic

  • Network interface names may vary (eth0, ens3, enX0)

  • ipv6, xen, KVM, unified, storage
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

How to enable Two- factor Authentication for client area

What is Two-factor Authentication? Two-factor authentication adds an additional layer of...

How to Assign an IPv6 Address to Another NIC in Linux VPS - ServaRICA

In our VPS there are 2 scenarios to add an IPv6 address in VPS Those are  If VPS has 2...

Add SPF record for e-mail hosted at Servarica

Adding a txt SPF record for e-mail services hosted at ServaRICA   In order to make sure e-mail...

How to fix Network issue on Windows VMs

Windows recently Pushed the XenServer VM Tools update which caused problems with Xen PV drivers...

How to Mount the Extra Disk in Linux VM

1. Create the mount point (if it doesn’t exist) sudo mkdir -p /data 2. Check if the...