8.5.5. Adding and Removing VLANs (not HA)

The shared Ethernet adapter created above on ms05-vio1 currently supports the following VLANs:

$ vios lssea -V ms05-vio1 ent42
SEA    LNAGG  NAME   TYPE     VSWITCH   MODE  ACTIVE  PRIORITY  PVID  VLAN_TAG_IDS
ent42  -      ent2   real     -         -     -       -         -     -
ent42  -      ent41  virtual  ETHTEST2  VEB   True    1         2     200,205,210
ent42  -      ent39  virtual  ETHTEST2  VEB   True    1         1     100,110
$

If another VLAN is required, e.g. VLAN 120, the new VLAN can be added to one of the existing trunking adapters as an additional VLAN, e.g. the trunking adapter ent39. The command “lpar addvlan” (add VLAN), which allows to add further VLANs to a virtual Ethernet adapter, expects a slot number for the virtual Ethernet adapter to be changed. The slot number of ent39 can be easily displayed with the command “vios lsdev“:

$ vios lsdev ms05-vio1 ent39
NAME   STATUS     PHYSLOC                      PARENT  DESCRIPTION
ent39  Available  U8205.E6C.05E4E5Q-V1-C61-T1  vio0    Virtual I/O Ethernet Adapter (l-lan)
$

The trunking adapter has slot number 61! The VLAN 120 can now be added to the virtual Ethernet adapter in slot 61 as follows:

$ lpar addvlan ms05-vio1 61 120
$

The additional VLAN is immediately available (if access to the VLAN 120 for the physical Ethernet port of the SEA is allowed on the external network switches):

$ vios lssea -V ms05-vio1 ent42
SEA    LNAGG  NAME   TYPE     VSWITCH   MODE  ACTIVE  PRIORITY  PVID  VLAN_TAG_IDS
ent42  -      ent2   real     -         -     -       -         -     -
ent42  -      ent41  virtual  ETHTEST2  VEB   True    1         2     200,205,210
ent42  -      ent39  virtual  ETHTEST2  VEB   True    1         1     100,110,120
$

If several additional VLANs are to be added at the same time, these are simply listed separated by commas with the “lpar addvlan” command:

$ lpar addvlan ms05-vio1 61 125,126,127
$

Now 3 more VLANs can be used via the SEA:

$ vios lssea -V ms05-vio1 ent42
SEA    LNAGG  NAME   TYPE     VSWITCH   MODE  ACTIVE  PRIORITY  PVID  VLAN_TAG_IDS
ent42  -      ent2   real     -         -     -       -         -     -
ent42  -      ent41  virtual  ETHTEST2  VEB   True    1         2     200,205,210
ent42  -      ent39  virtual  ETHTEST2  VEB   True    1         1     100,110,120,125,126,127
$

VLANs that are no longer required can be removed using the “lpar rmvlan” (remove VLAN) command. Multiple VLANs can also be specified here:

$ lpar rmvlan ms05-vio1 61 120,125,127
$

It should be noted, that client LPARs that are currently using these VLANs, immediately lose the connection to external systems. The command does not check whether the VLANs are still in use!

Note: If SEAs are used with ha_mode=auto or ha_mode=sharing, adding and removing VLANs is a bit more complicated and will be discussed later.