Managing Network Virtualization and Network Resources in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

How to Temporarily Create VNICs in Zones

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.

  1. Become an administrator.

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

  2. Create and boot a non-global zone from the global zone.
    global# zoneadm -z zone boot
  3. Create a temporary VNIC for the non-global zone.
    global# dladm create-vnic -t -l link zone/VNIC
    –t

    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.

    –l

    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.

  4. Verify that the VNIC was created in the zone.
    global# dladm show-link -Z
  5. Log in to the zone.
    global# zlogin zone
  6. Verify that the VNIC was successfully created.
    zone# dladm show-link
Example 2-5  Temporarily Creating VNICs, VLANs, and IP-over-IB Partitions in Zones

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.