Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Commands for Configuring an Elastic Virtual Switch

This section describes how to perform the following tasks to configure an elastic virtual switch:

  • Creating an elastic virtual switch

  • Adding an IPnet to an elastic virtual switch

  • Adding a VPort to an elastic virtual switch

Creating an Elastic Virtual Switch

You use the evsadm create-evs command to create an elastic virtual switch. The command syntax is:

# evsadm create-evs [-T tenant-name] [-p {prop=value[,...]}[,..]] EVS-switch-name
–T tenant-name

Specifies the tenant. If you specify a tenant, then the elastic virtual switch is created within the namespace of that tenant. Otherwise, the elastic virtual switch is created in the default tenant sys-global. A tenant is a read-only property that represents the tenant with which an elastic virtual switch is associated.

–p prop

Specifies a comma-separated list of properties that you can set to the specified values on the elastic virtual switch. You can set the following properties:

  • maxbw - Sets the full-duplex bandwidth for the ports of the elastic virtual switch. The bandwidth is specified as an integer with a scale suffix (K, M, or G for Kbps, Mbps, and Gbps). If units are not specified, the input value is read as Mbps. There is no default bandwidth limit.

  • priority - Sets the relative priority for the ports of the elastic virtual switch. The possible values are high, medium, or low. The default value is medium. The priority is not reflected in any protocol priority fields on the wire but is used for packet processing scheduling within the system. A VPort with a high priority offers more latency depending on the availability of system resources.

EVS-switch-name

Specifies the name of the elastic virtual switch.

For an example that shows how to create an elastic virtual switch, see Example 52, Configuring an Elastic Virtual Switch.

Adding an IPnet to an Elastic Virtual Switch

You use the evsadm add-ipnet command to add an IPnet to an elastic virtual switch. The command syntax is:

# evsadm add-ipnet [-T tenant-name] -p subnet=value[{,prop=value[,...]}[,...]]\
EVS-switch-name/IPnet-name
–T tenant-name

Specifies the name of the tenant. If you specify the tenant name, the IPnet is associated with the EVS in the tenant namespace.

–p prop

A comma-separated list of IPnet properties that you must set for the specific elastic virtual switch.

The supported properties for an IPnet are:

  • subnet - Mandatory. Represents the block of either IPv4 or IPv6 addresses. You must specify the subnet property when you add an IPnet. Otherwise, adding an IPnet fails.

  • defrouter - Optional. Specifies the gateway's IP address for the given subnet. When defrouter is not specified, the first address in the range is selected as the default router IP address.

  • pool - Represents the sub-ranges of IP addresses within a subnet. An IP address that is allocated to a virtual port is selected from the pool instead of the entire subnet. You can specify multiple ranges with the comma as the delimiter. The specified IP addresses must not overlap with each other. Each range is of the form start_ip_address-end_ip_address and the specified IP addresses must be within the subnet.

EVS-switch-name/IPnet-name

Specifies the name of the elastic virtual switch with the associated IPnet.

For more information about IPnet properties, see the evsadm(1M) man page. For an example that shows how to add an IPnet to an elastic virtual switch, see Example 52, Configuring an Elastic Virtual Switch.

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.

# 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
# 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 VPorts are within the pools 192.0.2.10-192.0.2.15 and 192.0.2.20-192.0.2.25. You can add 42 VPorts to ORA, since there are 42 IP addresses in the pool that can be allocated to VPorts. Note that the addition of the 43rd VPort fails, since there are no IP addresses in the pool that can be allocated to the 43rd VPort.

Adding a VPort to an Elastic Virtual Switch

You use the evsadm add-vport command to add a VPort to an elastic virtual switch. The command syntax is:

# evsadm add-vport [-T tenant-name] [-p {prop=value[,...]}[,...]] EVS-switch-name/VPort-name
–p prop

Specifies a comma-separated list of VPort properties that you can set for the VPort. For more information about the supported VPort properties, see Figure 4, Table 4, VPort Properties.

EVS-switch-name/VPort-name

Specifies the name of the elastic virtual switch with the associated VPort.

For an example that shows how to add a VPort to an elastic virtual switch, see Example 52, Configuring an Elastic Virtual Switch.