Each of these examples assume 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
as the main IPv6 address to assign. We will also be configuring 2001:db8:1000::200
as a secondary IPv6 address. Adding a secondary IPv6 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 VM’s 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 restart
If 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 settings 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=2
Populate 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 auto
Restart networking or reboot.
systemctl restart networking.service
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::200
Restart networking or reboot.
systemctl restart networking.service
For dynamic configuration, add the following lines to the /etc/network/interfaces
file.
iface ens3 inet6 auto
Restart networking or reboot.
systemctl restart networking.service
For 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::200
Restart networking or reboot.
systemctl restart networking.service
Add 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.service
Run 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 start
For 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 start
Add the following lines to the /etc/hostname.vio0
file.
inet6 autoconf -autoconfprivacy
inet6 alias 2001:db8:1000::200 64
Restart the interface or reboot.
sh /etc/netstart vio0
Add the following lines to the /etc/hostname.vio0
file.
inet6 autoconf -autoconfprivacy -soii
inet6 alias 2001:db8:1000::200 64
Restart the interface or reboot.
sh /etc/netstart vio0
For dynamic configuration, add the following lines to the /etc/network/interfaces
file.
iface eth0 inet6 auto
Reboot 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::200
If 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 settings 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=2
For dynamic configuration, add the following lines to the /etc/network/interfaces
file.
iface ens3 inet6 auto
Restart networking or reboot.
systemctl restart networking.service
For 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::200
Restart networking or reboot.
systemctl restart networking.service
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 apply
Find 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 and 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"