6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
120 VMware, Inc.
esxcli <conn_options> network vswitch standard set --mtu=9000 --vswitch-name=vSwitch1
TheMTUisthesize,inbytes,ofthelargestprotocoldataunittheswitchcanprocess.Whenyousetthis
option,itaffectsalluplinksassignedtothevirtualswitch.
SettheCDPvalueforavSwitch.Youcansetstatustodown,listen,advertise,orboth.
esxcli <conn_options> network vswitch standard set --cdp-status=listen
--vswitch-name=vSwitch1
Setting Switch Attributes with vicfg-vswitch
Youcansetthemaximumtransmissionunit(MTU)andCDPstatusforavirtualswitch.TheCDPstatusshows
whichCiscoswitchportisconnectedtowhichuplink.Specifyoneoftheoptionslistedin“ConnectionOptions
forvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
SettheMTUforavSwitch.
vicfg-vswitch <conn_options> -m 9000 vSwitch1
TheMTUisthesize(inbytes)ofthelargestprotocoldataunittheswitchcanprocess.Whenyousetthis
option,itaffectsalluplinksassignedtothevirtualswitch.
SettheCDPvalueforavSwitch.Youcansetstatustodown,listen,advertise,orboth.
vicfg-vswitch <conn_options> --set-cdp ‘listen’
Checking, Adding, and Removing Port Groups
Youcancheck,add,andremoveportgroupswithESXCLIandwithvicfg-vswitch.
Managing Port Groups with ESXCLI
NetworkservicesconnecttovSwitchesthroughportgroups.Aportgroupallowsyoutogrouptrafficand
specifyconfigurationoptionssuchasbandwidthlimitationsandVLANtaggingpoliciesforeachportinthe
portgroup.Avirtualswitchmusthaveoneportgroupassignedtoit.Youcanassignadditionalport
groups.
Youcanuseesxcli network vswitch standard portgroup tocheck,add,andremoveportgroups.
Specifyoneoftheoptionslistedin“ConnectionOptionsforvCLIHostManagementCommands”onpage 18
inplaceof<conn_options>.
Listportgroupscurrentlyassociatedwithavirtualswitch.
esxcli <conn_options> network vswitch standard portgroup list
Liststheportgroupname,associatedvirtualswitch,activeclients,andVLANID.
Addaportgroup.
esxcli <conn_options> network vswitch standard portgroup add --portgroup-name=<name>
--vswitch-name=vSwitch1
Deleteoneoftheexistingportgroups.
esxcli <conn_options> network vswitch standard portgroup remove --portgroup-name=<name>
--vswitch-name=vSwitch1
Managing Port Groups with vicfg-vswitch
Networkservicesconnecttovirtualswitchesthroughportgroups.Aportgroupallowsyoutogrouptraffic
andspecifyconfigurationoptionssuchasbandwidthlimitationsandVLANtaggingpoliciesforeachportin
theportgroup.Avirtualswitchmusthaveoneportgroupassignedtoit.Youcanassignadditional
port
groups.Specifyoneoftheoptionslistedin“ConnectionOptionsforvCLIHostManagementCommands”on
page 18inplaceof<conn_options>.
Youcanusevicfg-vswitchtocheck,add,andremoveportgroups.
Checkwhetherportgroupsarecurrentlyassociatedwithavirtualswitch.
vicfg-vswitch <conn_options> --check-pg <port_group> vSwitch1