Hi, everyone
Today in this article, I will show you how to create and configure “Tagged Vlan / Vlan Tagging” in a virtualized Oracle Database Appliance (OVM / ODA_BASE).
1. Introduction
2. OVM Network Overview
Every new Vlan created in the ODA, it will create:
- A new virtual network interface on top of bond0 with the vlan Id: (bond0.199 and bond0.200).
- A new bridge network interface (vlan199, DEV).
- xm list -l
It will display a lot of configuration for the DOM0 and you can get the MAC Address for the bridge interface and make the relationship to the ODA_BASE.
DOM0:
(device
(vif
(bridge vlan199)
(handle 3)
(uuid 79b1e8cb-45f4-b03d-ea75-3b682932edb9)
(script /etc/xen/scripts/vif-bridge)
(mac 00:16:3e:43:18:eb)
(type netfront)
(backend 0)
)
)
(device
(vif
(bridge DEV)
(handle 4)
(uuid b2c14fd8-6aca-4d55-36fd-4168d1aba017)
(script /etc/xen/scripts/vif-bridge)
(mac 00:16:3e:4f:4d:82)
(type netfront)
(backend 0)
)
)
ODA_BASE:
ifconfig | grep -i “00:16:3e:43:18:eb“
eth3 Link encap:Ethernet HWaddr 00:16:3E:43:18:EB
ifconfig | grep -i “00:16:3e:4f:4d:82“
eth4 Link encap:Ethernet HWaddr 00:16:3E:4F:4D:82
3. Checks Before Add Vlan
Before starting adding/changing anything in the environment. We must be sure to backup all configuration files related to our procedure.
3.1 Backup Network Configuration File – DOM0 / ODA_BASE (All Nodes):
DOM0 / Node1:
mkdir -p /root/ODA_DOM0_VLAN_BKP_`hostname`/network-scripts
cp -p /etc/sysconfig/network /root/ODA_DOM0_VLAN_BKP_`hostname`
cp -rp /etc/sysconfig/network-scripts/* /root/ODA_DOM0_VLAN_BKP_`hostname`/network-scripts
DOM0 / Node2:
mkdir -p /root/ODA_DOM0_VLAN_BKP_`hostname`/network-scripts
cp -p /etc/sysconfig/network /root/ODA_DOM0_VLAN_BKP_`hostname`
cp -rp /etc/sysconfig/network-scripts/* /root/ODA_DOM0_VLAN_BKP_`hostname`/network-scripts
ODA_BASE / Node1:
mkdir -p /root/ODA_BASE_VLAN_BKP_`hostname`/network-scripts
cp -p /etc/sysconfig/network /root/ODA_BASE_VLAN_BKP_`hostname`
cp -rp /etc/sysconfig/network-scripts/* /root/ODA_BASE_VLAN_BKP_`hostname`/network-scripts
ODA_BASE / Node2:
mkdir -p /root/ODA_BASE_VLAN_BKP_`hostname`/network-scripts
cp -p /etc/sysconfig/network /root/ODA_BASE_VLAN_BKP_`hostname`
cp -rp /etc/sysconfig/network-scripts/* /root/ODA_BASE_VLAN_BKP_`hostname`/network-scripts
PS: Also is possible to shutdown the ODA_BASE and perform a backup/snapshot of the VM.
4. Steps Create New Vlan, ODA_BASE
4.1 From ODA_BASE as root user:
oakcli create vlan vlan199 -vlanid 199 -if bond0 -node 0
oakcli create vlan vlan199 -vlanid 199 -if bond0 -node 1
oakcli create vlan DEV -vlanid 200 -if bond0 -node 0
oakcli create vlan DEV -vlanid 200 -if bond0 -node 1
PS: Is not required to run in each node, since we are passing the parameter “-node 0 | -node 1”.
4.2 Setup new Vlan’s in the ODA_BASE:
- oakcli configure oda_base
INFO: Updating /etc/security/limits.conf in oda_base domain with new memlock value 177000000
4.3 Show New Vlan’s Added:
- oakcli show oda_base
ODA base current status :Running
4.4 Restart ODA_BASE
After add all new Vlan’s, restart ODA_BASE from DOM0 on both nodes:
- oakcli stop oda_base
- oakcli start oda_base
PS: It is possible also to run: oakcli restart oda_base.
(Personally I prefer run stop/start, since I already had problems with the oakd using restart command)
I would advise to perform a reboot also of the DOM0, just to “get the house organized”.
5. Changing IP’s DOM0 / ODA_BASE
To be able to keep connecting to the DOM0 after change the switch in trunk mode, is necessary to change the IP from NET1 (Bridge Interface) to VLAN199 (Bridge Interface).
All configurations in the network of DOM0 are done, node per node and not in the same time.
To achieve it, is necessary to connect from one DOM0 node through interconnecting to the other DOM0 node (Crossed connection).
PS: This step is required only if you do not have access to the DOM0 ILOM to use the console (web-console).
Unfortunately it was my case.
5.1 SSH Connect DOM0 (Crossed Connection)
From node2-dom0, connect to the node1-dom0 using the interconnect IP from PRIV1 network interface:
- node2-dom0: ssh root@192.168.10.20 (Interconnect IP node1-dom0)
5.2 SSH Connect ODA_BASE (Crossed Connection)
From node2-oda_base, connect to the node1-oda_base using the interconnect IP from eth0 network interface:
- node2-oda_base: ssh root@192.168.10.22 (Interconnect IP node1-oda_base)
DOM0: Crossed connection from NODE2-DOM0 to NODE1-DOM0
At this point we can start to change the network configuration files and validate if trunk mode is working fine.
- vi /etc/sysconfig/network-scripts/ifcfg-net1
#This file was dynamically created by OAK
DEVICE=net1
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=none
#IPADDR=10.10.10.10
#NETMASK=255.255.255.0
#GATEWAY=10.10.10.1
BRIDGING_OPTS=”multicast_snooping=0″
Copy the IP configurations from NET1 (Bridge Interface) and past it, in the VLAN199 configuration file:
- vi /etc/sysconfig/network-scripts/ifcfg-vlan199
#This file was dynamically created by OAK
DEVICE=vlan199
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=none
IPADDR=10.10.10.10
NETMASK=255.255.255.0
GATEWAY=10.10.10.1
BRIDGING_OPTS=”multicast_snooping=0″
Also is required to change the network interface used by the default gateway, from ETH1 to ETH3:
- vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node1-oda_base
NOZEROCONF=yes
GATEWAY=10.10.10.1
GATEWAYDEV=eth3
ODA_BASE: Connection from NODE1-ODA_BASE to NODE1-ODA_BASE
Put a comment in the configurations of eth1, as below:
- vi /etc/sysconfig/network-scripts/ifcfg-eth1
#Comet Auto generated config file. Bond interface eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
#IPADDR=10.10.10.12
#NETMASK=255.255.255.0
#GATEWAY=10.10.10.1
Copy the IP configuration from ETH1 to ETH3 network interface:
- vi /etc/sysconfig/network-scripts/ifcfg-eth3
#Comet Auto generated config file. Bond interface eth3
DEVICE=eth3
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.10.10.12
NETMASK=255.255.255.0
GATEWAY=10.10.10.1
Also is required to change the network interface used by the default gateway, from ETH1 to ETH3:
- vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node1-oda_base
NOZEROCONF=yes
GATEWAY=10.10.10.1
GATEWAYDEV=eth3
5.3 Shutdown/Startup ETH1 and ETH3 (NODE1-ODA_BASE), as root user:
- ifdown eth1
- ifdown eth3
- ifup eth3
- ifup eth1
5.4 Shutdown/Startup NET1 and VLAN199 (NODE1-DOM0), as root user:
- ifdown net1
- ifdown vlan199
- ifup vlan199
- ifup net1
PS: After these steps ask to the network team to Active the “Trunk Mode” in their switch.
Every network connection should work properly after this change.