Reader small image

You're reading from  OpenStack Essentials. - Second Edition

Product typeBook
Published inAug 2016
PublisherPackt
ISBN-139781786462664
Edition2nd Edition
Right arrow
Author (1)
Dan Radez
Dan Radez
author image
Dan Radez

Dan Radez joined the OpenStack community in 2012 in an operator role. His experience is focused on installing, maintaining, and integrating OpenStack clusters. He has been given the opportunity to internationally present OpenStack content to a range of audiences of varying expertise. In January 2015, Dan joined the OPNFV community and has been working to integrate RDO Manager with SDN controllers and the networking features necessary for NFV. Dan's experience includes web application programming, systems release engineering, and virtualization product development. Most of these roles have had an open source community focus to them. In his spare time, Dan enjoys spending time with his wife and three boys, training for and racing triathlons, and tinkering with electronics projects.
Read more about Dan Radez

Right arrow

Chapter 4. Network Management

In the previous chapter, we prepared to launch an instance by importing disk images into Glance. The next preparation required for launching an instance is to create a virtual network for the instance to use. Neutron is the network management component in OpenStack. In this chapter, we'll look at how to create virtual networks and routers for the OpenStack instances to use. We will also look at some of the underlying plumbing that is used to support the virtual networks.

Networking and Neutron


As I was learning Neutron networking and started to present my experiences to audiences, I coined a phrase that I continue to stand by: Networking is hard. Networking is the most complex component in OpenStack and for good reason. This is because networking is a complex part of computing. It takes time and hard work to understand networking. It is often left to the network administrators and neglected by others. Hats off to you network administrators. I spent 7 years of my professional career avoiding learning some of the core concepts of networking and leaving it to the folks that did networking. OpenStack is where it caught up with me and bowled me over. To administer an OpenStack cloud that uses Neutron networking, you have to understand some of the core concepts used in networking. As we work through the rest of this book, I will make sure to explain these concepts as we come across them so that if you're not a networking guru, you will hopefully come out on the...

Open vSwitch configuration


By default, the RDO installation you ran back in Chapter 1, RDO Installation, installed Open vSwitch (OVS), and configured the Neutron Open vSwitch plugin for you. Open vSwitch is virtual networking software that allows you to create virtual switches on your nodes and ties the virtual switches on your nodes together by way of a configured transport. A configured transport is a defined method for the virtual switches to talk to each other. As traffic comes out of an instance, it travels through these connections between each of the virtual switches. There are three common methods for configuring OVS, which are explained here.

VLAN

Virtual Local Area Network (VLAN) is the most complex to set up. This is because the hardware switch that carries your traffic must be configured properly to carry the VLAN tagging that is assigned to the traffic. When the network traffic is traveling through one of the virtual networks, it is assigned a VLAN tag, which is basically a...

Creating a network


Now that we've explored some of the intricacies of what's happening under the hood, let's actually use Neutron to create a network by performing the following steps:

  1. Log in to your control node and source your overcloudrc file; use the non-administrative user for this. The command to create a virtual network is as follows:

    undercloud# openstack network create internal
    undercloud# neutron subnet-create internal 192.168.37.0/24
    

    That is it. You just created a virtual network. I know that for the length of the introduction we just covered, that was pretty anticlimactic. Note that when you create the subnet, you are adding it to the network named internal that you just created. It is important to note the difference in the two commands. The first uses the command structure that has been used thus far. The second one calls a command named after the component being configured, Neutron. OpenStack has been going through a slow transition from having a command-line client for each...

Web interface management


The web interface lets you create the network and subnet in the same dialog. Perform the following steps to obtain a network and a router:

  1. Log in as your non-administrative user, select the Network menu, select the Networks submenu, and click on the Create Network button in the top-right corner, as shown here:

  2. After you have filled in the network name, go to the next dialog screen and fill in the subnet information, as shown in the following screenshot:

  3. In the final dialog box, add the DNS entries, as shown in the following screenshot:

  4. When you've completed filling in the dialog, you'll end up with a network and a subnet that's associated with the network, as shown in the following screenshot:

  5. Next, create the router. Select Routers from the Network menu, and click on Create Router in the top-right corner of the page, as shown in the following screenshot:

  6. Once you've filled in the router name, click on Create Router, as shown in the following screenshot:

  7. Next, click on...

External network access


Every project will have at least one network to launch instances on, which will be built as we have just built a network. Whenever a new project is created, the steps that have just been performed will need to be performed for that new project. All projects will share a network that provides external access to the outside world. Let's work through creating this external network.

Preparing a network

Earlier, we discussed how Neutron is an API layer that manages virtual networking resources. The preparation for external network access will be different for different Neutron plugins. Talk to your networking vendor for your specific implementation. In general, what is being accomplished by this preparation is the connection of the networking node to a set of externally routable IP addresses. External just means external to, or outside of, the OpenStack cluster. These may be a pool within your company's 10.0.0.0/8 network or a pool of IPs public to the Internet. The project...

Web interface external network setup


Creating the external network can be completed through the web interface by performing the following steps:

  1. Start by logging in to the web interface as the Admin user to create the external network and subnet. Select the Networks submenu from the Admin menu and click on Create Network. Give the network a name, flag it as external and make sure that it is assigned to the service project. The default provider type configured by Triple-O is VXLAN. On the command line, this was taken care of for you; here, select VXLAN for the Provider Network Type and set the Segmentation ID to 1. This step is encapsulated in the following screenshot:

  2. Once you have created the network, select the network by its name from the list, as shown in the following screenshot, and click on Create Subnet:

  3. Fill out the form with the network information for the external pool of IP addresses. Make sure the correct gateway is specified. The following screenshot captures this step:

  4. Move to...

Summary


In this chapter, we looked at creating networks, subnets, and routers, and looked through the OpenVSwitch configuration used for this to work. Using these resources, the necessary virtual networking fabric has been created for an instance to be launched on. Now that we have created virtual networks for the instances to attach to, let's get into launching instances. In the next chapter, we will do what we have been working towards – launch an instance. We will use Nova to launch an instance from the image that was imported and attach it to these virtual networking resources.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
OpenStack Essentials. - Second Edition
Published in: Aug 2016Publisher: PacktISBN-13: 9781786462664
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Dan Radez

Dan Radez joined the OpenStack community in 2012 in an operator role. His experience is focused on installing, maintaining, and integrating OpenStack clusters. He has been given the opportunity to internationally present OpenStack content to a range of audiences of varying expertise. In January 2015, Dan joined the OPNFV community and has been working to integrate RDO Manager with SDN controllers and the networking features necessary for NFV. Dan's experience includes web application programming, systems release engineering, and virtualization product development. Most of these roles have had an open source community focus to them. In his spare time, Dan enjoys spending time with his wife and three boys, training for and racing triathlons, and tinkering with electronics projects.
Read more about Dan Radez