When you want to connect a virtual machine to the outside world, you can use a standard switch or a distributed switch. With a distributed switch, the virtual machine can maintain its network settings even if the virtual machine is migrated to a different host.

Networking with vSphere Distributed Switches
There are two hosts - Host 1 and Host 2. Both have a virtual and a physical layer. Both hosts share a vSphere distributed switch, which has distributed port groups labeled with letters from A through J. There are three virtual machines in the virtual layer of Host 1. The first two virtual machines are connected to port group A, while the third virtual machine has two network adapters, one of which is connected to port group C, and the other one is connected to the virtual layer of Host 2 through Network C. Host 2 has two virtual machines both of which are connected to port group H and Network C. Both hosts have a physical layer with two network adapters connected to the vSphere distributed switch through uplinks on one side and a physical network on the other. One of the physical network adapters of each host is connected to the uplink of its host and the other physical network adapter is connected to the uplink of the other host. There are four numbers on the diagram. 1 is on the first uplink adapter of Host 2, while 2 represents the link to the distributed switch of Host 2, 3 represents the distributed switch itelf, and 4 represents the port groups of the distributed switch.

Each physical network adapter (1) on the host is paired with a distributed uplink port (2), which represents the uplink to the virtual machine. With distributed switches, the virtual machine no longer depends on the host’s physical uplink but on the (virtual) uplink port. You manage a uplink ports primarily using the vSphere Web Client, or vSphere APIs.

The distributed switch itself (3) functions as a single virtual switch across all associated hosts. Because the switch is not associated with a single host, virtual machines can maintain consistent network configuration as they migrate from one host to another.

Like a standard switch, each distributed switch is a network hub that virtual machines can use. A distributed switch can route traffic internally between virtual machines or link to an external network by connecting to physical network adapters. You create a distributed switch by using the vSphere Web Client UI, but can manage some aspects of a distributed switch by using vicfg-vswitch. You can list distributed virtual switches by using the esxcli network vswitch command. See Setting Up Virtual Switches and Associating a Switch with a Network Interface.