Sunday, August 1, 2010

Creating VLAN Tagged IEEE 802.1Q Virtual Ethernet Adapters in IVM

Technote (FAQ)

Question
Is there a method for creating VLAN tagged virtual Ethernet adapters using the integrated virtual manager (IVM)?



Cause
The IVM GUI in v2.1 and lower does not provide GUI advanced options for creating multiple VLAN tagged Ethernet adapters. The limitation of the IVM GUI does not allow you to specify VLAN tagging when creating virtual ethernet devices, but you can achieve the configuration using CLI.


Answer
The IVM command line interface (CLI) does allow creating VLAN tagged (IEEE 802.1Q) virtual Ethernet adapters. There are two commands that will need to be used:

(1) chhwres is used on the VIO server to dynamically modify the VIO server LPAR only.

(2) chsyscfg is used to modify the client LPAR profile and can only be used when client is not activated.


Following example of creating virtual Ethernet adapters that support VLAN configurations illustrate using the chhwres and chsyscfg commands. The example shows commands for listing output of profile definitions of a client LPAR and then adding definitions for a new virtual adapter to the LPAR profile.

lssyscfg -m Server-9111-520-SN104797E -r prof --filter lpar_ids=2

Example output:
name=ivmclient,
lpar_name=ivmclient,
lpar_id=2,
os_type=aixlinux,
all_resources=0,
min_mem=256,desired_mem=256,max_mem=256,
proc_mode=shared,
min_proc_units=0.10,desired_proc_units=0.10,max_proc_units=2.00,
min_procs=1,desired_procs=1,max_procs=2,
sharing_mode=uncap,uncap_weight=128,
io_slots=none,
lpar_io_pool_ids=none,
max_virtual_slots=6,
"virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1",
virtual_scsi_adapters=2/client/1/10-4797E_vios/11/1,
virtual_eth_adapters=5/0/1//0/0,
boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none

Note: The bold text output for virtual_eth_adapter variable in the example above shows the virtual device is in slot 5. The properties of the device are separated by a slash and designate parameters such as.
slot_num
ieee_virtual_eth
port_vlan_id
addl_vlan_ids
is_trunk
trunk_priority

Example of modifying the profile of an LPAR to add an additional virtual Ethernet adapter which will support the ability to receive VLAN 200 tagged traffic. The client LPAR needs to be shutdown before its profile can be changed.

chsyscfg -m Server-9111-520-SN104797E -r prof -i 'lpar_id=2,"virtual_eth_adapters=4/1/14/200/0/0,5/0/1//0/0"'

Checking the profile of LPAR 2 to see if changes were made can be done using the lssyscfg command..

lssyscfg -m Server-9111-520-SN104797E -r prof --filter lpar_ids=2 -F lpar_id,virtual_eth_adapters

Example output:
2,"4/1/14/200/0/0,5/0/1//0/0"

On the VIO server LPAR, when you do issue a command to modify the hardware. you can get the changed to dynamically take affect, but that is the special nature of a IVM environment. For example, the following IVM command dynamically alters the VIO server configuration.

chhwres -m Server-9111-520-SN104797E -p 10-4797E_vios -o a -r virtualio --rsubtype eth -s 14 -a
"ieee_virtual_eth=1,port_vlan_id=14,addl_vlan_ids=200,is_trunk=1,trunk_priority=1" -d 5

lshwres -m Server-9111-520-SN104797E -r virtualio --rsubtype eth --level lpar --filter lpar_ids=1
Example output:
lpar_name=10-4797E_vios,lpar_id=1,slot_num=3,state=1,ieee_virtual_eth=0,port_vlan_id=1,addl_vlan_ids=none,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=EEA290001003
lpar_name=10-4797E_vios,lpar_id=1,slot_num=4,state=1,ieee_virtual_eth=0,port_vlan_id=2,addl_vlan_ids=none,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=EEA290001004
lpar_name=10-4797E_vios,lpar_id=1,slot_num=5,state=1,ieee_virtual_eth=0,port_vlan_id=3,addl_vlan_ids=none,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=EEA290001005
lpar_name=10-4797E_vios,lpar_id=1,slot_num=6,state=1,ieee_virtual_eth=0,port_vlan_id=4,addl_vlan_ids=none,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=EEA290001006
lpar_name=10-4797E_vios,lpar_id=1,slot_num=14,state=1,ieee_virtual_eth=1,port_vlan_id=14,addl_vlan_ids=200,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=EEA29000100F

On the VIO server, the chhwres command also invokes other commands that will cause the server profile to be modified to for the new device so it will be available on next boot. You can also verify the profile was changed using the lssyscfg command.

lssyscfg -m Server-9111-520-SN104797E -r prof --filter lpar_ids=1 -F lpar_ids,virutal_eth_adapters

Example output:
1,"3/0/1//1/0,4/0/2//1/0,5/0/3//1/0,6/0/4//1/0,14/1/14/200/1/0"

The IVM GUI or CLI interface can then be used to setup a virtual Ethernet bridge (SEA) between a physical adapter and a virtual adapter that was created with the additional VLAN properties.

No comments: