6.5
Table Of Contents
- vSphere Command-Line Interface Concepts and Examples
- Contents
- About This Book
- vSphere CLI Command Overviews
- Introduction
- List of Available Host Management Commands
- Targets and Protocols for vCLI Host Management Commands
- Supported Platforms for vCLI Commands
- Commands with an esxcfg Prefix
- ESXCLI Commands Available on Different ESXi Hosts
- Trust Relationship Requirement for ESXCLI Commands
- Using ESXCLI Output
- Connection Options for vCLI Host Management Commands
- Connection Options for DCLI Commands
- vCLI Host Management Commands and Lockdown Mode
- Managing Hosts
- Managing Files
- Managing Storage
- Introduction to Storage
- Examining LUNs
- Detach a Device and Remove a LUN
- Reattach a Device
- Working with Permanent Device Loss
- Managing Paths
- Managing Path Policies
- Scheduling Queues for Virtual Machine I/O
- Managing NFS/NAS Datastores
- Monitor and Manage FibreChannel SAN Storage
- Monitoring and Managing Virtual SAN Storage
- Monitoring vSphere Flash Read Cache
- Monitoring and Managing Virtual Volumes
- Migrating Virtual Machines with svmotion
- Configuring FCoE Adapters
- Scanning Storage Adapters
- Retrieving SMART Information
- Managing iSCSI Storage
- iSCSI Storage Overview
- Protecting an iSCSI SAN
- Command Syntax for esxcli iscsi and vicfg-iscsi
- iSCSI Storage Setup with ESXCLI
- iSCSI Storage Setup with vicfg-iscsi
- Listing and Setting iSCSI Options
- Listing and Setting iSCSI Parameters
- Enabling iSCSI Authentication
- Set Up Ports for iSCSI Multipathing
- Managing iSCSI Sessions
- Managing Third-Party Storage Arrays
- Managing Users
- Managing Virtual Machines
- Managing vSphere Networking
- Introduction to vSphere Networking
- Retrieving Basic Networking Information
- Troubleshoot a Networking Setup
- Setting Up vSphere Networking with vSphere Standard Switches
- Setting Up Virtual Switches and Associating a Switch with a Network Interface
- Retrieving Information About Virtual Switches
- Adding and Deleting Virtual Switches
- Checking, Adding, and Removing Port Groups
- Managing Uplinks and Port Groups
- Setting the Port Group VLAN ID
- Managing Uplink Adapters
- Adding and Modifying VMkernel Network Interfaces
- Managing VMkernel Network Interfaces with ESXCLI
- Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
- Add and Configure an IPv6 VMkernel Network Interface with ESXCLI
- Managing VMkernel Network Interfaces with vicfg-vmknic
- Add and Configure an IPv4 VMkernel Network Interface with vicfg-vmknic
- Add and Configure an IPv6 VMkernel Network Interface with vicfg-vmknic
- Setting Up vSphere Networking with vSphere Distributed Switch
- Managing Standard Networking Services in the vSphere Environment
- Setting the DNS Configuration
- Manage an NTP Server
- Manage the IP Gateway
- Setting Up IPsec
- Manage the ESXi Firewall
- Monitor VXLAN
- Monitoring ESXi Hosts
- Index
Adding and Modifying VMkernel Network Interfaces
VMkernel network interfaces are used primarily for management trac, which can include vMotion, IP
Storage, and other management trac on the ESXi system. You can also bind a newly created VMkernel
network interface for use by software and dependent hardware iSCSI by using the esxcli iscsi commands.
The VMkernel network interface is separate from the virtual machine network. The guest operating system
and application programs communicate with a VMkernel network interface through a commonly available
device driver or a VMware device driver optimized for the virtual environment. In either case,
communication in the guest operating system occurs as it would with a physical device. Virtual machines
can also communicate with a VMkernel network interface if both use the same virtual switch.
Each VMkernel network interface has its own MAC address and one or more IP addresses, and responds to
the standard Ethernet protocol as would a physical NIC. The VMkernel network interface is created with
TCP Segmentation Ooad (TSO) enabled.
You can manage VMkernel NICs with ESXCLI and with vicfg-vmknic.
Managing VMkernel Network Interfaces with ESXCLI
You can congure the VMkernel network interface for IPv4 or for IPv6 with ESXCLI. In contrast to vicfg-
vmknic, ESXCLI does not support enabling vMotion.
For IPv4, see “Add and Congure an IPv4 VMkernel Network Interface with ESXCLI,” on page 145. For
IPv6, see “Add and Congure an IPv6 VMkernel Network Interface with ESXCLI,” on page 146.
Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
You can add and congure an IPv4 VMkernel NIC by using ESXCLI.
Specify one of the options listed in “Connection Options for vCLI Host Management Commands,” on
page 19 in place of <conn_options>.
Procedure
1 Add a new VMkernel network interface.
esxcli <conn_options> network ip interface add --interface-name=vmk<x> --portgroup-
name=<my_portgroup>
You can specify the MTU seing after you have added the network interface by using esxcli network
ip interface set --mtu.
2 Congure the interface as an IPv4 interface.
You must specify the IP address by using --ip, the netmask, and the name. For the following examples,
assume that VMSF-VMK-363 is a port group to which you want to add a VMkernel network interface.
esxcli <conn_options> network ip interface ipv4 set --ipv4=<ip_address> --
netmask=255.255.255.0 --interface-name=vmk<X>
You can set the address as follows.
n
<X.X.X.X> – Static IPv4 address.
n
DHCP – Use IPv4 DHCP.
The VMkernel supports DHCP only for ESXi 4.0 and later.
When the command nishes successfully, the newly added VMkernel network interface is enabled.
Chapter 9 Managing vSphere Networking
VMware, Inc. 145