Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Configuring Elastic Virtual Switches

Before creating elastic virtual switches, understand your virtual topology first. Determine the L2 segments you need, network related information such as the subnet and the default router, and virtual port configuration.

An EVS controller can support multiple switches. Thus, in a switch configuration, you can specify property settings that differ from what have been defined for the controller.

How to Configure an Elastic Virtual Switch

Before You Begin

The following must be completed:

  1. If you are on a different host than the controller, do the following:
    1. If you have not done so on this host yet, specify the controller connection information.
      $ evsadm set-prop -p controller=value

      See Step 1 of How to Configure an EVS Controller for an explanation of this step.

    2. Become evsuser and then connect to the controller.
  2. Create an elastic virtual switch.
    evsuser@controller$ evsadm create-evs [-T tenant-name] \
       [-p {prop=value[,...]}[,..]] EVS-switch-name
    –T tenant-name

    Name of the tenant. If unspecified, the default tenant is the global zone and assigned the name sys-global.

    –p prop

    Comma-separated list of other properties such as maxbw and priority. Properties that you set are inherited by the virtual ports connected to this switch, unless you configure those virtual ports differently.

    For a list of a switch's configurable properties, type evsadm show-evsprop.

    EVS-switch-name

    Name of the elastic virtual switch.

  3. Add a subnet to the switch.
    evsuser@controller$ evsadm add-ipnet [-T tenant-name] \
       -p subnet=value[{,prop=value[,...]}[,...]] EVS-switch-name/IPnet-name
    

    You must specify a subnet. Other properties, including the tenant, are optional.

    For a list of a subnet's configurable properties, type evsadm show-ipnetprop.

  4. (Optional) Add a virtual port to the switch.
    evsuser@controller$ evsadm add-vport [-T tenant-name] \
        [-p {prop=value[,...]}[,...]] EVS-switch-name/VPort-name

    –p prop specifies a comma-separated list of VPort properties. For a list of Vport properties, see Figure 4, Table 4, Virtual Port Properties. Or, type evsadm show-vportprop.

    Typically, you do not need to add a virtual port. When you configure a VNIC to connect to a switch, the EVS controller generates a system virtual port. These virtual ports follow the naming convention sys-vportname, such as sys-vport0. The system virtual port inherits the elastic virtual switch properties.

  5. (Optional) Display the configured elastic virtual switch.
    evsuser@controller$ evsadm
Example 53  Configuring an Elastic Virtual Switch for the Global Tenant

The following example shows how to configure an elastic virtual switch with an IP subnet and a virtual port.

evsuser@controller$ evsadm create-evs ORA
evsuser@controller$ evsadm add-ipnet -p subnet=192.0.2.2/27 ORA/ora_ipnet
evsuser@controller$ evsadm add-vport ORA/vport0
evsuser@controller$ evsadm
NAME          TENANT        STATUS VNIC         IP                HOST
ORA           sys-global    idle   --           ora_ipnet         --
   vport0     --            free   --           192.0.2.2/27      --
Example 54  Configuring an Elastic Virtual Switch for a Tenant

The following example shows how to create the elastic virtual switch ORA with a subnet and a virtual port for a tenant.

evsuser@controller$ evsadm create-evs -T tenantA ORA
evsuser@controller$ evsadm add-ipnet -T tenantA -p subnet=192.0.2.0/27 ORA/ora_ipnet
evsuser@controller$ evsadm add-vport -T tenantA ORA/vport0
evsuser@controller$ evsadm
NAME          TENANT        STATUS VNIC         IP                HOST
ORA           tenantA       idle   --           ora_ipnet         --
   vport0     --            free   --           192.0.2.2/27      --
Example 55  Configuring a Tenant's Switch With an Address Pool

The following example shows how to add the IPnet ora_ipnet to ORA. In this example, you restrict the block from which the IP address is automatically allocated to a VPort. The IP address is allocated from the specified pool of IP addresses instead of the entire subnet.

evsuser@controller$ evsadm add-ipnet -T ABC -p subnet=192.0.2.0/27, \
   pool=192.0.2.10-192.0.2.15,192.0.2.20-192.0.2.25 ORA/ora_ipnet
evsuser@controller$ evsadm show-ipnetprop -p pool ORA/ora_ipnet
NAME          TENANT PROPERTY  PERM VALUE                    DEFAULT   POSSIBLE
ORA/ora_ipnet ABC    pool      rw   192.0.2.10-192.0.2.15,   --        --
                                    192.0.2.20-192.0.2.25  

In this example, the IP addresses that are allocated to the virtual ports are within the pools 192.0.2.10-192.0.2.15 and 192.0.2.20-192.0.2.25. The number of virtual ports must not exceed the available addresses in the pool.