virtual ethernet with ivm
Here a little post to explain how to add a virtual ethernet adapter on IVM.
The first step is to check under padmin what are the virtual network adapters already defined on partitions :
# lshwres -r virtualio --rsubtype eth --level lpar
lpar_name=VIOS1,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=FFFFFFFFE803
lpar_name=VIOS1,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=FFFFFFFFE804
lpar_name=VIOS1,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=FFFFFFFFE805
lpar_name=VIOS1,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=FFFFFFFFE806
lpar_name=VIOS1,lpar_id=1,slot_num=12,state=1,ieee_virtual_eth=1,port_vlan_id=5,"addl_vlan_ids=10,11,12",is_trunk=1,trunk_priority=1,is_required=0,mac_addr=FFFFFFFFE80C
lpar_name=VIOS1,lpar_id=1,slot_num=14,state=1,ieee_virtual_eth=0,port_vlan_id=60,addl_vlan_ids=none,is_trunk=1,trunk_priority=1,is_required=0,mac_addr=FFFFFFFFE80E
lpar_name=VIOS1,lpar_id=1,slot_num=22,state=1,ieee_virtual_eth=1,port_vlan_id=7,"addl_vlan_ids=6,8,9",is_trunk=1,trunk_priority=1,is_required=0,mac_addr=FFFFFFFFE816
lpar_name=LPAR1,lpar_id=2,slot_num=4,state=1,ieee_virtual_eth=0,port_vlan_id=10,addl_vlan_ids=none,is_trunk=0,trunk_priority=0,is_required=0,mac_addr=FFFFFDD72304
lpar_name=LPAR1,lpar_id=2,slot_num=5,state=1,ieee_virtual_eth=0,port_vlan_id=11,addl_vlan_ids=none,is_trunk=0,trunk_priority=0,is_required=0,mac_addr=FFFFFDD72305
lpar_name=LPAR1,lpar_id=2,slot_num=6,state=1,ieee_virtual_eth=0,port_vlan_id=12,addl_vlan_ids=none,is_trunk=0,trunk_priority=0,is_required=0,mac_addr=FFFFFDD72306
lpar_name=LPAR1,lpar_id=2,slot_num=7,state=1,ieee_virtual_eth=0,port_vlan_id=8,addl_vlan_ids=none,is_trunk=0,trunk_priority=0,is_required=0,mac_addr=FFFFFDD72307
lpar_name=LPAR1,lpar_id=2,slot_num=8,state=1,ieee_virtual_eth=0,port_vlan_id=9,addl_vlan_ids=none,is_trunk=0,trunk_priority=0,is_required=0,mac_addr=FFFFFDD72308
If i want to add a virtual adapter with vlan 60 to a shared ethernet adapter, i will use chdev :
chhwres -p vios1 -o a -r virtualio --rsubtype eth -s 14 -a "ieee_virtual_eth=0,port_vlan_id=60,is_trunk=1,trunk_priority=1"
To create a shared ethernet adapter, we need to check what is the physical adapter to use.
/home/padmin# lsdev|grep ent
ent0 Available Logical Host Ethernet Port (lp-hea)
ent1 Available Logical Host Ethernet Port (lp-hea)
ent2 Available 2-Port Gigabit Ethernet PCI-Express Adapter (e4143a16e4140909)
ent3 Available 2-Port Gigabit Ethernet PCI-Express Adapter (e4143a16e4140909)
ent4 Available 2-Port Gigabit Ethernet PCI-Express Combo Adapter (e4143a161410a003)
ent5 Available 2-Port Gigabit Ethernet PCI-Express Combo Adapter (e4143a161410a003)
ent6 Available Virtual I/O Ethernet Adapter (l-lan)
ent7 Available Virtual I/O Ethernet Adapter (l-lan)
ent8 Available Virtual I/O Ethernet Adapter (l-lan)
ent9 Available Virtual I/O Ethernet Adapter (l-lan)
ent10 Available EtherChannel / IEEE 802.3ad Link Aggregation
ent11 Available Virtual I/O Ethernet Adapter (l-lan)
ent12 Available VLAN
ent13 Available Shared Ethernet Adapter
ent14 Available Virtual I/O Ethernet Adapter (l-lan)
ent16 Available Virtual I/O Ethernet Adapter (l-lan)
ibmvmc0 Available Virtual Management Channel
here we will use ent0, our virtual adapter is ent16. To check adapter slot, we use lsslot :
lsslot -c slot
We create the SEA :
mkvdev -sea ent0 -vadapter ent16 -default ent16 -defaultid 60
And it’s all for the IVM/VIO side.
If we want to add a adapter on a partition, we create it with chhwres :
chhwres -p LPAR1 -o a -r virtualio --rsubtype eth -s 9 -a "ieee_virtual_eth=0,port_vlan_id=60"
A interesting thing with ivm is we don’t need to modify partition profile, chhwres is doint it for us :
lssyscfg -r prof -F name,lpar_name,virtual_eth_adapters
VIOS1,VIOS1,"3/0/1//1/0,4/0/2//1/0,5/0/3//1/0,6/0/4//1/0,12/0/997//1/0,""15/1/998/300,721,999/1/0"",""18/1/996/200,736/1/0"",19/0/4000//0/0,20/0/736//0/0"
LPAR1,LPAR1,"4/0/1//0/0,9/0/60//0/0"
The entry “9/0/60//0/0” is corresponding to our new adapter.
We could have added it with chsyscfg:
chsyscfg -r prof -i 'name=lpar1,lpar_id=3,"virtual_eth_adapters+=""9/0/60//0/0"""'
The += is important to avoid to overwrite all other network virtual adapters.
I don’t work so much with IVM so this post will serve as a reminder for myself too :)