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 ESXCLI Host Management Commands in place of <conn_options>.

  • 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 settings for the virtual switch. The precise information depends on the target system. The default port groups are Management Network and VM Network.
  • List the network policy settings, such as security policy, traffic 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