6.0

Table Of Contents
VMware, Inc. 117
Chapter 9 Managing vSphere Networking
Packets filtered: 0
Packets faulted: 0
Packets queued: 0
Packets injected: 0
Packet errors: 0
5 RetrievecompletestatisticsforaNIC.
esxcli network nic stats get -n vmnic0
6GetaperVLANpackedbreakdownonaNIC.
esxcli network nic vlan stats get -n vmnic0
ThecommandreturnsthenumberofpacketssentandreceivedfortheVLANyouspecified.
Setting Up vSphere Networking with vSphere Standard Switches
Youcansetupyourvirtualnetworkbyperformingthesetasks.
7 Createormanipulatevirtualswitchesusingesxcli network vswitchorvicfg-vswitch.Bydefault,
eachESXihosthasonevirtualswitch,vSwitch0.Youcancreateadditionalvirtualswitchesormanage
existingswitches.See“SettingUpVirtualSwitchesandAssociatingaSwitchwith
aNetworkInterface”
onpage 117.
8 (Optional)Makechangestotheuplinkadapterusingesxcli network vswitch standard uplinkor
vicfg-nics.See“ManagingUplinkAdapters”onpage 122.
9 (Optional)Useesxcli network vswitch standard portgrouporvicfg-vswitchtoaddportgroups
tothevirtualswitch.See“ManagingPortGroupswithvicfgvswitch”onpage 120.
10 (Optional)Useesxcli network vswitch standard portgroup setorvicfg-vswitchtoestablish
VLANsbyassociatingportgroupswithVLANIDs.See“SettingthePortGroupVLANIDwith
vicfgvswitch”onpage 122.
11 Useesxcli network ip interfaceorvicfg-vmknictoconfiguretheVMkernelnetworkinterfaces.
See“A d d i n g andModifyingVMkernelNetworkInterfaces”onpage 125.
Setting Up Virtual Switches and Associating a Switch with a Network Interface
AvirtualswitchmodelsaphysicalEthernetswitch.Youcanmanagevirtualswitchesandportgroupsbyusing
thevSphereWebClient(seethevSphereNetworkingdocumentation)orbyusingvSphereCLIcommands.
Youcancreateamaximumof127virtualswitchesonasingleESXihost.Bydefault,eachESXi
hosthasasingle
virtualswitchcalledvSwitch0.Bydefault,avirtualswitchhas56logicalports.SeetheConfiguration
MaximumsdocumentonthevSpheredocumentationmainpagefordetails.Portsconnecttothevirtual
machinesandtheESXiphysicalnetworkadapters.
YoucanconnectonevirtualmachinenetworkadaptertoeachportbyusingthevSphereWebClientUI.
Youcanconnecttheuplinkadaptertothevirtualswitchesbyusingvicfg-vswitchoresxcli network
vswitch standard uplink.See“LinkingandUnlinkingUplinkAdapterswithvicfgvswitch”on
page 124.
Whentwoormorevirtualmachinesareconnectedtothesamevirtualswitch,networktrafficbetweenthemis
routedlocally.Ifanuplinkadapter
isattachedtothevirtualswitch,eachvirtualmachinecanaccessthe
externalnetworkthattheadapterisconnectedto.
Thissectiondiscussesworkinginastandardswitchenvironment.See“NetworkingUsingvSphere
DistributedSwitches”onpage 115forinformationaboutdistributedswitchenvironments.