Under Construction

Virtual Ethernet on the Client LPAR

The command “lpar lsvslot” is particularly useful for determining which type of network virtualization an LPAR uses. The command displays all virtual adapters for a specified LPAR.

Select one of your LPARs and display the virtual adapters for this LPAR:

$ lpar lsvslot aixe01
SLOT  REQ  ADAPTER_TYPE   STATE  DATA
0     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
1     Yes  serial/server  1      remote: (any)/any connect_status=unavailable hmc=1
5     No   eth            1      PVID=16 VLANS= ETHMGMT 87DF85895A05
10    No   fc/client      1      remote: ms03-vio1(1)/104 c050760bd4280002,c050760bd4280003
20    No   fc/client      1      remote: ms03-vio2(2)/104 c050760bd4280000,c050760bd4280001
$

A virtual Ethernet adapter can be identified by the adapter type eth (ADAPTER_TYPE column). In our case, there is a virtual Ethernet adapter in virtual slot 5.

If the LPAR you selected does not have a virtual Ethernet adapter, select another LPAR.

Note: If you cannot find an LPAR with a virtual Ethernet adapter, try the command “lpar lseth“. It will show all virtual Ethernet adapters from all LPARs. If no LPARs are listed here, then virtual Ethernet is not used in your environment. You may want to look at the section on SR-IOV or vNICs.

The DATA column contains further information about the virtual Ethernet adapter. For example, our adapter has the PVID (port VLAN ID) 16 and has no other VLANs. As with a physical Ethernet adapter, a virtual Ethernet adapter is also connected to an Ethernet switch. This switch is a virtual Ethernet switch provided by the POWER hypervisor. In our case, it is called ETHMGMT. Finally, the MAC address of the virtual Ethernet adapter is specified.

Display the name of the associated managed system for your LPAR by running the command “lpar show” with the name of your LPAR:

$ lpar show aixe01
NAME    ID  SERIAL    LPAR_ENV  MS    HMCS
aixe01  4   67165A05  aixlinux  ms03  hmc01,hmc02
$

In our case, the associated managed system is ms03 (column MS).

Every managed system always has a virtual Ethernet switch with the name ETHERNET0. The administrator can create additional virtual Ethernet switches as required. The available virtual Ethernet switches can be displayed using the command “ms lsvswitch”.

Display the existing virtual Ethernet switches for your managed system:

$ ms lsvswitch ms03
NAME  VSWITCH             SWITCH_MODE  VLAN_IDS
ms03  ETHCUST1            VEB          1,2,110,139
ms03 ETHTSM             VEB          none
ms03 ETHERNET0(Default)  VEB          1,2,3,208,350,351
ms03 ETHCUST2            VEB          1,2,3,99,100,292
ms03 ETHMGMT             VEB          1,2,3,4,5,16,17,18,19
ms03 ETHCTRL             VEB          1,2,3,5,6
ms03 ETHCUST3            VEB          1,165
$

In our case, in addition to the default switch ETHERNET0, there are 6 additional virtual Ethernet switches. For each of these virtual Ethernet switches, the last column lists which VLANs are supported by the virtual switch.

Only one LPAR can be specified for the command “lpar lsvslot”. Use the option “-v” (verbose-only) with this command:

$ lpar -v lsvslot aixe01
hmc01: lshwres -r virtualio --rsubtype eth --level lpar -m ms03 --filter lpar_names=aixe01
hmc01: lshwres -r virtualio --rsubtype fc --level lpar -m ms03 --filter lpar_names=aixe01
hmc01: lshwres -r virtualio --rsubtype scsi --level lpar -m ms03 --filter lpar_names=aixe01
hmc01: lshwres -r virtualio --rsubtype serial --level lpar -m ms03 --filter lpar_names=aixe01
hmc01: lssyscfg -r sys -m ms03 -F capabilities
hmc01: lshwres -r virtualio --rsubtype vnic --level lpar -m ms03 --filter lpar_names=aixe01
$

Since the command supports and displays all available types of virtual adapters, several commands must be executed on the HMC. For each adapter type, there is a separate command on the HMCs to display information about that adapter type. To list all virtual adapters of an LPAR on an HMC, you would have to use the (very long) commands listed above. The “lpar lsvslot” command is much easier to use and also involves less typing.

If you are only interested in virtual Ethernet adapters, you can use the command “lpar lseth” instead of “lpar lsvslot”. Try this for your LPAR from above:

$ lpar lseth aixe01
LPAR_NAME  SLOT  REQ  STATE  TRUNK  IEEE  QOS   MAC_ADDR      PVID  VSWITCH  ADDL_VLAN_IDS
aixe01  5     No   1      -      0     none  87DF85895A05 16    ETHMGMT  -
$

Only the virtual Ethernet adapter is displayed. Otherwise, the information is similar to that shown above.

Use the option “-v” again to get a list of the commands that are executed on the HMC:

$ lpar lseth -v aixe01
hmc01: lshwres -r virtualio --rsubtype eth -m ms03 --level lpar
$

This is just one command. This command also provides all virtual Ethernet adapters on the managed system. The LPAR tool then filters out the required adapters from the output. This means that if you want to know all virtual Ethernet adapters for a managed system, this does not require any additional effort, as only one command is still required on the HMC.

You can therefore use the LPAR tool to display all virtual Ethernet adapters of all LPARs on a managed system. To do this, use the “-m” option for “lpar lseth” and enter the name of the managed system. Try this for your managed system:

$ lpar -m ms03 lseth
LPAR_NAME  SLOT  REQ  STATE  TRUNK  IEEE  QOS   MAC_ADDR      PVID  VSWITCH    ADDL_VLAN_IDS
aixdbe01   5     No   1      -      0     none  87DF85895A09 16    ETHMGMT    -
aixdbe02   5     No   1      -      0     none  87DF85895A07 16    ETHMGMT    -
aixdbt11   6     No   1      -      0     none  87DF85895A06 23    ETHMGMT    -
aixe01     5     No   1      -      0     none  87DF85895A05 16    ETHMGMT    -
aixe02     5     No   1      -      0     none  87DF85895A04 16    ETHMGMT    -

$

The command “lpar lseth” also supports the direct specification of any number of LPARs. If no LPAR is specified, all LPARs are automatically included.

Run the command “lpar lseth” without arguments to list all virtual Ethernet adapters for all your LPARs. Use the time command to measure the duration of “lpar lseth”:

$ time lpar lseth
LPAR_NAME   SLOT  REQ  STATE  TRUNK  IEEE  QOS   MAC_ADDR      PVID  VSWITCH    ADDL_VLAN_IDS
cust1appl31  31    No   1      -      0     none  217EB2059E1F  140   ETHCUST1        -
cust1appl32  31    No   1      -      0     none  217EB2068E07  140   ETHCUST1        -
cust1db51    31    No   1      -      0     none  217EB2059E04  140   ETHCUST1        -
cust1db52    31    No   1      -      0     none  217EB2068E1F  140   ETHCUST1        -
cust1db53    5     No   1      -      0     none  217EB2059E05  140   ETHCUST1        -


real  0m7.134s
user  0m2.546s
sys   0m0.813s
$

Note: This will be even faster in one of the next versions through parallelization!

In our case, all virtual Ethernet adapters of around 500 LPARs were identified within around 7 seconds (around 2300 virtual Ethernet adapters). This means that you can, for example, find out within 7 seconds which of the 500 LPARs belongs to a specific MAC address:

$ lpar lseth | grep -i 895bed308106
cust2tsm1           6     No   1      -      0     0     895BED308106  179   ETHCUST2   -
$

Note: Searching using selections (options “-s” and “-S”) also allows for much more complex searches.

If you want to know what other subcommands there are related to virtual Ethernet, you can display them using “lpar help eth”:

$ lpar help eth
USAGE: lpar [<option> ...] <keyword> [<option> ...] [<argument> ...]

Recognized keywords for topic 'eth' are:
   [-h <hmc>] [-m <ms>] [-p <profile>] addeth [-d] [-f] [-i] [-I] [-l <detail_level>] [-q <qos_priority>] [-r] [-s <vswitch>] [-t <trunk_priority>] [-w <wait_time>] [-v] <lpar> <slot> <port_vlan_id>|<attributes> [<addl_vlan_ids>|<attributes> ...]
   [-h <hmc>] [-m <ms>] [-p <profile>] addvlan [-d] [-f] [-l <detail_level>] [-w <wait_time>] [-v] <lpar> <slot> <vlan_id>[,<vlan_id>...] ...
   [-h <hmc>] [-m <ms>] [-p <profile>] cheth [-d] [-f] [-i] [-I] [-l <detail_level>] [-q <qos_priority>] [-r] [-R] [-s <vswitch>] [-t <trunk_priority>] [-w <wait_time>] [-v] <lpar> <slot> [<attributes> ...]
   [-h <hmc>] [-m <ms>] disableeth [-v] <lpar> <slot>
   [-h <hmc>] [-m <ms>] enableeth [-v] <lpar> <slot>
   [-h <hmc>] [-m <ms>] [-p <profile>] lseth [{-o <format>|-f|-j|-y}] [-F <fields>] [-s <selections>] [-v] [<lpar> ...]
   [-h <hmc>] [-m <ms>] [-p <profile>] lsvslot [{-o <format>|-f|-j|-y}] [-t <type>] [-F <fields>] [-s <selections>] [-v] <lpar>
   [-h <hmc>] [-m <ms>] [-p <profile>] rmeth [-d] [-f] [-l <detail_level>] [-w <wait_time>] [-v] <lpar> <slot>
   [-h <hmc>] [-m <ms>] [-p <profile>] rmvlan [-d] [-f] [-l <detail_level>] [-w <wait_time>] [-v] <lpar> <slot> <vlan_id>[,<vlan_id>...] ...
$

This means that virtual Ethernet adapters can also be created, modified and deleted! However, in this tutorial we have deliberately limited ourselves to reading operations so that the reader of the tutorial can try out the operations shown without any risk.

In the following section we look at the path of the network packets from the virtual Ethernet switch to the physical Ethernet adapter.