====== VIOS dynamically add a VLAN ======
This function is available using Web interface https://www.ibm.com/support/pages/how-add-or-modify-additional-vlans-using-enhanced-ui
Or here describe the hmc command line
===== Precheck before adding =====
Check RMC connection --> it's required ! If inactive follow the procedure from wiki
hscroot@hmc01:~> for srv in $(lssyscfg -r sys -F name); do lssyscfg -r lpar -m $srv -F name,rmc_state ; done | grep vios
...
vios01,active
vios02,active
Check the profiles synchronization for all LPARs
hscroot@hmc01:~> for srv in $(lssyscfg -r sys -F name); do lssyscfg -r lpar -m $srv -F name,sync_curr_profile ; done
lnxa087,2
aixa003,1
...
vios01,1
vios02,1
If value not equal to 1 --> synchronize the profile, go on HMC web, on the partition property select advanced and in the section "Save configuration changes to profile", change to "Enabled" and save. Recheck using command line
===== Adding a VLAN =====
Add a new VLAN vlanid: 112, on the server power9-002
:!: ATTENTION !!! check which slot is used by SEA, here **slot 33** on vios01, and **slot 2** on vios02
Only on VLAN per line
hscroot@hmc01:~> lshwres -m power9-002 -r virtualio --rsubtype eth --level lpar -F | grep 4080
vios01,1,33,1,0,1,1,1,4080,ETHERNET0,"100,101,102",1A7Dxxxxx21,all,none,null,null,null,active,U8284.22A.2xxxxD3V-V1-C33-T1,ent6,ent5,ent2,0
vios02,2,2,1,0,1,2,1,4080,ETHERNET0,"100,101,102",1A7Dxxxxx02,all,none,null,null,null,active,U8284.22A.2xxxxD3V-V2-C2-T1,ent6,ent5,ent2,0
hscroot@hmc01:~> chhwres -r virtualio --rsubtype eth -m power9-002 -o s -p vios02 -s 2 -a "addl_vlan_ids+=112,ieee_virtual_eth=1"
hscroot@hmc01:~> chhwres -r virtualio --rsubtype eth -m power9-002 -o s -p vios01 -s 33 -a "addl_vlan_ids+=112,ieee_virtual_eth=1"
hscroot@hmc01:~> lshwres -m power9-002 -r virtualio --rsubtype eth --level lpar -F | grep 4080
vios01,1,33,1,0,1,1,1,4080,ETHERNET0,"100,101,102,112",1A7Dxxxxx21,all,none,null,null,null,active,U8284.22A.2xxxxD3V-V1-C33-T1,ent6,ent5,ent2,0
vios02,2,2,1,0,1,2,1,4080,ETHERNET0,"100,101,102,112",1A7Dxxxxx02,all,none,null,null,null,active,U8284.22A.2xxxxD3V-V2-C2-T1,ent6,ent5,ent2,0
===== Check the VLAN on the VIOS =====
List all VLAN delivered by VIOS
[root@nim01]/root> ssh padmin@vios01
[padmin@vios01]/home/padmin$ oem_setup_env
[root@vios01]/home/padmin# lsdev -Cc adapter | grep Shared
ent6 Available Shared Ethernet Adapter
[root@vios01]/home/padmin# entstat -d ent6 | grep -i vlan
VLAN Ids :
Packets dropped(VlanId) : 29279513
Packets dropped(VlanId) : 0
Enabled VLAN IDs: None
Enabled VLAN IDs: None
Invalid VLAN ID Packets: 0
Port VLAN ID: 4081
VLAN Tag IDs: 8
Management VLAN: Disabled
Invalid VLAN ID Packets: 0
Port VLAN ID: 4080
VLAN Tag IDs: 100 101 102 112
Management VLAN: Enabled
Invalid VLAN ID Packets: 0
Port VLAN ID: 4080
VLAN Tag IDs: 100 101 102 112
Management VLAN: Enabled
Check physical ports state and speed
[root@vios01]/home/padmin# entstat -d ent6 | egrep -i "Link|Speed"
VIRTUAL_PORT PHYS_LINK_UP
Device Type: IEEE 802.3ad Link Aggregation
Statistics for every adapter in the IEEE 802.3ad Link Aggregation:
IEEE 802.3ad Link Aggregation Statistics:
Physical Port Link Status: Up
Logical Port Link Status: Up
Physical Port Speed: 10 Gbps Full Duplex
PCIe Link Speed: 5.0 GT/s
Physical Port Link Status: Up
Logical Port Link Status: Up
Physical Port Speed: 10 Gbps Full Duplex
PCIe Link Speed: 5.0 GT/s