Each of these examples assumes an IPv6 subnet of 2001:db8:1000::/64. You will need to update them with the subnet that you have been assigned.
We will be using 2001:db8:1000::100 this as the main IPv6 address to assign. We will also be configuring 2001:db8:1000::200 a secondary IPv6 address. Adding a secondary IPv6 address is not necessary, but it shows the process you would use if you wanted multiple IPv6 addresses.
Important Note: If you add an IPv6 subnet to an existing machine, you must restart the server via the AKLWEB HOST control panel before IPv6 will work. Restarting via SSH or similar is not sufficient. IPv6 would not work at all until the server has been restarted. This does not apply if you have selected IPv6 during the initial server deployment.
In the AKLWEB HOST control panel, there are configuration examples generated for each of your VMs. These are located under the VMs IPv6 settings, labeled “See configuration examples or documentation.“
Add the following lines to the /etc/sysconfig/network-scripts/ifcfg-eth0 file.
IPV6INIT="yes"
IPV6ADDR="2001:db8:1000::100/64"
IPV6_AUTOCONF="yes"
IPV6ADDR_SECONDARIES="2001:db8:1000::200/64"Restart networking or reboot.
service network restartIf you have IP forwarding enabled (using your server as a VPN or similar), you will also need to add the following lines to the /etc/sysctl.conf file. The default setting for these variables (which is 1) prevents IPv6 from working properly when IP forwarding is enabled. You can check if IP forwarding is enabled by running sysctl net.ipv4.ip_forward.
net.ipv6.conf.all.accept_ra=2
net.ipv6.conf.eth0.accept_ra=2Populate the /etc/sysconfig/network-scripts/ifcfg-ens3 file with the following text.
TYPE="Ethernet"
DEVICE="ens3"
ONBOOT="yes"
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6ADDR_SECONDARIES="2001:db8:1000::100 2001:db8:1000::200"Restart the connection or reboot.
nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens3
nmcli con up 'System ens3'For dynamic configuration, add the following lines to the /etc/network/interfaces file.
iface eth0 inet6 autoRestart networking or reboot.
systemctl restart networking.serviceFor static configuration, add the following lines to the /etc/network/interfaces file.
iface eth0 inet6 static
address 2001:db8:1000::100
netmask 64
up /sbin/ip -6 addr add dev eth0 2001:db8:1000::200Restart networking or reboot.
systemctl restart networking.serviceFor dynamic configuration, add the following lines to the /etc/network/interfaces file.
iface ens3 inet6 autoRestart networking or reboot.
systemctl restart networking.serviceFor static configuration, add the following lines to the /etc/network/interfaces file.
iface ens3 inet6 static
address 2001:db8:1000::100
netmask 64
up /sbin/ip -6 addr add dev ens3 2001:db8:1000::200Restart networking or reboot.
systemctl restart networking.serviceAdd the following lines to the /etc/sysconfig/network-scripts/ifcfg-ens3 file.
IPV6INIT="yes"
IPV6ADDR="2001:db8:1000::100/64"
IPV6_AUTOCONF="yes"
IPV6ADDR_SECONDARIES="2001:db8:1000::200/64"Restart networking or reboot.
systemctl restart network.serviceRun the following commands for dynamic IPv6 configuration and one additional IPv6 address (/128). Additional addresses can be added in the same fashion.
nmcli con mod 'Wired connection 1' ipv6.method 'auto' ipv6.addresses ''
nmcli con mod 'Wired connection 1' +ipv6.addresses '2001:db8:1000::200/128'
nmcli con up 'Wired connection 1'For dynamic configuration, add the following lines to the /etc/rc.conf file.
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"
ipv6_activate_all_interfaces="YES"
rtsold_enable="YES"
rtsold_flags="-aF"Start the router solicitation daemon or reboot.
service rtsold startFor static configuration, add the following lines to the /etc/rc.conf file.
rtsold_enable="YES"
ipv6_activate_all_interfaces="YES"
rtsold_flags="-aF"
ifconfig_vtnet0_ipv6="inet6 2001:db8:1000::100 prefixlen 64"
ifconfig_vtnet0_alias0="inet6 2001:db8:1000::200 prefixlen 64"Start the router solicitation daemon or reboot.
service rtsold startAdd the following lines to the /etc/hostname.vio0 file.
inet6 autoconf -autoconfprivacy
inet6 alias 2001:db8:1000::200 64Restart the interface or reboot.
sh /etc/netstart vio0Add the following lines to the /etc/hostname.vio0 file.
inet6 autoconf -autoconfprivacy -soii
inet6 alias 2001:db8:1000::200 64Restart the interface or reboot.
sh /etc/netstart vio0For dynamic configuration, add the following lines to the /etc/network/interfaces file.
iface eth0 inet6 autoReboot the instance.
For static configuration, add the following lines to the /etc/network/interfaces file.
iface eth0 inet6 static
address 2001:db8:1000::100
netmask 64
up /sbin/ip -6 addr add dev eth0 2001:db8:1000::200If you have IP forwarding enabled (using your server as a VPN router or similar), you will also need to add the following lines to the /etc/sysctl.conf file. The default settings for these variables (which are 1) prevent IPv6 from working properly when IP forwarding is enabled. You can check if IP forwarding is enabled by running sysctl net.ipv4.ip_forward.
net.ipv6.conf.all.accept_ra=2
net.ipv6.conf.eth0.accept_ra=2For dynamic configuration, add the following lines to the /etc/network/interfaces file.
iface ens3 inet6 autoRestart networking or reboot.
systemctl restart networking.serviceFor static configuration, add the following lines to the /etc/network/interfaces file.
iface ens3 inet6 static
address 2001:db8:1000::100
netmask 64
up /sbin/ip -6 addr add dev ens3 2001:db8:1000::200Restart networking or reboot.
Populate the /etc/netplan/10-ens3.yaml file with the following text.
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: yes
addresses:
- '2001:db8:1000::200/64'Update networking or reboot.
netplan applyFind the public interface name on your system. You can use ipconfig /all or navigate the Windows Control Panel.
Replace Ethernet With the public interface name that Windows has chosen, run the following commands.
netsh interface ipv6 set global randomizeidentifiers=disabled
netsh interface ipv6 add address interface="Ethernet" address="2001:db8:1000::100/64"
netsh interface ipv6 add address interface="Ethernet" address="2001:db8:1000::200/64"