6.0

Table Of Contents
VMware, Inc. 121
Chapter 9 Managing vSphere Networking
Thecommandreturns0ifthespecifiedportgroupisassociatedwiththevirtualswitch,andreturns1
otherwise.Usevicfg-vswitch --listtolistallportgroups.
Addaportgroup.
vicfg-vswitch <conn_options> --add-pg <port_group_name> vSwitch1
Deleteoneoftheexistingportgroups.
vicfg-vswitch <conn_options> --del-pg <port_group_name> vSwitch1
Managing Uplinks and Port Groups
YoucanmanageuplinksandportgroupswithESXCLIandwithvicfg-vswitch.
Connecting and Disconnecting Uplink Adapters and Port Groups with ESXCLI
Ifyoursetupincludesoneormoreportgroups,youcanassociateeachportgroupwithoneormoreuplink
adapters(andremovetheassociation).Thisfunctionalityallowsyoutofiltertrafficfromaportgrouptoa
specificuplink,evenifthevirtualswitchisconnectedwithmultipleuplinks.Specify
oneoftheoptionslisted
in“ConnectionOptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
Connectaportgroupwithanuplinkadapter.
esxcli <conn_options> network vswitch standard portgroup policy failover set
--active-uplinks=vmnic1,vmnic6,vmnic7
Thiscommandfailssilentlyiftheuplinkadapterdoesnotexist.
Makesomeoftheadaptersstandbyinsteadofactive.
esxcli <conn_options> network vswitch standard portgroup policy failover set
--standby-uplinks=vmnic1,vmnic6,vmnic7
Connecting and Disconnecting Uplinks and Port Groups with vicfg-vswitch
Ifyoursetupincludesoneormoreportgroups,youcanassociateeachportgroupwithoneormoreuplink
adapters(andremovetheassociation).Thisfunctionalityallowsyoutofiltertrafficfromaportgrouptoa
specificuplink,evenifthevirtualswitchisconnectedwithmultipleuplinks.Specify
oneoftheoptionslisted
in“ConnectionOptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
Connectaportgroupwithanuplinkadapter.
vicfg-vswitch <conn_options> --add-pg-uplink <adapter_name> --pg <port_group> <vswitch_name>
Thiscommandfailssilentlyiftheuplinkadapterdoesnotexist.
Removeaportgroupfromanuplinkadapter.
vicfg-vswitch <conn_options> --del-pg-uplink <adapter_name> --pg <port_group> <vswitch_name>
Setting the Port Group VLAN ID
YoucansettheportgroupVLANIDwithESXCLIandwithvicfg-vswitch.
Setting the Port Group VLAN ID with ESXCLI
VLANsallowyoutofurthersegmentasinglephysicalLANsegmentsothatgroupsofportsareisolatedasif
theywereonphysicallydifferentsegments.ThestandardisIEEE802.1Q.
AVLANIDrestrictsportgrouptraffictoalogicalEthernetsegmentwithinthephysicalnetwork.
SettheVLANIDto4095toallowaportgrouptoreachportgroupslocatedonotherVLAN.
SettheVLANIDto0todisabletheVLANforthisportgroup.
IfyouuseVLANIDs,youmustchangetheportgrouplabelsandVLANIDstogethersothatthelabels
properlyrepresentconnectivity.VLANIDsareoptional.