6.7

Table Of Contents
For example, the VMkernel adapters vmk0 and vmk1 can be configured on a host.
n
vmk0 is used for management traffic on the 10.162.10.0/24 subnet, with default gateway 10.162.10.1
n
vmk1 is used for vMotion traffic on the 172.16.1.0/24 subnet
If you set 172.16.1.1 as the default gateway for vmk1, vMotion uses vmk1 as its egress interface with the
gateway 172.16.1.1. The 172.16.1.1 gateway is a part of the vmk1 configuration and is not in the routing
table. Only the services that specify vmk1 as an egress interface use this gateway. This provides
additional Layer 3 connectivity options for services that need multiple gateways.
You can use the vSphere Web Client or an ESXCLI command to configure the default gateway of a
VMkernel adapter.
See Create a VMkernel Adapter on a vSphere Standard Switch, Create a VMkernel Adapter on a Host
Associated with a vSphere Distributed Switch, and Configure the VMkernel Adapter Gateway by Using
esxcli Commands.
Configure the VMkernel Adapter Gateway by Using esxcli
Commands
You can override the default gateway of a VMkernel adapter to provide a different gateway for vSphere
vMotion by using esxcli commands.
Procedure
1 Open an SSH connection to the host.
2 Log in as the root user.
3 Run the following command.
Option Description
IPv4
esxcli network ip interface ipv4 set –i vmknic -t static –g
IPv4 gateway -I IPv4 address -N mask
IPv6
Important You must turn off DHCPv6 or Router Advertisement before you can
set the IPv6 vmknic gateway.
esxcli network ip interface ipv6 set -i vmknic -d off -r off
To add a static IPv6 address:
esxcli network ip interface ipv6 address add -i vmknic -I IPv6
address
To set the IPv6 vmknic gateway:
esxcli network ip interface ipv6 set -i vmknic -g IPv6 gateway
vSphere Networking
VMware, Inc. 69