6.5

Table Of Contents
c Add an uplink adapter. See “Linking and Unlinking Uplink Adapters with ESXCLI,” on page 144
and “Linking and Unlinking Uplink Adapters with vicfg-vswitch,” on page 144.
d (Optional) Change the MTU or CDP seings. See “Seing Switch Aributes with ESXCLI,” on
page 138 and “Seing Switch Aributes with vicfg-vswitch,” on page 139.
Retrieving Information About Virtual Switches
You can retrieve information about virtual switches by using ESXCLI or vicfg-vswitch.
Retrieving Information About Virtual Switches with ESXCLI
You can retrieve information about virtual switches by using esxcli network vswitch commands.
Specify one of the options listed in “Connection Options for vCLI Host Management Commands,” on
page 19 in place of <conn_options>.
n
List all virtual switches and associated port groups.
esxcli <conn_options> network vswitch standard list
The command prints information about the virtual switch, which might include its name, number of
ports, MTU, port groups, and other information. The output includes information about CDP seings
for the virtual switch. The precise information depends on the target system. The default port groups
are Management Network and VM Network.
n
List the network policy seings, such as security policy, trac shaping policy, and failover policy, for
the virtual switch. The following commands are supported.
esxcli <conn_options> network vswitch standard policy failover get
esxcli <conn_options> network vswitch standard policy security get
esxcli <conn_options> network vswitch standard policy shaping get
Retrieving Information About Virtual Switches with vicfg-vswitch
You can retrieve information about virtual switches by using the vicfg-vswitch command.
Specify one of the options listed in “Connection Options for vCLI Host Management Commands,” on
page 19 in place of <conn_options>.
n
Check whether vSwitch1 exists.
vicfg-vswitch <conn_options> -c vSwitch1
n
List all virtual switches and associated port groups.
vicfg-vswitch <conn_options> -l
The command prints information about the virtual switch, which might include its name, number of
ports, MTU, port groups, and other information. The default port groups are Management Network and
VM Network.
n
Retrieve the current CDP (Cisco Discovery Protocol) seing for this virtual switch.
If CDP is enabled on a virtual switch, ESXi administrators can nd out which Cisco switch port is
connected to which virtual switch uplink. CDP is a link-level protocol that supports discovery of CDP-
aware network hardware at either end of a direct connection. CDP is bit forwarded through switches.
CDP is a simple advertisement protocol which beacons information about the switch or host and some
port information.
vicfg-vswitch <conn_options> --get-cdp vSwitch1
Chapter 9 Managing vSphere Networking
VMware, Inc. 137