NavigationContentFooter
Jump toSuggest an edit

How to configure IPv6 virtual machines with Proxmox on Elastic Metal

Reviewed on 30 July 2024Published on 30 July 2024

When you install your server with a virtualization solution like Proxmox, you can create multiple virtual machines on the physical server and configure them to use flexible IPv6 addresses.

This guide covers the steps for configuring the network interfaces on different distributions inside a virtual machine on a Proxmox host using flexible IPv6 addresses on Elastic Metal servers.

Tip

The DNS cache server (nameserver) may be different depending on the physical location of your server. Refer to our network information documentation to find the IPv6 addresses to use with your machine.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An Elastic Metal server with a hypervisor (Proxmox) installed on it
  • A flexible IPv6
  • A virtual MAC address

Finding your IPv6 gateway

  1. Log into your virtual machine using SSH.

  2. Identify your network interface:

    ip a

    Take note of your network interface name (e.g., ens18).

  3. Find your IPv6 gateway:

    ip -6 route

    Look for the line that specifies the default route. It should look like the following:

    default via fe80::xxxx:xxxx:xxxx:xxxx dev ens18 proto static metric 1024 onlink

    The fe80::xxxx:xxxx:xxxx:xxxx part is your link-local IPv6 gateway address.

Ubuntu - Configuration with Netplan

  1. Open the Netplan configuration file:

    sudo nano /etc/netplan/01-netcfg.yaml
  2. Create the network configuration:

    network:
    version: 2
    renderer: networkd
    ethernets:
    ens18:
    dhcp4: false
    dhcp6: false
    accept-ra: no
    addresses:
    - FLEXIBLE_IPv4/32
    - "FLEXIBLE_IPv6/64"
    routes:
    - to: 0.0.0.0/0
    via: 62.210.0.1
    on-link: true
    - to: "::/0"
    via: "LINK_LOCAL_IPv6_GATEWAY"
    on-link: true
    nameservers:
    addresses:
    - 51.159.47.28
    - 51.159.47.26

    Replace FLEXIBLE_IPv4, FLEXIBLE_IPv6, and LINK_LOCAL_IPv6_GATEWAY with your actual IP addresses.

  3. Apply the configuration:

    sudo netplan apply

Debian

  1. Edit the network interfaces file:

    sudo nano /etc/network/interfaces
  2. Configure the network interface:

    auto ens18
    iface ens18 inet static
    address FLEXIBLE_IPv4
    netmask 255.255.255.255
    gateway 62.210.0.1
    iface ens18 inet6 static
    address FLEXIBLE_IPv6
    netmask 64
    gateway LINK_LOCAL_IPv6_GATEWAY

    Replace FLEXIBLE_IPv4, FLEXIBLE_IPv6, and LINK_LOCAL_IPv6_GATEWAY with your actual IP addresses.

  3. Set the DNS resolver:

    sudo nano /etc/resolv.conf
  4. Add the following lines, then save and exit the file.

    nameserver 51.159.47.28
    nameserver 51.159.47.26
  5. Activate the network configuration:

    sudo ifup ens18

CentOS

  1. Edit the network script file:

    sudo nano /etc/sysconfig/network-scripts/ifcfg-ens18
  2. Configure the network interface:

    DEVICE=ens18
    BOOTPROTO=none
    ONBOOT=yes
    USERCTL=no
    IPV6INIT=yes
    PEERDNS=yes
    TYPE=Ethernet
    NETMASK=255.255.255.255
    IPADDR=FLEXIBLE_IPv4
    IPV6ADDR=FLEXIBLE_IPv6
    GATEWAY=62.210.0.1
    DNS1=51.159.47.28
    DNS2=51.159.47.26
    ARP=yes
    HWADDR=virtual:mac:address

    Replace FLEXIBLE_IPv4, FLEXIBLE_IPv6, and virtual:mac:address with your actual IP addresses and MAC address.

  3. Bring up the network interface:

    sudo ifup ens18
  4. Find the IPv6 gateway:

    ip -6 route

Debugging configuration issues

If your IPv6 configuration does not work as expected, follow these steps to troubleshoot:

  1. Check the interface configuration:

    ip a
    ip route
    ip -6 route
  2. Run a ping test:

    ping6 google.com
  3. Check the DNS resolution:

    dig google.com
    dig -6 google.com
  4. Review your network logs:

    sudo journalctl -u systemd-networkd
  5. Restart network services:

    sudo systemctl restart systemd-networkd
  6. Verify the link-local address:

    ip -6 addr show dev ens18
    ping6 LINK_LOCAL_IPv6_GATEWAY
See also
How to configure a flexible IP (IPv6)How to configure reverse DNS of a flexible IP
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway