Ask Your Question

Network setup

asked 2019-02-08 13:28:40 -0600

dough gravatar image


I'm stuck with a school project and I'd really appreciate if someone could guide me through this. I have a school project which requires us to explore Cloud Services and the opportunities for this technology. I decided to create a private cloud using OpenStack. I'm not sure what I can and will do with it eventually but for now, testing the environment is my sole purpose. I use VirtualBox because our school doesn't let us install anything on student's computers which is a VDI Desktops. I created a CentOS machine and installed packstack -allinone. I followed the instructions given here ( Installation was successful and I can log into OpenStack from command line web browser "links".

Now I'd like to create another (or more) VM machines (with GUI) inside VirtualBox so I can manage OpenStack easily. But I'm super confused about the network configuration of VirtualBox. What type of network I should use in VB? NAT, bridge, etc. My school has provided me with 5 IP addresses dedicated to my project. Sadly I have no idea where I should use those IP addresses. I understand the very basic of networking but with this setup, I'm totally lost. I'd really appreciate it if someone could give me a few suggestions or recommendations on how to proceed from here. Bellow is the diagram of the school network. We can access the school computers from outside only through the VDI desktops. From home I use the Citrix Receiver to connect to my school desktop. Probably I don't have to say this but this Cloud I'm building will be only accessible inside school network.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-02-11 09:01:26 -0600

pv2b gravatar image

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:

[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": ""}]} |
| flavor_id               | None                                                                                                                                                                                      |
| ha                      | False                                                                                                                                                                                     |
| id                      | 4b194196-b644-46b1-af1f-40825886c0a9                                                                                                                                                      |
| interfaces_info         | [{"subnet_id": "467f2fa8-b1cb-40d5-b86b-3f029712faf4", "ip_address": "", "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 ...
edit flag offensive delete link more


Could you also share the ifcfg-br-ex settings? What are dns and gateway for your external network?

Vidor Vistrom gravatar imageVidor Vistrom ( 2019-06-30 21:07:46 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-02-08 13:28:40 -0600

Seen: 169 times

Last updated: Feb 08 '19