Professional Documents
Culture Documents
Access to VM Instances
This tutorial is the second part of our OpenStack series. In this tutorial, we will go through steps to configure
OpenStack Networking to allow access to VM instances from external networks.
Prerequisites
Follow the below link to install OpenStack so that we can begin the network configuration.
Environment
Internal (VM) Network = 10.40.4.0/24
External Network = 192.168.1.0/24
Instances Floating IP Range = 192.168.1.200 – 192.168.1.240
Gateway of External Network = 192.168.1.1
Automatic
If you have come through the previous article, then you need not create OVS bridge as the OpenStack setup
must have done it for you.
Manual
If you do not see br-ex (OVS Bridge) adapter on the system, then follow these steps.
vi /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
NAME=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
OVSBOOTPROTO="none"
OVSDHCPINTERFACES=ens33 # Physical Interface Name
BOOTPROTO=static
IPADDR=192.168.1.110 # Your Control Node IP (SingleNode)
NETMASK=255.255.255.0 # Your Netmask
GATEWAY=192.168.122.1 # Your Gateway
DNS1=192.168.122.1 # Your Name Server
ONBOOT=yes
The same way, edit the configuration file of physical interface (in my case: ens33). You can use ifconfig -a
command to find the available physical interface.
vi /etc/sysconfig/network-scripts/ifcfg-ens33
DEVICE=ens33
NAME=ens33
DEVICETYPE=ovs
TYPE=OVSPort
OVS_BRIDGE=br-ex
ONBOOT=yes
BOOTPROTO=none
Once you have modified both network interfaces, restart the network services to reflect changes.
Use ifconfig command to check whether the OVS bridge is available on your system.
ifconfig -a
Output:
The above output confirms that OVS bridge has been set up and available.
Create a New OpenStack Project and User
Login to OpenStack dashboard with admin credentials and create a project called “ITzGeek“. The end user uses
this project for their cloud requirements.
Next, create a user and assign it to the previously created project. Go to Identity >> Projects >> + Create
User.
First, we will create the external network. Go to Admin >> Network >> Networks >> + Create Network.
Make sure you logged in as Admin user
Make sure the Physical Network (extnet) name matches the name you had in the answer.txt file which we
used as an input for OpenStack installation.
Name: External_Network
Project: ITzGeek
Provider Network Type: Flat
Physical Network: extnet
Tick mark the External Network and Create Subnet, and then click Next.
Configure OpenStack Networking – Create OpenStack External Network
When you choose network address (IP) for external network and instances, make sure it is in the same range of
your home/personal network for easy communications. Otherwise, you would need to set up routes.
On Subnet tab,
Internal Network
This internal network is used by OpenStack to assign an IP address to VM instances. You can use any range of
IP address for this network.
To create an internal network, you would need log out as admin and log in as a newly created user “raj“.
Here, I’m adding DNS servers IP address so that VM instances can access the internet.
Configure OpenStack Networking – OpenStack Internal Subnet Details
Create Router
The router acts as the bridge between internal network and external network.
Go to Project >> Network >> Routers >> + Create Router.
Name the router and choose our External_Network as our external network and then click on Create Router.
In the previous step, we have added the external network to the router. Now, we have to add the internal
network as well.
Click on the router and go to interfaces tab and then click on + Add interface. Now, select the subnet of
Private_Network and then click submit.
Configure OpenStack Networking – Add Interface to OpenStack Router
Now, the router should have interfaces from External_Network and Internal_Network.
Now, we have completed the configuration of OpenStack networking. It is the time to Launch an OpenStack
Instance using Horizon Dashboard.