Example — Dynamically Creating and Destroying a Virtual Switch
To create and then explicitly destroy a port based virtual switch, do the following. Note: This example was done from the LINUX1 userid with Class B privilege.
- Define a port based virtual switch named PORTVSW.
DEFINE VSWITCH PORTVSW PORTBASED - Define a port for LINUX1 userid. (Authorizes LINUX1 to connect
to port 10).
SET VSWITCH PORTVSW PORTNUMBER 10 USERID LINUX1 - Define a simulated NIC of type QDIO. The virtual device number
is 0800.
DEFINE NIC 0800 QDIO - Couple the simulated NIC to the virtual switch on the defined
port.
COUPLE 0800 TO SYSTEM PORTVSW PORTNUMBER 10 - Explicitly destroy the virtual switch.
DETACH VSWITCH PORTVSW
At the end of this process, the simulated NIC at devices 0800-0802
still exists, and can be coupled to another virtual switch. The command
DETACH NIC is used to destroy the simulated NIC. To do this, enter:
DETACH NIC 0800The command DETACH 0800 cannot be used to detach a simulated NIC. You must issue DETACH NIC when you want to remove a simulated NIC.