Hyper Open Edge Cloud

HowTo Install Ipv6

How to install Ipv6 to get remote access to the VM
  • Last Update:2020-02-07
  • Version:001
  • Language:en

Precondition

A Linux-like operating system has been installed on your VM. Here we take Debian 10 Linux system as example. 

There are two ways to install ipv6 in order to get remote access to your VM. 

Option 1: Permanent solution (will last after reboot)

This solution will setup IPv6 on ens4 interface inside your VM by modifying a configuration file. Even if you reboot your machine, the IPv6 will still be configured.

  • Use editor (e.g. nano) as root to add the following lines in /etc/network/interfaces:

(find following network configuration in your rapid space console: kvm[your_VM]-ipv6-info

auto ens4
iface ens4 inet6 static
  address [your_IPv6]
  netmask 80
  gateway [your_gateway]
  • Reboot the machine
reboot

Option 2: Temporary solution (won't last after reboot)

This solution will setup IPv6 on ens4 interface inside your VM by running a script. If you reboot your machine, the IPv6 setup will be gone and you will need to run the command again.

Run the following command inside your VM:

wget -O- http://10.0.2.100/ipv6_config.sh | /bin/sh -

 

Check if the setup is successful:

Run the following cmmands in your VM:

  • ip -6 address show dev ens4 # You should find your IPv6 address in kvm[your_VM]-ipv6-info in the line of inet6
  • ip -6 route # You should see a line like default via [your_gateway] dev ens4 metric 1024  pref medium

 

From another machine which already has IPv6, you should now be able to ping your VM:

ping6 [your_IPv6]

If you have installed ssh server (apt install openssh-server) inside your VM, you can now access it with the command:

ssh [your_username]@[your_IP]

 

Notes

  1. The option 1 is specific to Debian like operating system. In other operating systems, the file to configure your network may be different, please refer to the user manual of your operating system in order to know how to configure IPv6.
  2. The option 2 uses wget and ip commands which are widely available in Linux systems, so you should be able to use it on any Linux system.