vDCA550-Objective 2.2-3-Configure vSS and vDS settings using command line tools

Happy New Year 2016. 

vSS can be completely created, configured, and managed from the command line. The main command namespace is “esxcli network standard”

“Because vDS are created on a vCenter Server”, they cannot be modified using the ESXi shell or the vCLI. However, the ESXi Shell and the vCLI can be used to identify and modify how an ESXi host connects to a vDS. The specific namespaces for vSS and vDS are respectively: 

    esxcli network vswitch standard   

   esxcli network vswitch dvs vmware  .

Example 1:

Create a new vSS named “vSwitch1” having “200” ports with support for jumbo frames ( MTU = 9000 ). Attach “vmnic2” as uplinks. Create a port group named “IP-Storage”. Set its VLAN property to “101”, and set its “NIC Teaming to  iphash” . “Enable traffic shaping” with “average” and “peak” bandwidth set to 50 Mbps. Before beginning, ensure that no vSS named “vSwitch1” already exist.

Create a Standard Virtual Switch with Name “vSwitch1” and 200 Ports

#esxcli network vswitch standard add -v vSwitch1 –P 200

Set the MTU 9000 for vSwitch1

#esxcli network vswitch standard set -v vSwitch1 -m 9000

Attach the vmnic2 as uplink

#esxcli network vswitch standard  uplink add -v vSwitch1 -u vmnic2

By default uplink set as standby so make the vmnic2 as active uplink

#esxcli network vswitch standard policy failover set -v vSwitch1 -a vmnic2

Create a New Port group name “IP-Storage” on vSwitch1

#esxcli network vswitch standard portgroup add -v vSwitch1 -p IP-Storage

Change the IP-Storage Portgroup VLAN into 101.

#esxcli network vswitch standard portgroup set -p IP-Storage -v 101

Set the “vSwitch1” NIC Team Policy into “IP Based hashing”

#esxcli network vswitch standard policy failover set -v vSwitch1 -l iphash

Enable traffic shaping and set peak and average bandwidth into 50 Mbps

#esxcli network vswitch standard policy shaping set -e true -b 50000 -k 50000 -t 50000 -v vSwitch1

NOTE: When setting traffic shaping from the ESXi Shell, you must set avg (-b), burst (-t),

And peak (-k)

Example 2:

Use the “example 1” vSwitch1 and PG “IP-Storage” to create a vKernel PortGroup which we will use for ISCSI/NFS and vMotion. Set the vKernel Interface name “vmk3” and static IP Address “”.

Before start my second example. One thing which you should know. When you create a vKernel Portgroup in esxcli you should have a Virtual Switch and Portgroup already exists in your environment. Then you will convert that PortGroup into vKernel Portgroup otherwise you have to create a vSwitch and PortGroup first.

Use the “vSwitch1” Portgroup “IP-Storage” and create vKernel Port “vmk3”

#esxcli network ip interface add -p IP-Storage -i vmk3

Set the Static IPV4 IP address for vKernel Port vmk3

#esxcli network ip interface ipv4 set -i vmk3 -I -N -t static

The command to identify all VMware vDS accessed by an ESXi host is esxcli

# esxcli network vswitch dvs vmware list


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s