The following examples show how you would set up and configure an EVS virtual tenant network named vswitch. Pay particular attention to where you perform each task.
The following configuration tasks are described:
From the client node, set up a virtual switch.
On each compute node, create a zone and then connect the zone to the virtual switch.
From the client node, display the EVS configuration.
For an overview of the EVS feature, see Chapter 5, About Elastic Virtual Switches, in Managing Network Virtualization and Network Resources in Oracle Solaris 11.2 .
Example 2-12 Setting Up an EVS SwitchThe follow example shows how you would set up an EVS virtual tenant network. You perform this task from the client node.
First, create the EVS switch, named vswitch in this example, as follows:
# evsadm create-evs vswitch
Add the IPnet information to the EVS switch and verify the configuration.
# evsadm add-ipnet -p subnet=192.168.70.0/24 vswitch/ipnet # evsadm show-ipnet NAME TENANT SUBNET DEFROUTER AVAILRANGE vswitch/ipnet sys-global 192.168.70.0/24 192.168.70.1 192.168.70.2-192.168.70.254
Verify that the EVS switch was successfully created.
# evsadm NAME TENANT STATUS VNIC IP HOST vswitch sys-global -- -- vswitch_ipnet --
Check the VLAN ID that is associated with the virtual switch.
# evsadm show-evs -L EVS TENANT VID VNI vswitch sys-global 200 --Example 2-13 Creating and Connecting a Zone to an EVS Switch
The following example describes how you would create a zone on each tenant, and then connect the zone to the virtual switch.
On each tenant, configure a zone with an anet VNIC resource as follows:
# zonecfg -z z1 zonecfg:z1> create . . . zonecfg:z1> add anet zonecfg:z1:anet> set evs=vswitch zonecfg:z1:anet> end zonecfg:z1> commit zonecfg:z1> exit
For more information, see Creating a VNIC anet Resource for an Elastic Virtual Switch in Managing Network Virtualization and Network Resources in Oracle Solaris 11.2 .
For information about setting anet resource properties that pertain to an EVS switch, see Resource Types and Properties in Introduction to Oracle Solaris Zones .
Boot the zone.
# zoneadm -z z1 boot
Verify that the VNIC was created and is connected to the virtual switch.
# dladm show-vnic -c LINK TENANT EVS VPORT OVER MACADDRESS VIDS z1/net0 sys-global vswitch sys-vport0 net2 2:8:20:1a:c1:e4 200
From within the zone, verify that the IP address has been assigned.
# zlogin z1 ipadm NAME CLASS/TYPE STATE UNDER ADDR lo0 loopback ok -- -- lo0/v4 static ok -- 127.0.0.1/8 lo0/v6 static ok -- ::1/128 net0 ip ok -- -- net0/v4 inherited ok -- 192.168.84.3/24
From the client node, display the EVS configuration.
# evsadm NAME TENANT STATUS VNIC IP HOST vswitch sys-global -- -- vswitch_ipnet
EVS provides a rich set of functionality that is not fully described in this scenario. For additional tasks and use cases, see Chapter 6, Administering Elastic Virtual Switches, in Managing Network Virtualization and Network Resources in Oracle Solaris 11.2 .