Configuring ESXi hosts to use static IPv6 routing by command line
search cancel

Configuring ESXi hosts to use static IPv6 routing by command line

book

Article ID: 421490

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

ESXi hosts are capable of using IPv4 and IPv6. In order to use static IPv6 routing, the following is required:

  •    DHCPv6 must be disabled.
  •    Router advertisement must be disabled.
  •    One or more valid IPv6 static addresses must be supplied for each adapter being configured.
    •    In addition to the interface address, a subnet prefix length and valid IPv6 address of the default gateway must be supplied.

These parameters can be supplied via esxcli commands, ran on the host being configured. These commands can be used to automate static IPv6 configuration.

Environment

vSphere 8.0

Resolution

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:

  1. In the vSphere Client, navigate to the host.
  2. On the Configure tab, expand Networking and select VMkernel adapters.
  3. Select the VMkernel adapter on the target distributed or standard switch and click the arrows button to the left of the vmkernel name.
  4. Click the IP Settings tab, and review the IPv6 settings:
    • DHCP should be Disabled.
    • Router advertisement should be Disabled.
    • The static IPv6 address for the interface should be shown.
    • The specified Default gateway should be shown.