DEFINE VSWITCH Statement

Read syntax diagramSkip visual syntax diagram DEFine VSWITCH switchname 1TYPEQDIOLOCalTYPEQDIOLOCalGLObalIVLDOMainADOMainBCDEFGHUPLINK2RDEV OptionsCONnectDISCONnectPRIQueuingOFF3PRIQueuingONNOUPLINKQUEuestorage8M256MQUEuestorageminM256MmaxMCONTRoller*CONTRolleruserid1LOGOFFLOGONLOGVerboseIPNONrouter4IPNONrouterPRIrouterETHernetEthernet OptionsIPTimeout5IPTimeoutnnnVLANUNAWAREVLANdefvidAWAREOther OptionsUSERBASED5PORTBASEDPORTname6portname7
RDEV Options
Read syntax diagramSkip visual syntax diagramRDEVNONERDEVnnnnnnnn.Pn8
Ethernet Options
Read syntax diagramSkip visual syntax diagramNOGroupGROupgroupnameBRIDGEportNONEBRIDGEportRDEVnnnnCONnectDISCONnectSECONDARYPRIMARY
Other Options
Read syntax diagramSkip visual syntax diagramPORTTypeACCESS9PORTTypeTRUNKGVRPNOGVRPNATive1NATivenatvidNONE
Notes:
  • 1 You can specify the operands in any order, as long as switchname is the first operand specified, and portname is the last operand specified, if applicable.
  • 2 Use caution with the RDEV, CONNECT, and DISCONNECT operands, as they can apply to either the UPLINK or the BRIDGEPORT connection. The UPLINK keyword must be used if any of these operands are specified following the BRIDGEPORT keyword, but are intended to apply to the UPLINK connection.
  • 3 PRIQueuing ON is the default and only allowed option for a TYPE IVL virtual switch.
  • 4 ETHernet is the default and only allowed option for a TYPE IVL virtual switch.
  • 5 PORTBASED is the default and only allowed option for a TYPE IVL virtual switch.
  • 6 The PORTNAME operand is deprecated and is not recommended for use.
  • 7 You can specify a maximum of 3 port names.
  • 8 You can specify a maximum of 3 real device numbers.
  • 9 Port Type ACCESS is the default and only allowed option for a TYPE IVL virtual switch.

Purpose

Start of changeUse the DEFINE VSWITCH statement or command to create a CP system-owned switch (a virtual switch) to which virtual machines can connect. Each switch is identified by a switchname. A z/VM® user can create the appropriate simulated network interface card (NIC) and connect it to the virtual switch. z/VM guests that are connected to the same virtual switch can exchange messages by using the same communication software that they would use to drive a real NIC. More formation about virtual switches and virtual networking options in z/VM is available: See z/VM: Connectivity.End of change

How to Specify

Include as many statements as needed; they are optional. You can place DEFINE VSWITCH statements anywhere in the system configuration file. If you specify more than one statement with the same switchname operand, the first definition will be accepted and subsequent statements will receive an error.

Operands

switchname
is the name of the new virtual switch. The switchname is a single token (1–8 alphanumeric characters) that identifies this virtual switch for subsequent commands.
TYPE
specifies the type of virtual switch to be created, specifically the hardware and protocol the virtual switch will emulate.
QDIO

Start of changedefines a simulated virtual switch that uses QDIO or EQDIO devices to create a network. The network is comprised of simulated Start of changeQDIO and/or simulated EQDIO adaptersEnd of change that reside on the same z/VM system and real network devices that are located on an external or physical network. End of change

A QDIO type virtual switch can accept connections from only Start of changea type QDIO or type EQDIO simulated adapterEnd of change. External connectivity to network devices on a physical network is achieved by using the RDEV or GROUP keywords.

IVL
defines an Inter-VSwitch Link which provides the communication facility to implement an IVL domain. An IVL domain is a grouping of up to 16 systems running z/VM connected by an IVL LAN segment. All the active members within an IVL domain provide control operations that support the creation and management of shared virtual networking components such as Shared Port Groups. The IVL virtual switch provides communication infrastructure to exchange control information and data necessary to manage global networking objects that can span multiple systems running z/VM. The IVL virtual switch must be defined with external connectivity (using the RDEV or GROUP keywords) and its UPLINK connection must remain operational in order to support global networking objects.

Only one IVL virtual switch may be created on a system running z/VM.

Guest NICs may not be coupled to an IVL virtual switch.

DOMain [A | B | C | D | E | F | G | H]
defines the domain to which the IVL virtual switch belongs. See usage note 18 for more information about an IVL virtual switch.
GLObal
identifies this virtual switch as a member of a global virtual switch. A global virtual switch is a collection of virtual switches that share the same name and the same networking characteristics. This collection of virtual switches spans multiple systems running z/VM but logically operates as a single switch.

Global virtual switches using a shared port group must reside on LPARs in the same CEC.

Creation of Global virtual switches will be deferred until IVL virtual switch UPLINK port connects the host to the IVL domain. Message HCP3178I will be displayed for each deferred Global virtual switch. Subsequent MODIFY VSWITCH statements with the same switchname will also be deferred.

See usage note 17 for more information about a global virtual switch.

LOCal
LOCAL means that the virtual switch is not a member of a global virtual switch.
UPLINK
enables and specifies connectivity for a virtual switch UPLINK port. The UPLINK port is a special port that typically is used to connect the virtual switch to a physical switch, essentially bridging the virtual switch's simulated network to a physical network.
RDEV nnnn
RDEV nnnn.Pn

Start of changespecifies a real device to be used as an UPLINK port that connects the virtual switch to the real hardware LAN segment.End of change

Start of changeSpecify each real device as a hexadecimal number. The specification can include a hexadecimal port number that is prefixed by lower case or upper case letter P. If no port number is included, it defaults to port 0. The port number follows the device number and is separated by a period.End of change

Start of changeFor example, to specify port 1 for real device 300, specify 300.P1. The port number value is limited by how many ports the adapter hardware feature supports. End of change

The following table describes the parameters for each device type:Start of change
Device type Number of Devices Device number range Port number range
QDIO 3 X'0001' - X'FFFD' X'0' - X'F'
EQDIO 1 X'0001' - X'FFFF' X'0'
End of change

You can specify a maximum of three real device numbers. If you specify more than one device number, then each must be separated from the others by at least one blank.

When the virtual switch is defined with the GROUP attribute Start of changefor an exclusive port groupEnd of change, any devices identified by the RDEV keyword are used for failover in the event of a real switch failure of the link aggregation group. Failover in this environment is to a single Start of changedeviceEnd of change that is connected to a second real switch.

Start of changeEach OSA-Express (QDIO) real device number represents a trio of devices that cooperate to provide a complete network interface. In contrast, each Network Express (EQDIO) real device number represents a complete network interface. End of change

Start of changeFor example, a specification of a QDIO device as RDEV 100 actually uses device numbers 100, 101, and 102 to provide a connection to the real hardware LAN segment. In contrast, a specification of an EQDIO device as RDEV 200 uses only device number 200 to provide the real hardware LAN connection.End of change

Start of changeWhen an RDEV list is specified, one of those devices represents the active interface and any other devices represent backup interfaces. For example, a specification of RDEV 111 222 333 means that the first device (QDIO devices 111-113 or EQDIO device 111) would probably become the active connection to the real hardware LAN segment. Unless the GROUP option is specified, devices 222 and 333 represent the interfaces to use as backup to the active device interface. If there is a problem with the connection via RDEV 111, RDEV 222 is used next. If there is a problem with the connection via RDEV 222, RDEV 333 is used next.End of change

The list feature provides dynamic recovery for Start of changeQDIO or EQDIOEnd of change device failures when the VSWITCH command is issued without the GROUP attribute or for real switch failures when the VSWITCH command is issued with the GROUP attribute. (Failure of an OSA adapter in an aggregated group is automatically handled by the virtual switch. The virtual switch transfers the data flow to the remaining OSA adapters in the group.)

Start of changeIncluding both QDIO and EQDIO devices in an RDEV list at the same time is not supported. Only devices of one type will be activated, while devices of the other type will display an error message.End of change

RDEV NONE means that the virtual switch does not connect to the real LAN segment when defined with NOGROUP. When the virtual switch is defined with GROUP, then RDEV NONE means that there is no link aggregation group failover in the event that the real switch should fail.

The RDEV operand cannot be used to specify device numbers when the virtual switch is configured to use a shared port group. MAC address takeover is managed by the shared port group to maintain connectivity after a failure.

Restriction: Start of changeThe number of devices identified by the RDEV keyword combined with the number of devices in an associated GROUP cannot exceed eight devices.End of change
CONnect
indicates that the currently configured virtual switch UPLINK port must be activated, and traffic can flow through the specified UPLINK ports devices.
DISCONnect
indicates that the currently configured virtual switch UPLINK port must not be activated, and that no traffic is to flow through the specified UPLINK ports device(s).

A virtual switch can be functional without a connection to a real LAN segment, and traffic flows only between virtual machines coupled to the virtual switch.

PRIQueuing
enables or disables guest priority queuing support on all outbound data transmissions from the virtual switch uplink port to an external network. Priority queuing is a capability of the Start of changeOSAEnd of change adapter when multiple output queues are defined for a single network connection. Each queue is weighted by a priority on how often it gets serviced. The highest priority queue is serviced first and more often followed by the next highest priority and so on. No queue is starved and all will get serviced at some point by the Start of changeOSAEnd of change adapter. More information about virtual switch exploitation of priority queuing is available: See Virtual Switch Priority Queuing Functionin z/VM: Connectivity.

If PRIQueuing is to be enabled on a virtual switch, then the OSA-Express adapters that are configured to the virtual switch's uplink port must be configured by IOCP to enable the feature within the adapter (PQ_ON). Start of changeIn contrast, End of change Network Express adapters (OSH devices) are always enabled for priority queuing. Even when a device is enabled for priority queuing, a virtual switch can be defined or be set with PRIQUEUING OFF.

For more information, see DEFINE CHPID / PATH, SET PORT GROUP, and SET VSWITCH in z/VM: CP Commands and Utilities Reference. See also NICDEF Directory Statement, MODIFY PORT Statement, and MODIFY VSWITCH Statement in z/VM: CP Planning and Administration.

OFF
The virtual switch will not exploit priority queuing. A single input queue is established for inbound transmissions from the external network and a single output queue is established for outbound transmissions. All outbound data to the external network is transmitted with equal priority. This is the default for TYPE QDIO virtual switches.

The OFF option is not allowed for a TYPE IVL virtual switch.

ON
The virtual switch will exploit priority queuing. If the OSA adapter that is used by a virtual switch uplink port is enabled for priority queuing, then z/VM will establish one input queue and four output queues when activating its network connection. This will allow z/VM to transmit data to the external network at four different priorities. CP will use the highest priority queue for control and management traffic. The other three queues (low, normal and high) can be used for virtual NICs' network connections. This is the default for TYPE IVL virtual switches.
For an IVL virtual switch, z/VM will attempt to establish an active network connection with the first OSA device specified. The result depends on the device type and configuration:
  • If the device is an OSA-Express adapter, then the result depends also on the adapter configuration.
    • If the adapter is configured with priority queuing (PQ_ON), then z/VM will establish an active network connection and use priority queuing.
    • If the adapter is configured without priority queuing (PQ_OFF), then z/VM will establish an active network connection and force virtual switch priority queuing OFF. A warning message will be displayed to inform the customer to configure priority queuing via IOCP.
  • Start of changeIf the device is a Network Express adapter, then the device is always enabled for priority queuing. z/VM will establish an active network connection and use priority queuing.End of change
For a non-IVL virtual switch, the result also depends on device type and configuration:
  • If the device is an OSA-Express adapter, then the result depends also on the adapter configuration.
    • If the adapter is configured with priority queuing (PQ_ON), then z/VM will establish an active network connection and use priority queuing.
    • If the adapter is configured without priority queuing (PQ_OFF), then z/VM will not establish an active network connection and an error message will be displayed.
  • Start of changeIf the device is a Network Express adapter, the device is always enabled for priority queuing. z/VM will establish an active network connection and use priority queuing.End of change

The policy used to select which priority a specific datagram is transmitted to the external network is determined by the type of virtual switch.

For an IVL virtual switch, the priority of outbound transmissions is handled by z/VM. IVL management traffic will be queued and transmitted on a high priority queue, and encapsulated production data failover traffic will be sent on a lower priority queue. The default for TYPE IVL virtual switches is PRIQueuing ON so that IVL network management data and encapsulated production data can be prioritized appropriately. If an OSA-Express device is used as an IVL Vswitch uplink, it is strongly recommended to have priority queueing enabled.

For virtual switches other than IVL type, the priority can be set to low, normal or high for all packets sent from a guest NIC's network connection to an external network via the SET VSWITCH command. For more information, see the PQUPLINKTX operand in SET VSWITCH in z/VM: CP Planning and Administration.

NOUPLINK
indicates the virtual switch will never have connectivity to a physical network through the UPLINK port. This option removes the UPLINK port from the virtual switch. Once the UPLINK port is removed, it can never be added back to the virtual switch.

Defining a virtual switch UPLINK port with either the RDEV or GROUP operands while also removing the UPLINK port with the NOUPLINK operand will cause the command to fail.

The NOUPLINK option is not allowed for a TYPE IVL virtual switch.

QUEuestorage minM maxM

specifies high and low limits for the amount of memory that CP and the Queued Direct I/O Hardware Facility can use for buffers for each data connection.

Start of changeThe amount of memory is defined as a range from a low limit (min) to a high limit (max). The limits are expressed in megabytes and can include the megabyte abbreviation suffix (M or m). A blank space is permitted between the number and the suffix. The low limit can be 1M-256M. The high limit can be 1M-256M and cannot be less than the low limit.End of change

Start of changeWhen only one value is specified, it is interpreted as the low limit, and the high limit defaults to 256M. If the QUEUESTORAGE operand is omitted, the default range is 8M-256M. End of change

Start of changeWhen an OSA-Express (QDIO) adapter is active, the high limit is ignored and only the low limit determines the amount of memory that can be consumed for QDIO buffers on a single data connection. Because the OSA-Express (QDIO) interface can operate with no more than 8M of memory, if the QUEUESTORAGE low limit (min) is higher than 8M, then the current value will be 8M instead of min. Although the current value in this case is outside the configured range, it is not considered an error. End of change

Start of changeWhen a Network Express (EQDIO) Adapter is active, the amount of memory allocated for EQDIO buffers will vary within the specified range (min-max). The current value is adjusted based on the level of network demand.End of change

When multiple network devices are defined in a link aggregation group, then each device port within the group adheres to the same specifications.

Start of changeThe following examples of the QUEUESTORAGE operand compare the memory usage for QDIO and EQDIO devices.
Start of change
Table 1. QUEUESTORAGE examples
QUEUESTORAGE fragment Range of memory usage for QDIO device Range of memory usage for EQDIO device
QUEUESTORAGE 8M 8M-256M
QUEUESTORAGE 4M 4M 4M-256M
QUEUESTORAGE 4M 6M 4M 4M-6M
QUEUESTORAGE 12 M 64 M 8M 12M-64M
QUEUESTORAGE 256M 8M 256M
End of change
End of change
CONTRoller *
CONTRoller userid1

Start of changeidentifies the z/VM user ID that controls the OSA-Express device that is connected to the virtual switch at the device number identified by rdev.End of change

Start of changeCONTROLLER * means that CP selects any eligible virtual machine that is configured as a VSWITCH controller.End of change For more information, see usage note 3.

If you specify multiple real devices by using the RDEV keyword or the GROUP keyword, then specify CONTROLLER *. The controller functions are then spread across multiple Start of changeVSWITCH controllersEnd of change, which provides more flexibility in case of a failure.

You can also provide a pool of specific controllers to be chosen from. Use the SET VSWITCH command or the MODIFY VSWITCH system configuration statement and specify a list of user IDs after the CONTROLLER keyword. Start of changeHowever, this is not the recommended practice.End of change

Start of changeThe CONTROLLER operand is optional. End of change

Note: Start of changeThe CONTROLLER value is ignored when the VSWITCH manages EQDIO devices to connect the real hardware LAN segment. However, when a BRIDGEPORT HiperSockets connection is configured, a controller virtual machine is required to manage the HiperSockets interface.End of change
Start of changeLOG OFF|ON|VerboseEnd of change
Start of changesets virtual switch activity-logging behavior for an active Network Express (EQDIO) interface.

The LOG setting affects the messages for an EQDIO device. The messages are displayed on the system operator console.

The LOG settings do not apply to an OSA-Express (QDIO) device because activity logging of a QDIO device is managed by a controller virtual machine.

LOG OFF
sets virtual switch activity-logging OFF. Normal activity is not logged to the system operator console. LOG OFF is the default VSwitch logging mode.
Note: Errors and unusual events are always logged to the system operator console regardless of the LOG setting.
LOG ON
sets virtual switch activity-logging to display brief messages that describe each significant event associated with EQDIO device operation. This setting is intended to be used by IBM personnel when diagnosing EQDIO interface problems.
LOG Verbose
sets virtual switch activity-logging to display more detailed messages that describe each significant event associated with EQDIO device operation. This setting is intended to be used by IBM personnel when diagnosing EQDIO interface problems.
End of change
IP
specifies IP transport for the virtual switch.

Start of changeThe IP transport type generally ignores the Ethernet network header (if provided) and uses the IP header to direct network packets on the LAN. End of change

Start of changeIP transport is compatible with only an OSA-Express (QDIO) uplink configuration. IP transport is not compatible with a Network Express (EQDIO) uplink configuration.End of change

If neither IP nor ETHERNET are specified and TYPE QDIO is specified, then by default the transport is set to IP NONROUTER.

ETHernet
specifies Ethernet transport for the virtual switch.

Start of changeThe ETHERNET transport type uses Ethernet (Layer 2) network headers to direct network packets on the LAN. End of change

Start of changeETHERNET transport is compatible with any VSWITCH uplink configuration. End of change

For an IVL virtual switch the ETHERNET setting is required. An IVL virtual switch can function correctly only at the Ethernet (layer 2) level. The command fails if anything other than ETHERNET is specified for an IVL virtual switch.

If neither IP nor ETHERNET are specified and TYPE QDIO is specified, then by default the transport is set to IP NONROUTER.

NONrouter
indicates that the OSA-Express device identified by the RDEV keyword is not a router to the virtual switch. If a datagram is received at this device for an unknown IP address, the datagram is discarded. Start of changeNONROUTER is valid for only an IP VSWITCH and is the default option.End of change
PRIrouter
indicates that the OSA-Express device identified by the RDEV keyword acts as a primary router to the virtual switch. If a datagram is received at this device for an unknown IP address, the datagram is passed to the virtual switch. Start of changePRIROUTER is valid for only an IP VSWITCH.End of change
GROup groupname

specifies that the virtual switch is associated with a group and configured for IEEE 802.3ad Link Aggregation. The groupname value is a single token (1-8 alphanumeric characters) that identifies the group. Use the SET PORT GROUP command to specify the attributes of the group and the Start of changeOSA-Express (QDIO) or Network Express (EQDIO)End of change devices that comprise the group. This option can be specified only when the virtual switch is defined with the ETHERNET transport attribute.

Before a GLOBAL virtual switch is associated with a group, the port group groupname must be defined by using the SET PORT GROUP command.

A LOCAL virtual switch can be associated with a group even if the group was not previously defined by using the SET PORT GROUP command. If necessary, the DEFINE VSWITCH command defines a group when the DEFINE VSWITCH command associates a group with a LOCAL virtual switch.

NOGroup
specifies that the virtual switch does not use link aggregation.
BRIDGEport
configures and specifies connectivity for a virtual switch Bridge Port. The Bridge Port is a special port that is used to connect the virtual switch to a HiperSockets CHPID, essentially bringing the HiperSockets CHPID to the virtual switch's simulated and physical networks.
Configuration of a virtual switch Bridge Port is supported only when all of the following conditions are met:
  • The Bridge facility is supported by the processor.
  • The virtual switch transport type is ETHERNET.
  • The virtual switch type is QDIO.
Additionally, the ISOLATION adapter cannot be used when the virtual switch has a Bridge Port.

Only guest operating systems running in a virtual machine under z/VM and exploiting QDIO Enhanced Buffer State Management (QEBSM) are eligible to be bridged from the HiperSockets CHPID to the virtual switch's simulated and physical networks.

NONE
specifies that the virtual switch does not have a Bridge Port.
RDEV nnnn
is a real device number to be used as a Bridge Port to connect the virtual switch to a HiperSockets CHPID. Only devices that have been configured with either of the HiperSockets CHPID parameters EXTERNAL_BRIDGED can be specified. Use these parameters on the DEFINE CHPID command or the appropriate CHPARM in the IOCP (x4 for EXTERNAL_BRIDGED).

The device selected must be compatible to the type of virtual switch created; for example EXTERNAL_BRIDGED for a QDIO type virtual switch. Connectivity to the HiperSockets CHPID will be prevented when the specified device does not match the virtual switch's type.

You must specify a single real device number as a hexadecimal number between X'0001' and X'FFFD'. The real device number specified represents a trio of devices. For example, specifying BRIDGEPORT RDEV 508 means the devices, 508-50A, are used to provide the connection to the HiperSockets CHPID.

CONnect
indicates that the device identified by the RDEV keyword will be immediately activated, allowing the connection to be used as the active or standby Bridge Port.
DISCONnect
indicates that the device identified by the RDEV keyword will be placed in the inactive state. If this connection is the active Bridge Port connection, another virtual switch with a Bridge Port on the same CHPID in standby state will take over the active Bridge Port connection.
SECONDARY
indicates that this virtual switch should be assigned a role as a SECONDARY Bridge Port for the HiperSockets CHPID. This is the default. See usage note 16 for more information about the SECONDARY Bridge Port role.
PRIMARY
indicates that this virtual switch must be assigned the role as the PRIMARY Bridge Port for the HiperSockets CHPID. See usage note 16 for more information about the PRIMARY Bridge Port role.
IPTimeout nnn
specifies the length of time in minutes that a transient IP address table entry remains in the IP address table for the virtual Start of changeswitchEnd of change. A transient entry is an entry added to the Start of changetableEnd of change by one guest on behalf of another. This operand has no meaning for ETHERNET networks.

nnn is a number from 1 to 240. 5 minutes is the default value.

VLAN
used to enable and configure IEEE standard 802.lQ VLAN support for the virtual switch being defined. A VLAN-aware virtual switch provides VLAN controls at the user level (with SET VSWITCH GRANT VLAN and PORTTYPE commands) that can not be overridden by a guest host. If this option is omitted for a type QDIO virtual switch, then the virtual switch is set to VLAN UNAWARE.
UNAWARE
indicates the virtual switch does not support IEEE standard 802.lQ. All frames flow within the virtual switch regardless of presence or absence of Virtual Local Area Network (VLAN) tags. Any VLAN tags present in the frames will be ignored within the switch (however the guest hosts may perform VLAN filtering at the virtual NIC level).
defvid
defines the virtual switch as a VLAN-aware switch supporting IEEE standard 802.lQ. The defvid defines the default VLAN ID to be assigned to guest ports when no VLAN ID is coded on the SET VSWITCH GRANT VLAN command, MODIFY VSWITCH GRANT VLAN statement, the SET VSWITCH PORTNUMBER command, the SET VSWITCH VLANID command, or through an ESM. It is a number from 1 to 4094. A VLAN-aware virtual switch provides VLAN controls at the user level (with SET VSWITCH GRANT, SET VSWITCH PORTNUMBER and SET VSWITCH VLANID commands) that may not be overridden by a guest host.
AWARE
defines the virtual switch as a VLAN-aware switch supporting IEEE standard 802.lQ without a default VLAN ID. When a virtual switch is specified as VLAN AWARE, one or more VLAN IDs must be assigned to each guest port by either a SET VSWITCH GRANT VLAN command, MODIFY VSWITCH GRANT VLAN statement, the SET VSWITCH PORTNUMBER command, the SET VSWITCH VLANID command, or through an ESM. Failure to assign an explicit VLAN ID causes all untagged frames transmitted from the port to be discarded. In the case of a VLAN-unaware guest using a PORTTYPE ACCESS all outbound frames will be discarded until a VLAN ID is set for the port.
PORTType ACCESS
defines the default porttype attribute for guests authorized for the virtual switch. For PORTTYPE ACCESS, the guest is unaware of VLAN IDs and sends and receives only untagged traffic.
PORTType TRUNK
defines the default porttype attribute for guests authorized for the virtual switch. For PORTTYPE TRUNK, the guest is VLAN aware and sends and receives tagged traffic for those VLANs to which the guest is authorized. If the guest is also authorized to the natvid, untagged traffic sent or received by the guest is associated with the native VLAN ID (natvid) of the virtual switch.

PORTTYPE TRUNK is not allowed for a TYPE IVL virtual switch.

GVRP
indicates that the VLAN IDs in use on the virtual switch should be registered with GVRP-aware switches on the LAN. This provides dynamic VLAN registration and VLAN registration removal for networking switches. This eliminates the need to manually configure the individual port VLAN assignments.

Start of changeGVRP is not supported for EQDIO devices.End of change

NOGVRP
Do not register VLAN IDs with GVRP-aware switches on the LAN. When NOGVRP is specified VLAN port assignments must be configured manually.
NATive natvid
defines the native VLAN ID that is to be associated with untagged frames that are received and transmitted by the virtual switch. The natvid option is available only on a VLAN-aware switch. The value of natvid must be a number 1-4094. If the Start of changeNATIVE operandEnd of change is omitted, then the value of natvid defaults to 1 for a type QDIO virtual switch.
NATive NONE
causes all untagged frames to be discarded.
USERBASED
operational differences between USERBASED and PORTBASED VSwitches have been eliminated.

USERBASED specifies that user based rules will be applied when relocating a guest in an SSI. A user-defined port may or may not be preserved over a relocation. Port numbers assigned by z/VM will not be preserved. New port numbers will be assigned on the destination system. If portnumber predictability across an SSI is required, use the PORTBASED option on the VSwitch in each SSI member.

For more information, see z/VM: Connectivity.

USERBASED is not allowed for a TYPE IVL virtual switch.

PORTBASED
operational differences between USERBASED and PORTBASED VSwitches have been eliminated.

PORTBASED specifies that port based rules will be applied when relocating a guest in an SSI. User-defined port numbers will be preserved over a relocation. Port numbers assigned by z/VM will not be preserved. In this case a new port number will be allocated on the destination system.

For more information, see z/VM: Connectivity.

PORTname portname
must be 1-8 characters, and a maximum of three port names can be specified.
Notes: Start of change
  1. The PORTNAME operand is deprecated and is not recommended for use.
  2. If the PORTNAME operand is used, the following coordination requirement applies to OSA-Express adapters. When two or more virtual switches specify a PORTNAME value and use the same OSA-Express device, then the PORTNAME values must match. The requirement applies when the virtual switches are defined on the same LPAR or different LPARs on the same CPC.

    The coordination requirement does not apply to a virtual switch that does not specify a PORTNAME value.

    The coordination requirement does not apply to Network Express adapters.

  3. The PORTNAME value cannot be changed while the virtual switch is connected to the hardware LAN segment. If the device is already started, issue the SET VSWITCH switchname DISCONNECT command.
End of change

Usage Notes

  1. The DEFINE VSWITCH statement creates a virtual switch. The MODIFY VSWITCH statement can be used to modify a virtual switch by authorizing users to use the switch. Authorization to a virtual switch may also be provided by an External Security Manager.
  2. Accounting is set for the switch based on the default accounting state as set by the SET VMLAN ACCOUNT SYSTEM command or configuration statement. If accounting is turned on after the virtual switch is defined, the virtual switch will need to be redefined for accounting to take effect.
  3. Start of changeA virtual switch OSA-Express (QDIO) connection to a real hardware LAN segment is not operational until an eligible controller virtual machine is selected to manage the OSA-Express interface. CP selects an eligible virtual machine to be the controller by using the following criteria: End of change
    • If CONTROLLER userid1 is specified on the DEFINE or SET VSWITCH commands or the DEFINE VSWITCH or MODIFY VSWITCH System Configuration statements, with either a single user ID or a list of user IDs, then only those user IDs are Start of changeeligible to beEnd of change selected.
    • If CONTROLLER * is specified or allowed to default, CP selects from any eligible Start of changevirtual machine that is configured as a VSWITCH controllerEnd of change.
    Notes: Start of change
    1. It is recommended that the VSWITCH controller be at the same release level as CP, although all supported releases are allowed.
    2. A controller virtual machine is not required and is not used to manage a Network Express (EQDIO) device interface. An EQDIO device is controlled by VSwitch internal logic. If, however, a BRIDGEPORT HiperSockets connection is configured, a controller virtual machine is required to manage the HiperSockets device interface.
    End of change
    Start of changeA virtual machine becomes an eligible QDIO controller when all the following criteria are met: End of change
    • Start of changeThe virtual machine is running a TCPIP MODULEEnd of change at a release level that supports the function that is required for the virtual switch.
    • An IUCV *VSWITCH statement is included in the virtual machine's CP directory entry.
    • The TCP/IP VSWITCH CONTROLLER statement is coded, and has defaulted to be ON or is explicitly set to ON in the TCP/IP configuration file or through an OBEYFILE command.
    • The Start of changevirtual machineEnd of change has completed initialization.
    • The Start of changevirtual machineEnd of change has virtual device numbers available for CP to attach the control device.
      The virtual device range used by CP is specified in the VSWITCH CONTROLLER TCP/IP configuration statement. If no VDEV range is specified, CP uses the virtual device number (vdev) that matches the rdev number that is specified on the DEFINE VSWITCH or SET VSWITCH command. See the VSWITCH CONTROLLER Statement in z/VM: TCP/IP Planning and Customization for more information.
      Note: Do not code DEVICE and LINK TCP/IP configuration statements for the device. Do not attach the Start of changereal QDIOEnd of change device to a Start of changecontroller virtual machineEnd of change. These steps are handled automatically by VSWITCH processing when Start of changean eligible controllerEnd of change is selected.

    If an eligible Start of changevirtual machineEnd of change is not found or none of the rdevs are operational, a message is issued and the virtual switch operates in a local LAN environment Start of changewithout an uplink device.End of change

  4. The virtual switch supports two modes of operation for data transport in support of both TCP/IP and non-IP based applications. In deciding which mode to deploy for your network, some things to consider about deploying an ETHERNET virtualized LAN segment are:
    • Start of changeDo you intend to use EQDIO devices to connect to the real hardware LAN segment? If so, ETHERNET transport is required.End of change
    • Start of changeDo you intend to use a link aggregation group to connect to the real hardware LAN segment? If so, ETHERNET transport is required.End of change
    • Start of changeDo you intend to use a Hipersockets bridge port on the virtual switch? If so, ETHERNET transport is required.End of change
    • Do your servers or applications require their own unique MAC addresses (load balancers)?
    • Do you plan to deploy non-IP based applications on your network (SNA or NetBIOS, for example)?
    • Do you want to build a virtual LAN segment that operates closely to its physical counterpart?
    • Start of changeWill any guests connect to this virtual switch by using simulated EQDIO interfaces?End of change
    The key attributes of each transport mode with their operational characteristics are as follows:
    • ETHERNET (Layer 2)
      • Supports all applications that deploy ETHERNET (IEEE 802).
      • ETHERNET frames are transported on the LAN segment.
      • All destinations are identified by MAC address.
      • MAC addresses are locally administered by the LAN administrator through z/VM CP commands or configuration statements.
      • Each host connection is identified by a single MAC address.
      • This is a Link Layer transport, in which all hosts maintain their respective ARP caches.
      • VLAN tagging resides within the ETHERNET frames per IEEE 802.1Q specifications.
      • When GROUP attribute is specified, the frames can be transported as part of the IEEE 802.3ad standard.
      • When a Bridge Port is defined the virtual switch provides physical LAN connectivity for the target HiperSocket channel.
      • Start of changeSupports simulated QDIO and simulated EQDIO interfaces.End of change
    • IP
      • Supports IP for TCP/IP applications only.
      • IP packets are transported on the LAN segment.
      • All destinations are identified by IP addresses.
      • IP address assignments are set by the host running in the guest virtual machine.
      • Each host may have more than one IP address (multi-homed).
      • This is Link Layer independent (that is, no MAC addresses), and ARP processing is offloaded onto the OSA-Express adapter.
      • VLAN tagging resides in internal QDIO headers.
      • All hosts share the OSA-Express MAC address.
      • Start of changeSupports simulated QDIO interfaces but not simulated EQDIO interfaces.End of change

    A virtual switch operates in only one mode for a given instance. For example, if the switch is configured as IP, then all communications on the LAN segment must be IP based. The same is also true when the switch is configured in ETHERNET mode. These transport modes affect the method of data transfer for the virtual switch. The other operations of the switch, such as guest authorization, failover, controller configuration, and so on, function the same for both modes.

  5. The IP transport type is IPv4 only. In order to support IPv6 through the virtual switch RDEV, the ETHERNET transport is required.
  6. The MODIFY VSWITCH statement and the SET VSWITCH command cannot be used to change the type of transport. To change the type of transport, the virtual switch must be redefined.
  7. Use the QUERY CONTROLLER command output to find the Start of changevirtual machinesEnd of change that are the virtual switch controllers. Use the QUERY VSWITCH command to display information about the virtual switch.
  8. CP manages the devices that are used to control a virtual switch's connection to a real LAN segment.

    Start of changeFor a Network Express (EQDIO) device, CP connects the real device to the VSwitch and directly controls the network device.End of change

    Start of changeFor an OSA-Express (QDIO) device, CP attaches the devices to Start of changea controller virtual machineEnd of change. CP also defines devices of type VSWITCH-OSD to the Start of changecontrollerEnd of change:
    • CP concatenates switchname with vdev and "DEV" to form the device name.
    • CP concatenates switchname with vdev and "LINK" to form the link names.
    Start of changeFor example, the VSWBETA connection using virtual device 300 would be configured with DEVICE VSWBETA0300DEV and LINK VSWBETA0300LINK.End of change These names appear in the TCP/IP query and trace information Start of changethat is obtained from the controllerEnd of change. Start of changeLink status indicates whether the link is ready (active) or inactive (backup).End of changeEnd of change

    Start of change End of change

    DEVICE and LINK statements must not be included in the TCP/IP configuration file for these devices.

    The port number specified by nnnn.Pnn is used by the Start of changecontrollerEnd of change when the device is initialized. If the port number is not specified, it will default to port 0. If the port number is not supported, initialization of the device is terminated.

  9. Start of changeMultiple real devices can be specified on the RDEV operand. This feature allows failover to an alternate real device in the event of a failure with the current OSA-Express or exclusive link aggregation group. All real devices specified must be active and connected to the same hardware LAN in order to effectively and dynamically failover to an alternate device. In addition, the alternate devices must be defined on separate CHPIDs. End of change
  10. Start of changePRIROUTER is required only when IP forwarding (routing) nodes will be coupled to the switch. Router nodes provide connectivity for their LAN segments (remote nodes) through their switch connection. When Router nodes are deployed, their switch connection must be configured as PRIROUTER. In addition to this, the switch itself must also be configured as PRIROUTER to the OSA-E adapter. This will insure delivery of datagrams destined for LAN segments that are connected through routers coupled to a switch. Only one connection on each OSA-Express card can be designated as PRIROUTER. If the switch is successful in establishing PRIROUTER on the OSA-Express card, no other node (or switch) sharing the same OSA-Express card will be able to act as PRIROUTER. If another connection has already been established as PRIROUTER, the switch will be left with NONROUTER status (which is reflected in the QUERY VSWITCH response). End of change
  11. NONROUTER is the default mode for the switch. Every node is directly coupled to the switch and the associated IP destinations are registered with the OSA-Express connection. This is the most efficient way to use the virtual switch. In this mode, packets with an unrecognized IP destination are automatically sent out through the switch connection.
  12. For a VLAN aware virtual switch, you should specify the same native VLAN ID (natvid) as specified in your configuration of any physical switches in your network. Most hardware manufacturers use a default of 1.
  13. The SET VSWITCH command cannot be used to change the VLAN awareness attribute. To change the attribute, detach the virtual switch and define it with the correct attribute by using the DEFINE VSWITCH command.
  14. If the virtual switch is defined as VLAN UNAWARE, any attempts to define a VLAN membership will fail. When the CP access list is used, SET or MODIFY VSWITCH GRANT with VLAN membership list fails. In addition, SET or MODIFY VSWITCH VLANID fails and SET or MODIFY VSWITCH PORTNUMBER with VLAN members fails. When an ESM is used, the COUPLE command fails if a VLAN list is returned by the ESM.
  15. The SET VSWITCH command cannot be used to change the USERBASED/PORTBASED attribute. The virtual switch will need to be redefined.
  16. A virtual switch's Bridge Port can be configured to take on the role as either the PRIMARY or as a SECONDARY Bridge Port for the HiperSockets CHPID. SECONDARY is the default role assigned when defining a virtual switch with a Bridge Port. A single PRIMARY Bridge Port and up to four SECONDARY Bridge Ports can be defined per HiperSockets CHPID.

    A functional virtual switch configured for the PRIMARY role is always selected as the active Bridge Port connection. Functional virtual switches configured with the SECONDARY role provide backup (standby) capability in the event of failure on the part of the active Bridge Port connection.

    The first virtual switch Bridge Port successfully connecting to the HiperSockets CHPID (whether PRIMARY or SECONDARY) will take on the responsibility as the active Bridge Port connection. When the active Bridge Port connection is a virtual switch with a SECONDARY role, then its responsibility as the active Bridge Port connection will be relinquished to a connection made by a virtual switch requesting the PRIMARY role.

  17. A Global virtual switch is a collection of virtual switches that share the same networking characteristics. This collection of virtual switches spans multiple systems running z/VM but logically operates as a single switch.

    Virtual switches defined with the same name and the GLOBAL option are said to be members of the same global virtual switch when they reside in systems running z/VM that belong to the same IVL domain. (Definition and activation of an IVL virtual switch allows a system running z/VM to join an IVL domain.

    The following conditions must be fulfilled in order to create or change a global virtual switch member:
    • The system's IVL virtual switch must be defined and its UPLINK port connected. In other words, the host must be an active member of an IVL domain.

      Creation of Global virtual switches specified in the SYSTEM CONFIG file will be deferred until the IVL virtual switch UPLINK port connects the system to the IVL domain. Message HCP3178I will be displayed for each deferred Global virtual switch.

    • If any other virtual switch exists in the IVL domain with the same name the following attributes must match or the DEFINE VSWITCH or SET VSWITCH will fail with message HCP3170E.
      • IP or ETHERNET
      • ISOLATION
      • VEPA
      • VLAN AWARE or UNAWARE
      • NATIVE natvid
      • USERBASED or PORTBASED
    • The following additional restrictions exist if a global virtual switch is configured to use a shared port group:
      • RDEV device_addr is not allowed.
  18. A virtual switch defined to be TYPE IVL is an Inter-VSwitch Link which provides communication infrastructure to exchange control information and data necessary to manage global networking objects that can span multiple systems running z/VM.

    A single IVL virtual switch accommodates all inter-LPAR control traffic for a system. This virtual switch is defined by the system administrator using a CP command or a statement in the System Configuration file. The DEFINE VSWITCH specifies the RDEV or GROUP operand to configure OSA-Express adapters to provide the required connectivity to systems running z/VM in other LPARs so they can all join the same IVL domain.

    An IVL domain is a group of systems running z/VM that have each defined an IVL VSwitch with an UPLINK port configured and connected to the same external LAN segment. Configuration of an IVL virtual switch defines the system's IVL domain membership.

    These domains allow isolation of global networking traffic through the enumeration of different domain letters A-H. Each is assigned a separate, reserved multicast MAC address. For example, communications for default Domain A is assigned to 03-FF-FF-FF-FF-01. (MAC address prefix 03-FF-FF is reserved for IVL communications for all systems running z/VM.)

    The VLAN associated with a VLAN-aware IVL virtual switch can be modified using the IVLPORT VLAN operand on the SET VSWITCH command. Up to 8 IVL domains can be defined per VLAN.

    Note that up to 16 systems can be members of the same IVL domain.

    When a global virtual switch is in use the IVL virtual switch UPLINK port must remain operational in order to support full function for a global virtual switch that spans multiple systems.

    For more information, see IVL (Inter-VSwitch Link) Overview in z/VM: Connectivity.

  19. Start of changeThe QUERY VSWITCH command shows the configured QUEUESTORAGE range (min-max) as well as the current value. The value is static for an OSA-Express (QDIO) adapter, but the current value might vary for a Network Express (EQDIO) adapter. The current value might be outside the configured range in the following circumstances:
    • OSA-Express (QDIO) shows a current value of 8M if the configured range is greater than 8M. The OSA-Express (QDIO) interface can operate with a maximum of 8M of memory.
    • Network Express (EQDIO) might show a current value that is outside the configured range if queried soon after setting a new range.
    End of change
  20. Start of changeThe following special considerations apply to a CHPID that is defined with the LINK_AGGREGATION parameter for Network Express (OSH) devices.
    The LINK_AGGREGATION parameter on the DEFINE CHPID command, or the corresponding CHPARM in the IOCP (x02), indicates that the specified CHPID is to be used only for link aggregation. When the CHPID is defined in link aggregation mode, the device can be used only as part of a port group for z/VM virtual switch link aggregation. When the CHPID is not defined in link aggregation mode, attempts to bring up a z/VM virtual switch that is configured to use the device as part of a link aggregation port group will fail if either of the following conditions are true:
    • A NETH device is also configured on the port.
    • The system is managed by IBM® Dynamic Partition Manager.
    End of change

Examples

  1. Define a switch named BIGANG that connects to a real LAN through device fd00:
      define vswitch bigang rdev fd00
  2. Define a switch named ETH1 that uses Link Aggregation for a port group named ETH1GRP:
      define vswitch eth1 ethernet group eth1grp
  3. Define a switch named LINPROD that uses OSA-Express hardware ports:
    define vswitch linprod rdev 9c00.p0 9d00.p1 9e00
    In this example, device 9e00 connects to port 0 on the OSA-Express adapter.
  4. Define a switch named ETH0 that connects to a real LAN through device 1e1b and to a HiperSockets CHPID through device 7000:
    define vswitch eth0 type qdio rdev 1e1b ethernet bridgeport rdev 7000