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.3.
# dladm create-etherstub etherstub
where etherstub is the name of the etherstub that you want to create.
Perform this step only if you are creating a private virtual network. For a description of a private virtual network, see Overview of Network Virtualization. For more information about how to configure a private virtual network, see Use Case: Configuring 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 Managing Network Components in Oracle Solaris 11.3.
# dladm create-vnic -l link [-v VLAN-ID[,PVLAN-SVID[,PVLAN-type]]] VNIC
The name of the link over which the VNIC is configured. If you are creating the VNIC for a private virtual network, then provide the name of the etherstub.
The VLAN ID of the VNIC if you want to create the VNIC as a VLAN. Include the –v option in the command only if you are creating the VNIC as a VLAN or a PVLAN. To configure a VNIC with a VLAN ID, see How to Configure VNICs as VLANs.
The PVLAN secondary VLAN ID that is associated with the VLAN when you want to create a PVLAN VNIC. To create a PVLAN VNIC, see How to Configure VNICs as PVLANs. For more information about VLANs and PVLANs, see Chapter 4, Configuring Private Virtual Local Area Networks in Managing Network Datalinks in Oracle Solaris 11.3.
The PVLAN type associated with the VLAN, which can be either isolated or community. The default value is isolated.
The name of the VNIC. For the guidelines about how to create customized names, see Rules for Valid Link Names in Configuring and Managing Network Components in Oracle Solaris 11.3.
# 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 IP address can be either IPv4 or IPv6 addresses. For more information, see How to Configure an IPv4 Interface in Configuring and Managing Network Components in Oracle Solaris 11.3.
# 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.0.2.10/24 vnic1 # dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- vnic1 vnic 1500 up net0Example 2 Creating an Etherstub and Configuring VNICs Over the Etherstub
This example shows how you can create an etherstub etherstub0 and configure VNICs vnic1 and vnic2 over the etherstub.
# dladm create-etherstub etherstub0 # dladm create-vnic -l etherstub0 vnic1 # dladm create-vnic -l etherstub0 vnic2 # ipadm create-ip vnic1 # ipadm create-addr -a 192.0.2.20/24 vnic1 # ipadm create-ip vnic2 # ipadm create-addr -a 192.0.2.30/24 vnic2 # dladm show-etherstub -o all LINK ZONE etherstub0 global # dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- etherstub0 etherstub 9000 unknown -- vnic1 vnic 9000 up etherstub0 vnic2 vnic 9000 up etherstub0