VNICs can be created directly in a non-global zone from a global zone by specifying the link as zone/link. This method creates the VNIC directly in the namespace of the non-global zone. Make sure that the non-global zone exists and is running. Then use the following command syntax:
global$ dladm create-vnic -l link zone/vnic
To create a temporary VNIC, use the –t option. The VNIC will persist until the next reboot of the zone.
You can view VNIC information in two ways. From the global zone, you would use dladm show-link –Z. From within the non-global zone, you use the same command without the –Z option.
In addition to temporarily creating VNICs, you can also temporarily create VLANs and IP over InfiniBand (IPoIB) partitions. See the dladm(8) man page for complete instructions.
In the following example, vnic1 is created for zone1 from the global zone.
global$ dladm create-vnic -l net0 zone1/vnic1 global$ dladm show-link -Z LINK ZONE CLASS MTU STATE OVER net0 global phys 1500 up -- zone1/vnic1 zone1 vnic 1500 down net0
From zone1, you would display the link information as follows:
zone1$ dladm show-link LINK CLASS MTU STATE OVER vnic1 vnic 1500 down ?
In the following example, a temporary VNIC as a VLAN is created for zone3 from the global zone.
global$ dladm create-vlan -t -l net0 -v 3 zone1/vlan3
In he following example, an IPoIB partition part1 with a temporary VNIC is created in zone1 from the global zone.
global$ dladm create-part -t -l net1 -P FFFF zone1/part1
The –P option specifies the partition key that is used for creating a partition link.