A virtual switch (vsw) is a component running in a service domain and managed by the virtual switch driver. A virtual switch can be connected to some guest domains to enable network communications between those domains. In addition, if the virtual switch is also associated with a physical network interface, network communication is permitted between guest domains and the physical network over the physical network interface. When running in an Oracle Solaris 10 service domain, a virtual switch also has a network interface, vswn, which permits the service domain to communicate with the other domains that are connected to that virtual switch. The virtual switch can be used like any regular network interface and configured with the Oracle Solaris 10 ifconfig command.
Assigning a virtual network device to a domain creates an implicit dependency on the domain providing the virtual switch. You can view these dependencies or view domains that depend on this virtual switch by using the ldm list-dependencies command. See Listing Domain I/O Dependencies.
In an Oracle Solaris 11 service domain, the virtual switch cannot be used as a regular network interface. If the virtual switch is connected to a physical network interface, communication with the service domain is possible by using this physical interface. If configured without a physical interface, you can enable communication with the service domain by using an etherstub as the network device (net-dev) that is connected with a VNIC.
To determine which network device to use as the back-end device for the virtual switch, search for the physical network device in the dladm show-phys output or use the ldm list-netdev command to list the network devices for logical domains.
This situation occurs only for the Oracle Solaris 10 OS and not for the Oracle Solaris 11 OS.
You can add a virtual switch to a domain, set options for a virtual switch, and remove a virtual switch by using the ldm add-vsw, ldm set-vsw, and ldm rm-vsw commands, respectively. See the ldm(1M) man page.
When you create a virtual switch on a VLAN tagged instance of a NIC or an aggregation, you must specify the NIC (nxge0), the aggregation (aggr3), or the vanity name (net0) as the value of the net-dev property when you use the ldm add-vsw or ldm set-vsw command.
You cannot add a virtual switch on top of an InfiniBand IP-over-InfiniBand (IPoIB) network device. Although the ldm add-vsw and ldm add-vnet commands appear to succeed, no data will flow because these devices transport IP packets by means of the InfiniBand transport layer. The virtual switch only supports Ethernet as a transport layer. Note that IPoIB and Ethernet-over-InfiniBand (EoIB) are unsupported back ends for virtual switches.
The following command creates a virtual switch on a physical network adapter called net0:
primary# ldm add-vsw net-dev=net0 primary-vsw0 primary
The following example uses the ldm list-netdev -b command to show only the valid virtual switch back-end devices for the svcdom service domain.
primary# ldm list-netdev -b svcdom DOMAIN svcdom NAME CLASS MEDIA STATE SPEED OVER LOC ---- ----- ----- ----- ----- ---- --- net0 PHYS ETHER up 10000 ixgbe0 /SYS/MB/RISER1/PCIE net1 PHYS ETHER unknown 0 ixgbe1 /SYS/MB/RISER1/PCIE4 net2 ESTUB ETHER unknown 0 -- -- net3 ESTUB ETHER unknown 0 -- -- ldoms-estub.vsw0 ESTUB ETHER unknown 0 -- --