Set up devstack with two ethernet interfaces

3.9k views Asked by At

I'm trying to setup a devstack VM using virt-manager. The VM must have two interfaces: 1 interface to the internet (eth0) and 1 interface to connect to another physical machine (eth1). I setup this at my local.conf:

[[local|localrc]]

DEST=/opt/stack

FLAT_INTERFACE=eth0

# Passwords and token
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50

# Fixed and floating subnets
FIXED_RANGE=10.100.27.0/24
#FLOATING_RANGE=192.168.200.0/24
NETWORK_GATEWAY=10.100.27.1
PUBLIC_NETWORK_GATEWAY=172.24.4.225
Q_FLOATING_ALLOCATION_POOL=start=172.24.4.226,end=172.24.4.231

# Reclone each time
RECLONE=yes

# Disable Nova Networking
disable_service n-net

# Neutron - Networking Service
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron

# Neutron - VPN as a Service
enable_service q-vpn

Q_PLUGIN=ml2
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch
Q_ML2_PLUGIN_TYPE_DRIVERS=flat,vlan
ML2_VLAN_RANGES=physnet0:2000:2999,physnet1:3000:3999
ENABLE_TENANT_VLANS=True
PHYSICAL_NETWORK=physnet0
OVS_PHYSICAL_BRIDGE=br-eth0
OVS_BRIDGE_MAPPINGS=physnet0:br-eth0,physnet1:br-eth1

The devstack builds successfuly. The instances created in openstack have internet communication. Then I create a provider network that maps with physnet1:

neutron net-create provider --shared --provider:network_type vlan --provider:physical_network physnet1 --provider:segmentation_id 3500

And create a subnet:

neutron subnet-create --name provider_subnet provider 10.100.28.0/24

I launch a VM and a router in this new network and they ping each other. Then I add eth1 to br-eth1 with:

ovs-vsctl add-br br-eth1 eth1

So that network maps in the eth1 interface. Then I connect a physical machine to eth1 with a network cable and set the the vlan ID 3500 for the interface. When I try to ping or ssh from the physical machine to the VM or the router inside devstack I don't get communication.

Is there any missing configuration in devstack local.conf?

Thanks you

1

There are 1 answers

0
Kedar On

I was trying to set up multiple provider networks with devstack and here's how I got it to work. I was using flat networks for all provider networks.

I'm not sure if this helped, but I found this blog: http://blog.oddbit.com/2014/05/28/multiple-external-networks-wit/

It said to clear out external_network_bridge, so I added this to my local.conf:

external_network_bridge=

preconfig via terminal:

ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex eth1
ovs-vsctl add-br br-eth2
ovs-vsctl add-port br-eth2 eth2
ovs-vsctl add-br br-eth2
ovs-vsctl add-port br-eth2 eth2

I am using eth0 for horizon and eth1 for the public network.

Here is my local conf:

Q_USE_SECGROUP=True
FLOATING_RANGE=10.71.15.0/24
FIXED_RANGE="10.0.0.0/24"
NETWORK_GATEWAY=10.0.0.1
Q_FLOATING_ALLOCATION_POOL=start=10.71.15.216,end=10.71.15.229
PUBLIC_NETWORK_GATEWAY=10.71.15.1
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
PROVIDER_NETWORK_TYPE=flat
PROVIDER_SUBNET_NAME=provider_net
external_network_bridge=
OVS_BRIDGE_MAPPINGS=public:br-ex,test2:br-eth2,test3:br-eth3