Managing Network Virtualization and Network Resources in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Creating a VNIC for an Elastic Virtual Switch

The dladm and zonecfg commands now enable you to create VNICs for an elastic virtual switch.

How to Create a VNIC for an Elastic Virtual Switch

Before You Begin

You must set the controller property on the EVS node by using the evsadm set-prop command. For more information, see How to Configure an EVS Controller.

  1. Become an administrator or user with the Elastic Virtual Switch Administration rights profile.

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

  2. Configure a VNIC for an elastic virtual switch.
    # dladm create-vnic -t -c EVS-switch-name[/VPort-name] [-T tenant-name] VNIC-name
    –t

    Specifies that the VNIC is temporary.

    –c EVS-switch-name[/VPort-name]

    Specifies the name of the elastic virtual switch to which you must connect the VNIC. If you specify the name of the VPort, the VNIC is connected to the specified VPort. If you do not specify the VPort name, the system automatically generates a VPort and assigns the VPort to the VNIC. After the VNIC is connected to an elastic virtual switch, the VNIC either inherits the properties from the specified elastic virtual switch or VPort.

    –T tenant-name

    Specifies the name of the tenant that owns the elastic virtual switch. If the tenant is not specified, then the system assumes default sys-global tenant.

    VNIC-name

    The name of the VNIC.

  3. (Optional) Display information about the VNICs connected to an elastic virtual switch.
    # dladm show-vnic -c

    The –c option displays the information about VNICs connected to an elastic virtual switch.

Example 6-4  Creating a VNIC for an Elastic Virtual Switch

This example shows how to create a temporary VNIC vnic1 and connect the VNIC to the elastic virtual switch ORA and VPort vport0.

# dladm create-vnic -t -c ORA/vport0 vnic1
# dladm show-vnic -c
LINK     TENANT        EVS      VPORT       OVER              MACADDRESS        VIDS
vnic1    sys-global    ORA      vport0      evs-vxlan10000    2:8:20:b0:6e:63   0

Creating a VNIC anet Resource for an Elastic Virtual Switch

You can use the enhanced zonecfg command to configure a zone's VNIC anet resource for an elastic virtual switch.

You can set the following properties for the anet resource when you are configuring a zone:

  • tenant – Specifies the name of the tenant. If a value is not specified when configuring a zone, the system assigns the default value, sys-global tenant.

  • vport – Specifies the name of the VPort. If a value is not specified when configuring a zone, a system VPort is automatically generated for the elastic virtual switch and the VPort inherits the elastic virtual switch properties.

  • evs – Specifies the name of an elastic virtual switch to which you must connect the anet resource.

A VPort in a data center is uniquely identified by the tenant name, elastic virtual switch name, and VPort name. For more information, see Creating and Using Oracle Solaris Zones .

Example 6-5  Creating a VNIC anet Resource for an Elastic Virtual Switch

This example shows how to create a zone that has a VNIC anet resource evszone/net1, which is connected to ORA and vport0 of the tenant tenantA.

# zonecfg -z evszone
Use 'create' to begin configuring a new zone
zonecfg:evszone> create
create: Using system default template 'SYSdefault'
zonecfg:evszone> set zonepath=/export/zones/evszone
zonecfg:evszone> set tenant=tenantA
zonecfg:evszone> add anet
zonecfg:evszone:net> set evs=ORA
zonecfg:evszone:net> set vport=vport0
zonecfg:evszone:net> end
zonecfg:evszone> exit
# zoneadm -z evszone install
# zoneadm -z evszone boot
# zlogin -C evszone
# dladm show-vnic -c
LINK          TENANT   EVS  VPORT   OVER  MACADDRESS       VIDS
evszone/net1  tenantA  ORA  vport0  net2  2:8:20:89:a1:97  200

When evszone boots, the VNIC anet evszone/net1 is associated with the MAC address, IP address, and SLA properties of the VPort ORA/vport0. For more information about configuring a zone's VNIC anet resources for an elastic virtual switch, see Use Case: Configuring an Elastic Virtual Switch.