Oracle® VM Server for SPARC 3.3 Administration Guide

Exit Print View

Updated: October 2015
 
 

Finding the Oracle Solaris 11 Network Interface Name

On Oracle Solaris 11 systems, you can use the ldm list-netdev command to find the Oracle Solaris OS network interface names. For more information, see the ldm(1M) man page.

The following example shows the ldm list-netdev and ldm list -o network commands. The ldm list -o network command shows the virtual network devices in the NAME field. The ldm list-netdev output shows the corresponding OS interface name in the NAME column.

primary# ldm list -o network ldg1
....
NETWORK
    NAME        SERVICE              ID DEVICE    MAC               MODE
    PVID VID MTU   MAXBW LINKPROP
    vnet0-ldg1  primary-vsw0@primary 0  network@0 00:14:4f:fa:eb:4e 1
             1500
    vnet1-ldg1  svcdom-vsw0@svcdom   1  network@1 00:14:4f:f8:53:45 4
             1500
           PVLAN :400,community

primary# ldm list-netdev ldg1
DOMAIN
ldg1

NAME CLASS MEDIA STATE   SPEED OVER  LOC
---- ----- ----- -----   ----- ----  ---
net0 VNET  ETHER up      0     vnet0 primary-vsw0/vnet0-ldg1
net1 VNET  ETHER up      0     vnet1 svcdom-vsw0/vnet1-ldg1
net2 VNET  ETHER unknown 0     vnet2 svcdom-vsw1/vnet2-ldg1

To verify that the ldm list-netdev output is correct, run the dladm show-phys and dladm show-linkprop -p mac-address commands from the ldg1:

ldg1# dladm show-phys
LINK     MEDIA     STATE      SPEED  DUPLEX         DEVICE
net0     Ethernet  up         0      unknown        vnet0
net1     Ethernet  up         0      unknown        vnet1
net2     Ethernet  unknown    0      unknown        vnet2

ldg1# dladm show-linkprop -p mac-address
LINK PROPERTY    PERM VALUE            EFFECTIVE        DEFAULT          POSSIBLE
net0 mac-address rw   0:14:4f:fa:eb:4e 0:14:4f:fa:eb:4e 0:14:4f:fa:eb:4e --
net1 mac-address rw   0:14:4f:f8:53:45 0:14:4f:f8:53:45 0:14:4f:f8:53:45 --

How to Find the Oracle Solaris OS Network Interface Name

This procedure describes how to find the Oracle Solaris OS network interface name in ldg1 that corresponds to net-c. This example also shows differences if you are looking for the network interface name of a virtual switch instead of a virtual network device. In this example procedure, guest domain ldg1 contains two virtual network devices, net-a and net-c.

  1. Use the ldm command to find the virtual network device number for net-c.
    primary# 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.

  2. Find the corresponding network interface on ldg1 by logging into ldg1 and finding the entry for this device number under /devices.
    ldg1# uname -n
    ldg1
    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.

  3. Verify that vnet1 has the MAC address 00:14:4f:f8:dd:68 as shown in the ldm list -l output for net-c in Step 1.
    • Oracle Solaris 11 OS.
      1. Determine the name of the interface to specify for vnet1.
        ldg1# dladm show-phys |grep vnet1
        net2      Ethernet      up      0      unknown   vnet1
      2. Determine the MAC address of net2.
        # dladm show-linkprop -p mac-address net2
        LINK PROPERTY    PERM VALUE             EFFECTIVE         DEFAULT POSSIBLE
        net2 mac-address rw   00:14:4f:f8:dd:68 00:14:4f:f8:dd:68 --      --

        This example MAC address matches the output of the ldm list -l command for net-c in Step 1.

    • Oracle Solaris 10 OS.
      ldg1# 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