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.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
# 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 .
# 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.
# ipadm create-ip interface
The VNIC that you created in the previous step.
# ipadm create-addr -a address interface
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 .
# dladm show-link
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