Managing Network Virtualization and Network Resources in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Configure VNICs and Etherstubs

The VNIC connects the virtual network to the external network. The VNIC also enables the zones to communicate with one another through the virtual switch that is automatically created with the VNIC. For a virtual network to host traffic internally between zones, an external LAN, and the Internet, each zone must have its own VNIC. Therefore, you must repeat this procedure as many times as the number of zones that belong to the virtual network.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. (Optional) Create an etherstub.
    # dladm create-etherstub etherstub

    Perform this step only if you are creating a private virtual network. For a description of a private virtual network, see Overview of Virtual Networks. For more information about how to configure a private virtual network, see How to Configure a Private Virtual Network.

    Like a datalink, you can name the etherstub in any way that is meaningful to your network setup. For the guidelines about how to create customized names, see Rules for Valid Link Names in Configuring and Administering Network Components in Oracle Solaris 11.2 .

  3. Create a VNIC.
    # dladm create-vnic -l link [-v vid] VNIC

    If you are creating the VNIC for a private virtual network, then substitute etherstub for link. Include the –v option in the command only if you are creating the VNIC as a VLAN. For more information about creating the VNIC as a VLAN, see How to Configure VNICs With VLAN IDs.

  4. Create an IP interface over the VNIC.
    # ipadm create-ip interface
    interface

    The VNIC that you created in the previous step.

  5. Assign a static IP address to the VNIC interface.
    # ipadm create-addr -a address interface
    –a address

    Specifies the IP address, which can be in Classless Inter-Domain Routing (CIDR) notation.

    The static IP address can be either IPv4 or IPv6 addresses. For more information, see How to Configure an IPv4 Interface in Configuring and Administering Network Components in Oracle Solaris 11.2 .

  6. (Optional) Verify the VNIC that has been created.
    # dladm show-link
Example 2-1  Configuring a VNIC

This example shows how to configure vnic1 over the datalink net0.

# dladm create-vnic -l net0 vnic1
# ipadm create-ip vnic1
# ipadm create-addr -a 192.168.0.10/24 vnic1
# dladm show-link 
LINK          CLASS     MTU    STATE    OVER
net0          phys      1500   up       --
vnic1         vnic      1500   up       net0