OpenStack Networking Essentials - James Denton - E-Book

OpenStack Networking Essentials E-Book

James Denton

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Build and manage networks in OpenStack using Neutron

About This Book

  • Deploy an all-in-one cloud based on OpenStack Liberty (2015.2) using RDO
  • Learn the fundamentals of the Neutron API including networks, subnets, and ports, and how to manage these resources in the cloud
  • Build simple virtual network infrastructures in the cloud

Who This Book Is For

The book is for those who are new to OpenStack and Neutron who want to learn the cloud networking fundamentals and get started with OpenStack networking. Prior networking experience along with a virtual or physical server is recommended to follow along with the concepts demonstrated in the book.

What You Will Learn

  • Install the latest Liberty (2015.2) release of OpenStack using RDO in VirtualBox
  • Discover the basics of the Neutron API, including networks, subnets, and ports
  • Interact with Neutron using the CLI and Horizon dashboard
  • Create networks and subnets that provide connectivity to instances
  • Implement software routers that connect networks and provide network address translation
  • Secure instances using Neutron's security group functionality

In Detail

The OpenStack Networking API offers users the ability to create and manage both basic and complex network architectures that blend the virtual and physical network infrastructure.

This book kicks off by describing various components of Openstack Neutron and installing Ubuntu OpenStack based on Canonical's process. Further on, you will use various methods to interface with Neutron to create and manage network resources. You will also get to grips with the relationship between ports, networks, and subnets through diagrams and explanations, and see how the logical components are implemented via plugins and agents.

Moving forward, you will learn how virtual switches are implemented and how to build Neutron routers. You will also configure networks, subnets, and routers to provide connectivity to instances using simple examples. At the end, you will configure and manage security groups, and will observe how these rules translate to iptables rules on the host machines.

By the end of the book, you will be able to build basic network architectures using Neutron networks and routers in no time.

Style and approach

An easy-to-follow guide that covers the networking features of OpenStack and the core Neutron API components providing a solid foundation to deploy networks and instances.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 145

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

OpenStack Networking Essentials
Credits
About the Author
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. OpenStack Networking Components – an Overview
Features of OpenStack Networking
Switching
Routing
Advanced networking features
Load balancing
Firewalling
Virtual private networks
The OpenStack architecture
A reference architecture
Implementing the network
Plugins and drivers
Neutron agents
The DHCP agent
The metadata agent
The network plugin agent
Summary
2. Installing OpenStack Using RDO
System requirements
The initial network configuration
Example networks
Interface configuration
Connect to the host
Initial steps
Permissions
Install network utilities
Set the hostname
Install Network Time Protocol (NTP)
Disable NetworkManager
Upgrade the system
Install RDO using Packstack
Download RDO
Configure the answer file
Install RDO
Verify connectivity to OpenStack
Verify connectivity to the dashboard
Additional installation tasks
Create a security group rule
Create a demo project and user
Configure the keystone_demo file
Upload an image to Glance
Summary
3. Neutron API Basics
Networks
Network attributes
Provider attributes
Additional attributes
Subnets
Ports
The Neutron workflow
Booting an instance
How the logical model is implemented
Deleting an instance
Summary
4. Interfacing with Neutron
Using the Horizon dashboard
Managing resources within a project
Creating networks within a project
Viewing the network topology
Managing resources as an administrator
Using the Neutron client
Creating and listing networks
Creating a network
Creating a subnet
Summary
5. Switching
The basics of switching in OpenStack
Using Linux bridges
Using Open vSwitch
Network types
Local networks
Flat networks
VLAN networks
VXLAN networks
GRE networks
A look at our environment
Getting a closer look
Summary
6. Routing
The basics of routing in Neutron
Network namespaces
Connectivity through a router
Outbound connectivity
Inbound connectivity
Types of routers
Standalone routers
Highly available routers
Distributed virtual routers
Managing routers in the dashboard
Creating routers within a project
Viewing the network topology
Managing routers as an administrator
Managing routers with the Neutron client
Creating and listing routers
Creating a router
Adding an interface
Listing router interfaces
Examining the routers
Summary
7. Building Networks and Routers
Using provider networks
Creating a provider network
Booting an instance
Accessing the instance
Using a Neutron router
External provider networks
Attaching the router to an external provider network
Booting an instance
Testing connectivity
Observing SNAT behavior
Assigning a floating IP
Testing connectivity via floating IP
Multiple routers
Advanced networking
Summary
8. Security Group Fundamentals
Security groups in OpenStack
Using security groups
The default security group
Managing security groups
Using CIDR to control traffic
Applying security groups to instances and ports
Working with security groups in the dashboard
Creating a security group
Managing security group rules
Applying security groups to instances
Caveats
Port security
Allowed address pairs
Disabling port security
Summary
A. Configuring VirtualBox
Configuring VirtualBox networking
Configuring host-only networks
Creating a virtual machine
Configuring a virtual machine
Installing the CentOS operating system
Attaching the ISO to the virtual machine
Starting the virtual machine
Configuring virtual machine networking
Accessing the virtual machine
Configuring network interfaces
Accessing a virtual machine over SSH
Index

OpenStack Networking Essentials

OpenStack Networking Essentials

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: April 2016

Production reference: 1130416

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78528-327-7

www.packtpub.com

Credits

Author

James Denton

Reviewer

Cody Bunch

Commissioning Editor

Kartikey Pandey

Acquisition Editor

Rreshma Raman

Content Development Editor

Mehvash Fatima

Technical Editor

Vishal Mewada

Copy Editor

Madhusudan Uchil

Project Coordinator

Shweta H Birwatkar

Proofreader

Safis Editing

Indexer

Hemangini Bari

Graphics

Kirk D'Penha

Production Coordinator

Shantanu N. Zagade

Cover Work

Shantanu N. Zagade

About the Author

James Denton has more than 15 years of experience in system administration and networking and has been deploying, operating, and maintaining OpenStack clouds since late 2012. He is a Principal Architect at Rackspace, and prior to joining the Rackspace Private Cloud team, he spent 5 years as an enterprise network security engineer. James has a bachelor's degree in business management, with a focus on computer information systems, from Texas State University in San Marcos, Texas. In his spare time, James enjoys spending time with his wife and son and camping in the Texas hill country.

www.PacktPub.com

eBooks, discount offers, and more

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Preface

OpenStack is an open source cloud operating system designed to control pools of compute, storage, and networking resources. This powerful system fosters rapid innovation while decreasing operational and capital costs. OpenStack has exploded in popularity in recent years, thanks to its features, flexibility, and overall maturity.

In this book, we will explore the networking component of OpenStack, known as Neutron. Neutron provides an API for users to build virtual network resources such as switches, routers, load balancers, and firewalls. We will walk through the installation of OpenStack using RDO and will look at the core components of the API, made up of networks, subnets, and ports. By the end of the book, you will have harnessed the power of OpenStack and Neutron to create and access virtual network resources of your own.

What this book covers

Chapter 1, OpenStack Networking Components – an Overview, provides an introduction to OpenStack Networking features, components, and the basic physical architectures required to support an OpenStack cloud.

Chapter 2, Installing OpenStack Using RDO, provides instructions for installing the Liberty release of OpenStack using RDO on the CentOS 7.1 operating system.

Chapter 3, Neutron API Basics, looks at the core components of the Neutron API, made up of networks, subnets, and ports, and how they're used to construct virtual networks.

Chapter 4, Interfacing with Neutron, explores the use of the Horizon dashboard and the Neutron command-line client to interface with the Neutron API.

Chapter 5, Switching, looks at how Neutron constructs and implements the virtual network infrastructure to enable the flow of traffic across the cloud.

Chapter 6, Routing, discusses how Neutron implements virtual routers that provide routing between Neutron networks and the outside world using source network address translation and floating IPs.

Chapter 7, Building Networks and Routers, covers basic virtual network architectures and showcases the traffic flow from client workstations to virtual machine instances via fixed and floating IPs.

Chapter 8, Security Group Fundamentals, examines the use of Neutron security groups to secure instance traffic at the virtual switch port and walks you through creating and managing security groups and associated rules.

Appendix, Configuring VirtualBox, is meant to assist with the setup of a virtual environment using VirtualBox so that many of the examples throughout the book can be followed.

What you need for this book

For this book, the following is required:

Operating system:
CentOS Linux 7.1
Software:
VirtualBox 5.0 or higherRDO (Liberty release)

This book assumes a beginner-to-moderate level of networking experience and experience with Linux operating systems. While this book will walk you through a basic installation of OpenStack using RDO, little time will be spent on services other than Neutron as well as any configuration of OpenStack outside of what's available via the API. It will be helpful for you have a basic understanding of OpenStack and its components prior to reading this book.

Internet connectivity is required to install OpenStack packages. An all-in-one OpenStack deployment will be performed on a single virtual machine within VirtualBox. CentOS must be installed prior to installing RDO. Alternative virtualization platforms such as VMware, or physical hardware, are optional.

Major OpenStack releases occur every 6 months, and after the N or O release, Liberty repositories may no longer be available. In the event that the OpenStack installation procedure documented in this book no longer functions properly, refer to the installation guide at http://docs.openstack.org/ or https://www.rdoproject.org/ for instructions on installing the latest version of OpenStack.

Who this book is for

The book is for those who are new to OpenStack and Neutron and want to learn OpenStack networking fundamentals. It introduces the reader to OpenStack networking and related concepts and technologies. Some prior networking and systems administration experience is recommended. A virtual or physical server is recommended to follow along with the concepts demonstrated in the book.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "In a reference implementation, a Neutron DHCP agent runs on one or more infrastructure nodes and spawns a dnsmasq process for each network where DHCP is enabled."

A block of code is set as follows:

[general] # Generic config options CONFIG_UNSUPPORTED=n CONFIG_DEBUG_MODE=n CONFIG_PROVISION_DEMO=n

Any command-line input or output is written as follows:

$ sudo ifdown enp0s3; sudo ifdown enp0s9;$ sudo ifup enp0s3; sudo ifup enp0s9;

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "In addition, controller nodes run the database and messaging servers and are often the point of management of the cloud via the Horizon dashboard."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

Log in or register to our website using your e-mail address and password.Hover the mouse pointer on the SUPPORT tab at the top.Click on Code Downloads & Errata.Enter the name of the book in the Search box.Select the book for which you're looking to download the code files.Choose from the drop-down menu where you purchased this book from.Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR / 7-Zip for WindowsZipeg / iZip / UnRarX for Mac7-Zip / PeaZip for Linux

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/OpenStackNetworkingEssentials_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.

Chapter 1. OpenStack Networking Components – an Overview

OpenStack Networking, otherwise known as Neutron, is an API-driven system for managing virtual and physical network resources in an OpenStack cloud. The job of Neutron is simple: it is meant to provide Networking as a Service (NaaS) to cloud environments. Users can leverage the Neutron API to build network architectures in the cloud that define the availability of their applications. Neutron strips away from the user much of the complexity of building rich network architectures in the cloud. In this book, you will learn about some of the basic networking features offered by Neutron, and you will build a small environment that will expose you to various methods of interacting with the Neutron API to build simple network configurations.

Features of OpenStack Networking

Many cloud environments rely on virtual compute technologies made available by hypervisors such as Kernel-based Virtual Machine (KVM), Xen, and Hyper-V, among many others. Neutron's core purpose is to connect virtual machine instances to a virtual network spanning the cloud and connect the virtual network to the physical network infrastructure. The containerization of applications made possible by Linux Containers (LXC), Docker, and other container technologies means that Neutron should also be responsible for providing network connectivity and features to containers in the future.

Neutron relies on the use of its pluggable and extensible architecture to construct and configure virtual and physical network resources. Many physical devices, such as switches, routers, firewalls, and load balancers, are implemented in software in reference implementations. A reference implementation is one that relies on the use of plugins, drivers, and agents made available for free by the Neutron community. A common reference plugin is the Modular Layer 2 (ML2) plugin, which is used to define a logical networking framework that agents can use to construct the virtual network. Common reference agents include the Open vSwitch (OVS) and Linux bridge agents, which are used to construct their respective virtual switching infrastructures based on networks that users have defined with the Neutron API.

Switching

In a reference implementation, Neutron relies on virtual bridges and switches to connect virtual instances, containers, and other network resources to the network. Neutron includes support for standard Linux bridges and virtual switches created with OVS. OVS is an open source virtual switch that supports dozens of technologies and protocols, including NetFlow, Switch port Analyzer (SPAN), Remote SPAN (RSPAN), Link Aggregation Control Protocol (LACP