Virtual Device Identifier and Network Interface Name
When you add a virtual switch or virtual network device to a domain, you can specify its device number by setting the id
property.
primary# ldm add-vsw [id=switch-id] vswitch-name domain-name primary# ldm add-vnet [id=network-id] if-name vswitch-name domain-name
Each virtual switch and virtual network device of a domain has a unique device number that is assigned when the domain is bound. If a virtual switch or virtual network device was added with an explicit device number (by setting the id
property), the specified device number is used. Otherwise, the system automatically assigns the lowest device number available. In that case, the device number assigned depends on how virtual switch or virtual network devices were added to the system. The device number eventually assigned to a virtual switch or virtual network device is visible in the output of the ldm list-bindings
command and the ldm list-domain -o network
command when a domain is bound.
The following example shows that the primary
domain has one virtual switch, primary-vsw0
. This virtual switch has a device number of 0
(switch@0
).
primary# ldm list-bindings -e -o network primary VSW NAME MACADDRESS NET-DEV DVID|PVID|VIDs ---- ---------- ------- -------------- primary-vsw0 00:14:4f:fb:86:af net0 1|1|-- DEVICE :switch@0 ID :0 LINKPROP :phys-state MTU :1500 INTER-VNET-LINK :on/auto MODE :-- VSW-RELAY-MODE :local PEER MACADDRESS PVID|PVLAN|VIDs ---- ---------- --------------- vnet1@ldg1 00:14:4f:f9:41:af 1|--|-- LINKPROP :phys-state MTU :1500 MAXBW :-- LDC :0xa MODE :-- CUSTOM :disable PRIORITY :-- COS :-- PROTECTION :-- vnet0@ldg1 00:14:4f:f9:41:fb 1|--|-- LINKPROP :phys-state MTU :1500 MAXBW :-- LDC :0xc MODE :-- CUSTOM :disable PRIORITY :-- COS :-- PROTECTION :--
The following example shows that the ldg1
domain has two virtual network devices: vnet0
and vnet1
. The vnet1
device has a device number of 0
(network@0
) and the vnet0
device has a device number of 1
(network@1
).
primary# ldm list-domain -e -o network ldg1
NETWORK
NAME SERVICE MACADDRESS PVID|PVLAN|VIDs
---- ------- ---------- ---------------
vnet1 primary-vsw0@primary 00:14:4f:f9:41:af 1|--|--
DEVICE :network@0 ID :0
LINKPROP :phys-state MTU :1500
MAXBW :-- MODE :--
CUSTOM :disable
PRIORITY :-- COS :--
PROTECTION :--
NAME SERVICE MACADDRESS PVID|PVLAN|VIDs
---- ------- ---------- ---------------
vnet0 primary-vsw0@primary 00:14:4f:f9:41:fb 1|--|--
DEVICE :network@1 ID :1
LINKPROP :phys-state MTU :1500
MAXBW :-- MODE :--
CUSTOM :disable
PRIORITY :-- COS :--
PROTECTION :-
When a domain with a virtual network device is running the Oracle Solaris 11 OS, the virtual network device has a network interface, net
N. However, the network interface number of the virtual network device, N, is not necessarily the same as the device number of the virtual network device, n.
Note:
On Oracle Solaris 11 systems, generic link names in the form ofnet
n are assigned to both vsw
n and vnet
n. Use the dladm show-phys
command to identify which net
n names map to the vsw
n and vnet
n devices.
Caution:
The Oracle Solaris OS preserves the mapping between the name of a network interface and a virtual switch or a virtual network device based on the device number. If a device number is not explicitly assigned to a virtual switch or virtual network device, its device number can change when the domain is unbound and is later bound again. In that case, the network interface name assigned by the OS running in the domain can also change and make the existing system configuration unusable. This situation might happen, for example, when a virtual switch or a virtual network interface is removed from the configuration of the domain.