Convert from GRE to VLAN
I refer to the VLAN configuration official documents
1. Edit the /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini file both in network node and computer node. Comment or delete GRE configuration and append VLAN configuration:

[ovs]
tenant_network_type = vlan
network_vlan_ranges = physnet1:1:4094
bridge_mappings = physnet1:br-DATA_INTERFACE


DATA_INTERFACE is the interface forwarding data packets between network/compute nodes (e.g. eth1 in this case).
2. Create the bridge both in network node and compute node for DATA_INTERFACE and add DATA_INTERFACE to it:

ovs-vsctl add-br br-DATA_INTERFACE
ovs-vsctl add-port br-DATA_INTERFACE DATA_INTERFACE

3. Transfer the IP address for DATA_INTERFACE to the bridge br-DATA_INTERFACE.
3.1 Edit /etc/network/interfaces file in network node:

#Not internet connected(used for OpenStack management)
auto br-DATA_INTERFACE
iface br-DATA_INTERFACE inet static
address 10.10.10.51
netmask 255.255.255.0
auto DATA_INTERFACE
iface DATA_INTERFACE inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
auto lo
iface lo inet loopback
auto br-ex
iface br-ex inet dhcp
#For Exposing OpenStack API over the internet
auto eth0
iface eth1 inet manual
up ifconfig $IFACE 0.0.0.0 up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down

3.2 Edit /etc/network/interfaces file in Compute node:

auto br-DATA_INTERFACE
iface br-DATA_INTERFACE inet static
address 10.10.10.52
netmask 255.255.255.0
auto eth0
iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
auto lo
iface lo inet loopback

3.3 restart network service

/etc/init.d/networking restart

4.rebuild the public and private networks, but router.
Convert from VLAN to GRE
1. Edit the /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini file both in network node and computer node. Comment or delete VLAN configuration and append GRE configuration:

[ovs]
tenant_network_type = gre
tunnel_id_ranges = 1:1000
enable_tunneling = True
integration_bridge = br-int
tunnel_bridge = br-tun
local_ip = DATA_INTERFACE_IP

2.Configure file /etc/network/interfaces in compute node:

auto eth0
iface eth0 inet static
address 10.10.10.52
netmask 255.255.255.0
auto lo
iface lo inet loopback

3. Configure file /etc/network/interfaces in network node:

#Not internet connected(used for OpenStack management)
auto eth1
iface eth1 inet static
address 10.10.10.51
netmask 255.255.255.0
auto lo
iface lo inet loopback
auto br-ex
iface br-ex inet dhcp
#For Exposing OpenStack API over the internet
auto eth0
iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down

4. Delete data port DATA_INTERFACE from the bridge br-DATA_INTERFACE and delete bridge br-DATA_INTERFACE

ovs-vsctl del-port br-DATA_INTERFACE DATA_INTERFACE
ovs-vsctl del-br br-DATA_INTERFACE

5. restart network service

/etc/init.d/networking restart

6. Rebuild the public and private networks, but router.
PS: If control/network node cannot connect to compute node, reboot the compute node. It works for me.

lidemin OpenStack, Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *