A virtual network device is a virtual device that is defined in a domain connected to a virtual switch. A virtual network device is managed by the virtual network driver, and it is connected to a virtual network through the hypervisor using logical domain channels (LDCs).
A virtual network device can be used as a network interface with the name netn, which can be used like any regular network interface and configured with the Oracle Solaris 11 ipadm command.
You can add a virtual network device to a domain, set options for an existing virtual network device, and remove a virtual network device by using the ldm add-vnet, ldm set-vnet, and ldm remove-vnet commands, respectively. See the ldm(8) man page.
See the information about Oracle VM Server for SPARC networking for Oracle Solaris 11 in Oracle VM Server for SPARC Network Overview for the Oracle Solaris 11 OS.
By default, the Logical Domains Manager would assign LDC channels in the following manner:
An LDC channel would be assigned between the virtual network devices and the virtual switch device.
An LDC channel would be assigned between each pair of virtual network devices that are connected to the same virtual switch device (inter-vnet).
The inter-vnet LDC channels are configured so that virtual network devices can communicate directly to achieve high guest-to-guest communications performance. However, as the number of virtual network devices in a virtual switch device increases, the number of required LDC channels for inter-vnet communications increases quadratically.
You can choose to enable or disable inter-vnet LDC channel allocation for all virtual network devices attached to a given virtual switch device. By disabling this allocation, you can reduce the consumption of LDC channels, which are limited in number.
Disabling this allocation is useful in the following situations:
When guest-to-guest communications performance is not of primary importance
When a large number of virtual network devices are required in a virtual switch device
By not assigning inter-vnet channels, more LDC channels are available for use to add more virtual I/O devices to a guest domain.
You can use the ldm add-vsw and the ldm set-vsw commands to specify a value of on, off, or auto for the inter-vnet-link property.
By default, the inter-vnet-link property is set to auto, which means that inter-vnet LDC channels are allocated unless the number of virtual networks in a particular virtual switch grows beyond the default maximum limit specified by the ldmd/auto_inter_vnet_link_limit SMF property. The default ldmd/auto_inter_vnet_link_limit value is 8. If more than the maximum number of virtual networks are present for a virtual switch, the inter-vnet LDCs are disabled. See Determining What Networks Are Present in Logical Domains.
If binding a guest domain or adding virtual networks to a bound domain results in the number of virtual networks in the virtual switch exceeding the limit, the inter-vnet LDCs are disabled automatically. The reverse is true. If unbinding a guest domain or removing virtual networks from a bound domain results in the number of virtual networks in a virtual switch being less than the limit, the inter-vnet LDCs are enabled automatically.
When inter-vnet-link=auto, the ldm list output shows the value as on/auto or off/auto depending on the active state of inter-vnet LDC channels for the virtual switch.
The following figures show typical virtual switch configurations when inter-vnet-link=on and inter-vnet-link=off, respectively.
Virtual Switch Configuration That Uses Inter-Vnet Channels shows a typical virtual switch that has three virtual network devices. The inter-vnet-link property is set to on, which means that inter-vnet LDC channels are allocated. The guest-to-guest communications between vnet1 and vnet2 is performed directly without going through the virtual switch.
This figure also represents the case where inter-vnet-link=auto and the number of virtual networks connected to the same virtual switch is less than or equal to the maximum value set by the ldmd/auto_inter_vnet_link_limit SMF property.
Figure 12 Virtual Switch Configuration That Uses Inter-Vnet Channels
Virtual Switch Configuration That Does Not Use Inter-Vnet Channels shows the same virtual switch configuration with the inter-vnet-link property set to off. The inter-vnet LDC channels are not allocated. Fewer LDC channels are used than when the inter-vnet-link property is set to on. In this configuration, guest-to-guest communications between vnet1 and vnet2 must go through vsw1.
This figure also represents the case where inter-vnet-link=auto and the number of virtual networks connected to the same virtual switch exceeds the maximum value set by the ldmd/auto_inter_vnet_link_limit SMF property.
Figure 13 Virtual Switch Configuration That Does Not Use Inter-Vnet Channels
For more information about LDC channels, see Using Logical Domain Channels.
You can issue commands from the OpenBoot PROM (OBP) prompt to list network information for logical domains.
Run the show-nets command on any domain to list the networks that are available on that domain:
Run the watch-net-all command on the control domain to list the available networks and to show network traffic:
You can use the ldm list-netdev command to find the Oracle Solaris OS network interface name that corresponds to a virtual switch or virtual network device. For more information, see the ldm(8) man page. For a domain that runs an OS older than Oracle Solaris 11.2 SRU 1, obtain this information by mapping the MAC address from the combination of the output from the ldm list-domain -o network command and from the dladm show-phys -m command.
The following example shows the ldm list-netdev command. The ldm list-netdev output shows the corresponding Oracle Solaris OS interface name in the NAME column.
primary# ldm list-netdev -l ldg5 DOMAIN ldg5 NAME CLASS MEDIA STATE SPEED OVER LOC ---- ----- ----- ----- ----- ---- --- net0 VNET ETHER up 1000 vnet0 primary-vsw0/vnet0-ldg5 [/virtual-devices@100/channel-devices@200/network@0] MTU : 1500 [60-1500] IPADDR : 10.129.71.179/255.255.252.0 : fe80::214:4fff:fef8:3dc/ffc0:: : 2606:b400:418:17b2:214:4fff:fef8:3dc/ffff:ffff:ffff:ffff:: MAC_ADDRS : 00:14:4f:f8:03:dc net1 VNET ETHER unknown 0R vnet1 primary-vsw0/ldg5-vnet1 [/virtual-devices@100/channel-devices@200/network@1] MTU : 1500 [60-1500] MAC_ADDRS : 00:14:4f:f8:9f:eb net2 VNET ETHER unknown 0R vnet3 primary-vsw0/ldg5-vnet2 [/virtual-devices@100/channel-devices@200/network@2] MTU : 1500 [60-1500] MAC_ADDRS : 00:14:4f:f8:54:97
The corresponding Oracle Solaris OS network interface to the virtual device, ldg5-vnet0, is net0.
To verify that the ldm list-netdev output is correct, run the dladm show-phys command from the ldg5 domain:
ldg5# dladm show-phys -m LINK SLOT ADDRESS INUSE CLIENT net0 primary 0:14:4f:f8:3:dc yes net0 net1 primary 0:14:4f:f8:9f:eb no -- net2 primary 0:14:4f:f8:54:97 no --