6.0

Table Of Contents
VMware, Inc. 125
Chapter 9 Managing vSphere Networking
Addanewuplinkadaptertoavirtualswitch.
vicfg-vswitch <conn_options> --link vmnic15 vSwitch0
Removeanuplinkadapterfromavirtualswitch.
vicfg-vswitch <conn_options> --unlink vmnic15 vSwitch0
Adding and Modifying VMkernel Network Interfaces
VMkernelnetworkinterfacesareusedprimarilyformanagementtraffic,whichcanincludevMotion,IP
Storage,andothermanagementtrafficontheESXisystem.YoucanalsobindanewlycreatedVMkernel
networkinterfaceforusebysoftwareanddependenthardwareiSCSIbyusingtheesxcli iscsicommands.
TheVMkernelnetworkinterfaceis
separatefromthevirtualmachinenetwork.Theguestoperatingsystem
andapplicationprogramscommunicatewithaVMkernelnetworkinterfacethroughacommonlyavailable
devicedriveroraVMwaredevicedriveroptimizedforthevirtualenvironment.Ineithercase,communication
intheguestoperatingsystemoccursasitwouldwitha
physicaldevice.Virtualmachinescanalso
communicatewithaVMkernelnetworkinterfaceifbothusethesamevirtualswitch.
EachVMkernelnetworkinterfacehasitsownMACaddressandoneormoreIPaddresses,andrespondsto
thestandardEthernetprotocolaswouldaphysicalNIC.TheVMkernelnetworkinterfaceis
createdwithTCP
SegmentationOffload(TSO)enabled.
YoucanmanageVMkernelNICswithESXCLI(see“ManagingVMkernelNetworkInterfaceswithESXCLI”
onpage 125)andwithvicfg-vmknic(see“ManagingVMkernelNetworkInterfaceswithvicfgvmknic”on
page 126).
Managing VMkernel Network Interfaces with ESXCLI
YoucanconfiguretheVMkernelnetworkinterfaceforIPv4(see“ToaddandconfigureanIPv4VMkernel
NetworkInterfaceforIPv4”onpage 125)orforIPv6(see“ToaddandconfigureaVMkernelNetwork
InterfaceforIPv6”onpage 126)withESXCLI.Incontrasttovicfg-vmknic,ESXCLIdoesnotsupport
enabling
vMotion.
YoucanaddandconfigureanIPv4VMkernelNICwithESXCLI.Specifyoneoftheoptionslistedin
“ConnectionOptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
To add and configure an IPv4 VMkernel Network Interface for IPv4
1AddanewVMkernelnetworkinterface.
esxcli <conn_options> network ip interface add --interface-name=vmk<x>
--portgroup-name=<my_portgroup>
YoucanspecifytheMTUsettingafteryouhaveaddedthenetworkinterfacebyusingesxcli network
ip interface set --mtu.
2ConfiguretheinterfaceasanIPv4interface.YoumustspecifytheIPaddressusing--ip,thenetmask,and
thename.Forthefollowingexamples,assumethatVMSFVMK363isaportgroup
towhichyouwantto
addaVMkernelnetworkinterface.
esxcli <conn_options> network ip interface ipv4 set --ipv4=<ip_address>
--netmask=255.255.255.0 --interface-name=vmk<X>
Youcansettheaddressasfollows.
<X.X.X.X>–StaticIPv4address.
DHCPUseIPv4DHCP.
TheVMkernelsupportsDHCPonlyforESXi4.0andlater.
Whenthecommandfinishessuccessfully,thenewlyaddedVMkernelnetworkinterfaceisenabled.
3ListinformationaboutallVMkernelnetworkinterfacesonthesystem.
esxcli <conn_options> network ip interface list