ESXi hosts are capable of using IPv4 and IPv6. In order to use static IPv6 routing, the following is required:
These parameters can be supplied via esxcli commands, ran on the host being configured. These commands can be used to automate static IPv6 configuration.
vSphere 8.0
Before you begin, SSH into the host to be configured, with the root user credentials.
Note the configure IPv6 routes and interface addresses by running these two commands:
esxcli network ip interface ipv6 address list
esxcli network ip route ipv6 list
To configure static IPv6:
esxcli network ip set --ipv6-enabled=true
esxcli network ip interface ipv6 set -i <vmkernelid> --enable-dhcpv6=false
esxcli network ip interface ipv6 set -i <vmkernelid> --enable-router-adv=false
esxcli network ip interface ipv6 address add --interface-name=<vmkernelid> --ipv6=<interfaceIPv6address>/<cidrPrefix>
## confirm the above interface ip gets added with esxcli network ip interface ipv6 address list
esxcli network ip interface ipv6 set -i <vmkernelid> -g <gatewayIPv6address>
esxcli network ip route ipv6 add --gateway <gatewayIPv6> --network ::/0
## confirm the above route gets added with esxcli network ip route ipv6 list
The IPv6 information can be further verified by logging in to the vSphere Client: