Unable to change the default gateway or other settings for the vMotion stack or other TCP/IP stacks in the ESXi Host Client
search cancel

Unable to change the default gateway or other settings for the vMotion stack or other TCP/IP stacks in the ESXi Host Client

book

Article ID: 407935

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • When trying to change the default gateway of a TCP/IP stack in the ESXi Host Client (such as the vMotion stack) the following error is received:

    Failed - A specified parameter was not correct: DnsConfig.address
  • When trying to change other settings these errors may be received:

    Failed - A specified parameter was not correct: DnsConfig.VirtualNicDevice
    Failed - The object or item referred to could not be found.

Cause

In certain cases, due to a user interface limitation, it is not possible for the default gateway setting for a TCP/IP stack other than the Default TCP/IP stack to be saved from the ESXi Host Client.

Resolution

This setting can be set successfully in vSphere Client. vSphere Client is the recommended method of managing hosts that are connected to a vCenter.

Solution: 

  • Log in to the vSphere Client.

  • Select the ESXi host you are managing.

  • Click Configure.

  • Navigate to NetworkingTCP/IP configuration.

  • Select the ellipsis () next to the TCP/IP stack you want to configure (for example, vMotion).

  • Enter the default gateway in the VMkernel gateway field.

  • Click OK to apply the changes.

It is also possible to change this setting using the command line:

esxcfg-route -a default 172.16.##.1 -N "vmotion"

or

esxcfg-route -a 0.0.0.0/0 172.16.##.1 -N "vmotion"

- Replace "vmotion" with the name of your custom TCP/IP stack if needed
(you can obtain this using esxcli network ip netstack list).

- Replace 172.16.##.1 with the desired default gateway.

Confirm changes with: esxcfg-route -l -N "vmotion"

As an alternative, it is possible to set the gateway for an individual VMkernel. There are two ways to do this:

Option 1. Use vCenter to set the gateway for a single VMkernel adapter.

  • Log in to vSphere Client, then click on the host you are managing.
  • Select Configure, Networking, VMkernel adapters.
  • Select the ellipsis (...) next to the VMkernel adapter you want to configure, i.e. vmk2. Select IPv4 settings, check Use static IPv4 settings
  • and Override default gateway for this adapter.
  • Enter the default gateway and select OK.


Option 2. Use esxcli to set the default gateway for a single VMkernel adapter.

  • esxcli network ip interface ipv4 set --interface-name vmk2 --gateway 172.16.##.1 --type static --ipv4 172.16.##.99 --netmask 255.255.255.0
  • Replace vmk2, 172.16.##.1, 172.16.##.99 and 255.255.255.0 with your VMkernel name, default gateway IP, VMkernel IP address and netmask respectively.