7.3.7. Adding and Removing VLANs to/from an Adapter
With IEEE 802.1q compatible virtual Ethernet adapters, VLAN IDs can be added or removed at any time. However, the port VLAN ID of an active LPAR cannot be changed; this is only possible by changing the profile and reactivating the LPAR with the changed profile.
In the case of an LPAR with an active RMC connection, VLANs can be added at any time using the “lpar addvlan” (add VLAN) command. The VLANs can either be specified using the VLAN ID or the virtual network name:
$ lpar addvlan aix22 5 testnet
A VLAN can be removed in the same way with the command “lpar rmvlan” (remove VLAN):
$ lpar rmvlan aix22 5 testnet
If a virtual Ethernet adapter is not IEEE 802.1q compatible, then it only supports untagged packets. Additional VLANs can not be added or removed in this case. However, the property of the IEEE 802.1q compatibility can be changed dynamically at runtime. The change can be made with the command “lpar cheth” (change ethernet) with the option “-i” (IEEE 802.1q compatible):
$ lpar cheth -i aix22 6
Then further VLANs can be added with “lpar addvlan“.
If an LPAR is powered off or has no active RMC connection, VLANs can only be added or removed in a profile of the LPAR. To do this, simply add the option “-p” together with a profile name for “lpar addvlan” or “lpar rmvlan”.
$ lpar -p standard rmvlan aix22 12 TestDB