Hi, dough.
I just spent a lot of frustration getting this exact thing to work as well, so I hope I can share what worked for me. (Also taking this opportunity for my own sake to write down what actually worked.)
I am also using packstack on CentOS 7 (I didn't end up getting it to work correctly with devstack that I tried initially.)
Some of my terminology might be wrong since I'm still learning myself. Also, I might be missing a step or two, since this is from my (rather fresh) memory.
VirtualBox Networking Setup
First of all, I configured two network interfaces in VirtualBox, both of them bridged to my home LAN, the plan being to use the first NIC (enp0s3
in my setup) as the NIC for management and API traffic, and using the second nic (enp0s8
in my example) as an uplink to the OpenSwitch OVS into the physical network. In my lab (and probably in yours also) these should be the same, although they can be different.
I configured the second network interface to allow promiscious mode in VirtualBox. This is neccessary to allow VM traffic to work. This is done through the VM settings inside of the VirtualBox GUI.
Management / API network setup
You will need to setup a static IP address from one of your 5 addresses for use as your packstack box's IP address. This is accomplished using the standard methods on CentOS. On my machine, this is how my /etc/sysconfig/network-scripts/ifcfg-enp0s3
file looks:
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s3"
UUID="635501cf-47d5-47ab-96f1-8e2c5eac7eb1"
DEVICE="enp0s3"
ONBOOT="yes"
IPADDR="192.168.1.240"
PREFIX="24"
GATEWAY="192.168.1.1"
DNS1="192.168.1.1"
IPV6_PRIVACY="no"
[pvz@localhost ~]$
Neutron router / subnet setup
By default on Packstack, there is already a router1
router that is present, but uses the wrong subnet.
What you need to do is to create a new subnet, specifying the default gateway and netmask, as well as giving it the range of 5 IP addresses provided to you by your school. You'll need to use the openstack
CLI for this. Before running the openstack
cli, you'll need to source /root/keystonerc_admin
.
To actually achieve this state in the CLI refer to the docs, instead I'll show you how my working setup works:
[root@localhost pvz(keystone_admin)]# openstack router list
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
| ID | Name | Status | State | Distributed | HA | Project |
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
| 4b194196-b644-46b1-af1f-40825886c0a9 | router1 | ACTIVE | UP | False | False | a17f01bc783445f5b352209283f4cc02 |
+--------------------------------------+---------+--------+-------+-------------+-------+----------------------------------+
[root@localhost pvz(keystone_admin)]# openstack router show 4b194196-b644-46b1-af1f-40825886c0a9
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2019-02-10T17:15:48Z |
| description | |
| distributed | False |
| external_gateway_info | {"network_id": "40083a3e-15c6-451d-9185-076c8cc4b055", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "295c727c-83a9-4fce-985d-0476f95fc387", "ip_address": "192.168.1.244"}]} |
| flavor_id | None |
| ha | False |
| id | 4b194196-b644-46b1-af1f-40825886c0a9 |
| interfaces_info | [{"subnet_id": "467f2fa8-b1cb-40d5-b86b-3f029712faf4", "ip_address": "10.0.0.1", "port_id": "5aa4107a-711e-4c08-b0ec-e0a30de06718"}] |
| name | router1 |
| project_id | a17f01bc783445f5b352209283f4cc02 |
| revision_number | 9 |
| routes | |
| status | ACTIVE |
| tags | |
| updated_at | 2019-02-10T18:12:16Z |
+-------------------------+----------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------+
[root@localhost pvz(keystone_admin)]# openstack network ...
(more)