By default, there is only one network created in an OpenStack project. But for some scenarios, you might need to create several instances and organize them in an internal network. This internal network could be connected to the public Internet through a router (more discussions in this issue). This blog demonstrates how to create such an internal network in an OpenStack project. A corresponding tutorial video could be found at https://www.youtube.com/watch?v=3RmUpWA7U1Q
Creating an Internal Network
- Visit page
Project/Network/Networksafter logging in to the OpenStack dashboard.
- Click the button
Create Networkabove the topology picture, and input a network name. Make sure the option
Create Subnetis enabled. In the
Subnettab, specify a subnet name and its network address (e.g.,
192.168.0.0/24). Then click the blue button
- After several seconds, you should be able to see the created network in the topology diagram. Now click the button
Create Router, input a name and select
internetas its external network.
- After creating the router, you will see that it is connected to the external Internal. But it has not been connected to the internal network yet. Move the mouse to the router icon in the diagram and there will be a small panel pops up. Click
Add Interfaceand choose the created subnet as the target.
Now an internal subnet has been successfully created. You can select this network now when you create new instances. Such a setup can be used for hosting a Kubernetes cluster, for example: How to Deploy a Kubernetes Cluster Using Kubeadm.