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. The –t option is used to specify that the VNIC is temporary. Temporary VNICs persist until the next reboot of the zone. The global zone and other non-global zones can also have VNICs with the same name. VNICs can be created only temporarily by using this method.
In addition to temporarily creating VNICs, you can also temporarily create VLANs and IP over InfiniBand (IPoIB) partitions. See the dladm (1M) man page for complete instructions.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
global# zoneadm -z zone boot
global# dladm create-vnic -t -l link zone/VNIC
Specifies that the VNIC is temporary. Temporary VNICs persist until the next reboot of the zone. This option must be specified if the VNIC is created in a non-global zone's namespace.
Specifies the link, which can be a physical link or an etherstub.
For an example of the command syntax that you would use to create a VLAN or IPoIB partition in a non-global zone from a global zone, see Example 2–5.
global# dladm show-link -Z
global# zlogin zone
zone# dladm show-link
The following example shows how to create a VNIC named vnic1 in a non-global zone from the global zone.
global# zoneadm -z zone1 boot global# dladm create-vnic -t -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
The following example shows the output of the dladm show-link command from zone1.
zone1# dladm show-link LINK CLASS MTU STATE OVER vnic1 vnic 1500 down ?
The following example shows how to create a VLAN named vlan3 in a non-global zone from a global zone.
global# dladm create-vlan -t -l net0 -v 3 zone1/vlan3
The –v option specifies the VLAN-ID of the VLAN over the Ethernet link.
The following example shows how to create an IPoIB partition named part1 in a non-global zone from a 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.