In this example procedure, guest domain ldg1 contains two virtual network devices, net-a and net-c. To find the Solaris OS network interface name in ldg1 that corresponds to net-c, do the following. This example also shows differences if you are looking for the network interface name of a virtual switch instead of a virtual network device.
Use the ldm command to find the virtual network device number for net-c.
# ldm list -l ldg1 ... NETWORK NAME SERVICE DEVICE MAC net-a primary-vsw0@primary network@0 00:14:4f:f8:91:4f net-c primary-vsw0@primary network@2 00:14:4f:f8:dd:68 ... |
The virtual network device number for net-c is 2 (network@2).
To determine the network interface name of a virtual switch, find the virtual switch device number, n as switch@n.
To find the corresponding network interface on ldg1, log into ldg1 and find the entry for this device number under /devices.
# uname -n ldg1 # find /devices/virtual-devices@100 -type c -name network@2\* /devices/virtual-devices@100/channel-devices@200/network@2:vnet1 |
The network interface name is the part of the entry after the colon; that is, vnet1.
To determine the network interface name of a virtual switch, replace the argument to the -name option with virtual-network-switch@n\*. Then, find the network interface with the name vswN.
Plumb vnet1 to see that it has the MAC address 00:14:4f:f8:dd:68 as shown in the ldm list -l output for net-c in Step 1.
# ifconfig vnet1 vnet1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask 0 ether 0:14:4f:f8:dd:68 |