6.5

Table Of Contents
Setting Up vSphere Networking with vSphere Standard Switches
You can use ESXCLI and vicfg-vswitch to set up the vSphere networking.
You can set up your virtual network by performing a set of tasks.
1 Create or manipulate virtual switches by using esxcli network vswitch or vicfg-vswitch. By default,
each ESXi host has one virtual switch, vSwitch0. You can create additional virtual switches or manage
existing switches. See “Seing Up Virtual Switches and Associating a Switch with a Network Interface,”
on page 136.
2 (Optional) Make changes to the uplink adapter by using esxcli network vswitch standard uplink or
vicfg-nics. See “Managing Uplink Adapters,” on page 142.
3 (Optional) Use esxcli network vswitch standard portgroup or vicfg-vswitch to add port groups to
the virtual switch. See “Managing Port Groups with vicfg-vswitch,” on page 140.
4 (Optional) Use esxcli network vswitch standard portgroup set or vicfg-vswitch to establish VLANs
by associating port groups with VLAN IDs. See “Seing the Port Group VLAN ID with vicfg-vswitch,”
on page 141.
5 Use esxcli network ip interface or vicfg-vmknic to congure the VMkernel network interfaces. See
Adding and Modifying VMkernel Network Interfaces,” on page 145.
Setting Up Virtual Switches and Associating a Switch with a Network Interface
A virtual switch models a physical Ethernet switch. You can manage virtual switches and port groups by
using the vSphere Web Client or by using vSphere CLI commands.
You can create a maximum of 127 virtual switches on a single ESXi host. By default, each ESXi host has a
single virtual switch called vSwitch0. By default, a virtual switch has 56 logical ports. See the Conguration
Maximums document on the vSphere documentation main page for details. Ports connect to the virtual
machines and the ESXi physical network adapters.
n
You can connect one virtual machine network adapter to each port by using the vSphere Web Client UI.
n
You can connect the uplink adapter to the virtual switches by using vicfg-vswitch or esxcli network
vswitch standard uplink. See “Linking and Unlinking Uplink Adapters with vicfg-vswitch,” on
page 144.
When two or more virtual machines are connected to the same virtual switch, network trac between them
is routed locally. If an uplink adapter is aached to the virtual switch, each virtual machine can access the
external network that the adapter is connected to.
This section discusses working in a standard switch environment. See “Networking Using vSphere
Distributed Switches,” on page 133 for information about distributed switch environments.
When working with virtual switches and port groups, perform the following tasks.
1 Find out which virtual switches are available and, optionally, what the associated MTU and CDP (Cisco
Discovery Protocol) seings are. See “Retrieving Information About Virtual Switches with ESXCLI,” on
page 137 and “Retrieving Information About Virtual Switches with vicfg-vswitch,” on page 137.
2 Add a virtual switch. See Adding and Deleting Virtual Switches with ESXCLI,” on page 138 and
Adding and Deleting Virtual Switches with vicfg-vswitch,” on page 138.
3 For a newly added switch, perform these tasks.
a Add a port group. See “Managing Port Groups with ESXCLI,” on page 139 and “Managing Port
Groups with vicfg-vswitch,” on page 140.
b (Optional) Set the port group VLAN ID. See “Seing the Port Group VLAN ID with ESXCLI,” on
page 141 and “Seing the Port Group VLAN ID with vicfg-vswitch,” on page 141.
vSphere Command-Line Interface Concepts and Examples
136 VMware, Inc.