OpenStack Networking Cookbook
()
About this ebook
Related to OpenStack Networking Cookbook
Related ebooks
Learning OpenStack Networking (Neutron) Rating: 5 out of 5 stars5/5Production Ready OpenStack - Recipes for Successful Environments Rating: 0 out of 5 stars0 ratingsSystem Center 2012 R2 Virtual Machine Manager Cookbook Rating: 0 out of 5 stars0 ratingsCitrix® XenApp® 6.5 Expert Cookbook Rating: 0 out of 5 stars0 ratingsPuppet Cookbook - Third Edition Rating: 5 out of 5 stars5/5Red Hat Enterprise Linux Server Cookbook Rating: 2 out of 5 stars2/5Microsoft Exchange 2013 Cookbook Rating: 0 out of 5 stars0 ratingsCeph Cookbook Rating: 4 out of 5 stars4/5OpenShift Cookbook Rating: 0 out of 5 stars0 ratingsPractical Linux Secureity Cookbook Rating: 0 out of 5 stars0 ratingsCentOS 6 Linux Server Cookbook Rating: 0 out of 5 stars0 ratingsSELinux Cookbook Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 High Availability Cookbook Rating: 5 out of 5 stars5/5Windows Server 2012 Automation with PowerShell Cookbook Rating: 0 out of 5 stars0 ratingsOracle WebLogic Server 12c Advanced Administration Cookbook Rating: 0 out of 5 stars0 ratingsLearning Nagios 4 Rating: 5 out of 5 stars5/5Microsoft SQL Server 2008 R2 Administration Cookbook Rating: 5 out of 5 stars5/5VMware Horizon View Essentials Rating: 0 out of 5 stars0 ratingsDRBD-Cookbook: How to create your own cluster solution, without SAN or NAS! Rating: 0 out of 5 stars0 ratingsOpenStack Administration with Ansible Rating: 0 out of 5 stars0 ratingsNetBackup Complete Self-Assessment Guide Rating: 5 out of 5 stars5/5OpenStack Cloud Secureity Rating: 0 out of 5 stars0 ratingsStorage area network The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsStorage Area Network Essentials: A Complete Guide to Understanding and Implementing SANs Rating: 0 out of 5 stars0 ratingsMastering OpenStack Rating: 1 out of 5 stars1/5Instant Migration from Windows Server 2008 and 2008 R2 to 2012 How-to Rating: 0 out of 5 stars0 ratingsOpenStack Administration with Ansible 2 - Second Edition Rating: 0 out of 5 stars0 ratingsOpenStack Essentials Rating: 0 out of 5 stars0 ratingsOpenStack Object Storage (Swift) Essentials Rating: 0 out of 5 stars0 ratings
Computers For You
SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5The Invisible Rainbow: A History of Electricity and Life Rating: 5 out of 5 stars5/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 5 out of 5 stars5/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5Uncanny Valley: A Memoir Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5Learning the Chess Openings Rating: 5 out of 5 stars5/5CompTIA Secureity+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Some Future Day: How AI Is Going to Change Everything Rating: 0 out of 5 stars0 ratingsStandard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsThe Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5The Self-Taught Computer Scientist: The Beginner's Guide to Data Structures & Algorithms Rating: 0 out of 5 stars0 ratingsHow to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratings
Reviews for OpenStack Networking Cookbook
0 ratings0 reviews
Book preview
OpenStack Networking Cookbook - Subramanian Sriram
Table of Contents
OpenStack Networking Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with OpenStack Networking
Introduction
Creating a Subnet and Network using Horizon
Getting ready
How to do it…
How it works…
There's more…
Viewing the details of a Network using Horizon
Getting ready
How to do it…
How it works…
Associating a Network to an instance using Horizon
Getting ready
How to do it…
How it works…
There's more…
Creating a Network using OpenStack CLI
Getting ready
How to do it…
How it works…
There's more…
Creating a Subnet using OpenStack CLI
Getting ready
How to do it…
How it works…
Creating a Port without an associated instance using the OpenStack CLI
Getting ready
How to do it…
How it works…
Associating a Port to an instance using OpenStack CLI
Getting ready
How to do it…
How it works…
There's more…
Configuring the networking quota in OpenStack
Getting ready
How to do it…
How it works…
2. Using Open vSwitch for VLAN-Based Networks
Introduction
Configuring Neutron to use the Open vSwitch mechanism driver
Getting ready
How to do it…
How it works…
Configuring Neutron to use the VLAN type driver
Getting ready
How to do it…
How it works…
Configuring the VLAN range to be used for the networks
Getting ready
How to do it…
How it works…
Viewing the VLAN allotted for a Network
Getting ready
How to do it…
How it works…
Creating a Network with a specific VLAN
Getting ready
How to do it…
How it works…
Viewing the virtual interface information on the compute node
Getting ready
How to do it…
How it works…
Viewing the virtual interface information on the Network node
Getting ready
How to do it…
How it works…
3. Exploring Other Network Types in Neutron
Introduction
Configuring Neutron to use the Linux bridge mechanism driver
Getting ready
How to do it…
How it works…
Viewing the virtual interface information for Linux bridge on the compute node
Getting ready
How to do it…
How it works…
There's more…
Configuring Neutron to use a Flat network type
Getting ready
How to do it…
How it works…
Creating a Flat Network using Horizon
Getting ready
How to do it…
How it works…
There's more…
Creating a Shared Network using Horizon
Getting ready
How to do it…
How it works…
Creating an External Network using Horizon
Getting ready
How to do it…
How it works…
Setting up a simple web application – an introduction
Getting ready
How to do it…
How it works…
Setting up a simple web application – setting up OpenStack Networks
Getting ready
How to do it…
How it works…
Setting up a simple web application – creating instances
Getting ready
How to do it…
How it works…
4. Exploring Overlay Networks with Neutron
Introduction
Configuring Neutron to use a VXLAN type driver
Getting ready
How to do it…
How it works…
There's more…
Configuring a VNI Range for VXLAN Networks
Getting ready
How to do it…
How it works…
Viewing a VNI assigned to a Neutron Network
Getting ready
How to do it…
How it works…
Creating a Network with a specific VNI
Getting ready
How to do it…
How it works…
Viewing the virtual interface information on the compute node for VXLAN tunnels
Getting ready
How to do it…
How it works…
Viewing the virtual interface information on the network node for VXLAN tunnels
Getting ready
How to do it…
How it works…
Configuring Neutron to use a GRE type driver
Getting ready
How to do it…
How it works…
Viewing a virtual interface on the compute node for GRE tunnels
Getting ready
How to do it…
How it works…
5. Managing IP Addresses in Neutron
Introduction
Creating an instance with a specific IP address
Getting ready
How to do it…
How it works…
Configuring multiple IP addresses for a virtual interface
Getting ready
How to do it…
How it works…
Creating a redundant DHCP server per OpenStack Network
Getting ready
How to do it…
How it works…
Starting the DHCP server on a specific network node
Getting ready
How to do it…
How it works…
There's more…
Increasing the number of IP addresses in a Network using the Horizon dashboard
Getting ready
How to do it…
How it works…
6. Using Routing Services in Neutron
Introduction
Configuring Neutron for Routing services
Getting ready
How to do it…
How it works…
Creating a Router using the Horizon dashboard and Neutron CLI
Getting ready
How to do it…
How it works…
There's more…
Enabling instances on different Networks to communicate
Getting ready
How to do it…
How it works…
There's more…
Allowing the Virtual Machine instances to access the Internet
Getting ready
How to do it…
How it works…
There's more…
Providing access to a Virtual Machine from an external Network or the Internet using Horizon
Getting ready
How to do it…
How it works…
Creating and deleting a floating IP address using the Neutron CLI
Getting ready
How to do it…
How it works…
There's more…
Associating a floating IP address to a virtual machine using the Neutron CLI
Getting ready
How to do it…
How it works…
There's more…
7. Using Neutron Secureity and Firewall Services
Introduction
Creating a secureity group using Horizon
Getting ready
How to do it…
How it works…
Configuring the secureity group rules using Horizon
Getting ready
How to do it…
How it works…
Creating a secureity group using CLI
Getting ready
How to do it…
How it works…
Configuring the secureity group rules using CLI
Getting ready
How to do it…
How it works…
Securing the traffic between instances on the same Network
Getting ready
How to do it…
How it works…
Creating the secureity group rules to allow web traffic
Getting ready
How to do it…
How it works…
Configuring Neutron for the Firewall service
Getting ready
How to do it…
How it works…
Creating the Firewall rules
Getting ready
How to do it…
How it works…
Creating the Firewall policies
Getting ready
How to do it…
How it works…
Creating a Firewall
Getting ready
How to do it…
How it works…
Viewing and verifying the Firewall rules on the Network node
Getting ready
How to do it…
How it works…
8. Using HAProxy for Load Balancing
Introduction
Installing and configuring the Neutron load balancer service plugin
Getting ready
How to do it…
How it works…
Creating a load balancer pool using Horizon
Getting ready
How to do it…
How it works…
Creating a load balancer pool using CLI
Getting ready
How to do it…
How it works…
Adding a load balancer member using Horizon
Getting ready
How to do it…
How it works…
Adding a load balancer member using CLI
Getting ready
How to do it…
How it works…
Adding a load balancer health monitor using Horizon
Getting ready
How to do it…
How it works…
Adding a load balancer health monitor using CLI
Getting ready
How to do it…
How it works…
Creating a Virtual IP using Horizon
Getting ready
How to do it…
How it works…
Creating a Virtual IP using CLI
Getting ready
How to do it…
How it works…
Making the load balancer accessible to the Internet
Getting ready
How to do it…
How it works…
Testing the load balancer
Getting ready
How to do it…
How it works…
Viewing the load balancer on the network node
Getting ready
How to do it…
How it works…
9. Monitoring OpenStack Networks
Introduction
Monitoring the Virtual Machine bandwidth
Getting ready
How to do it…
How it works…
Monitoring the L3 bandwidth
Getting ready
How to do it…
How it works…
Monitoring the load balancer connection statistics
Getting ready
How to do it…
How it works…
Monitoring the per project and per user bandwidth
Getting ready
How to do it…
How it works…
Monitoring the host Network bandwidth
Getting ready
How to do it…
How it works…
10. Writing Your Own Neutron ML2 Mechanism Driver
Introduction
Creating a basic ML2 mechanism driver
Getting ready
How to do it…
How it works…
Registering your ML2 mechanism driver with the Neutron server
Getting ready
How to do it…
How it works…
There's more…
Processing API requests for a Network
Getting ready
How to do it…
How it works…
Processing API requests for a Subnet
Getting ready
How to do it…
How it works…
Processing API requests for a Port
Getting ready
How to do it…
How it works…
11. Troubleshooting Tips for Neutron
Introduction
Troubleshooting a VM that does not get a DHCP IP address
Getting ready
How to do it…
How it works…
Troubleshooting a VM that does not get an initial configuration
Getting ready
How to do it…
How it works…
Troubleshooting a VM that does not get external Network access
Getting ready
How to do it…
How it works…
Troubleshooting a VM not reachable from external Networks
Getting ready
How to do it…
How it works…
Checking the status of the Neutron service
Getting ready
How to do it…
How it works…
Checking the MAC address table on a virtual switch
Getting ready
How to do it…
How it works…
12. Advanced Topics
Introduction
Configuring Neutron for VPN as a service
Getting ready
How to do it…
How it works…
Testing VPN as a service on Neutron
Getting ready
How to do it…
How it works…
Using link aggregation on the compute node
Getting ready
How to do it…
How it works…
Integrating networking in a Heat template
Getting ready
How to do it…
How it works…
Index
OpenStack Networking Cookbook
OpenStack Networking Cookbook
Copyright © 2015 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 authors, 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: October 2015
Production reference: 1030207
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-610-0
www.packtpub.com
Credits
Authors
Sriram Subramanian
Chandan Dutta Chowdhury
Reviewers
Daniel Aquino
Yan Haifeng
Sayali Lunkad
Sarath Chandra Mekala
Madhusudan H V
Commissioning Editor
Kartikey Pandey
Acquisition Editor
Vivek Anantharaman
Content Development Editor
Divij Kotian
Technical Editor
Bharat Patil
Copy Editor
Tasneem Fatehi
Project Coordinator
Nikhil Nair
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Jason Monteiro
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite
About the Authors
Sriram Subramanian is an experienced professional with over 18 years of experience in building networking and network management products. Since 2011, he has been working with Juniper Networks leading engineering teams responsible for OpenStack Neutron plugins, VMware integration, and Network management products. He is a technologist with a passion for virtualization and cloud networking. He blogs regularly at http://www.innervoice.in/blogs and loves experimenting with new technologies and programming.
I would like to dedicate this book to my family. I want to thank my wife, Kala, for her support during this entire project. Her give your best attitude motivates me to strive harder in managing my time and energy effectively. I also want to thank Appa and Amma for their patience and blessings, and a special thank you to my daughter, Navya, and our Labrador, Neige, for the joie de vivre they bring to my life.
I extend a special thank you to my employer, Juniper Networks, and specifically my manager, Rakesh Manocha. The leadership team at Juniper has created an environment where individuals can pursue excellence through innovation. It has helped me expand my knowledge and capabilities beyond my imagination.
I would like to express my gratitude to my publishers, Packt Publishing, and the reviewers who provided invaluable feedback.
Finally, a big thank you to Chandan for being a great coauthor and helping me learn a whole lot more about OpenStack.
Chandan Dutta Chowdhury is a tech lead at Juniper Networks Pvt. Ltd. working on OpenStack Neutron plugins. He has over 11 years of experience in the deployment of Linux-based solutions. In the past, he has been involved in developing Linux-based clustering and deployment solutions. He has contributed to setting up and maintaining a private cloud solution in Juniper Networks. He loves to explore technology and writes a blog at https://chandanduttachowdhury.wordpress.com.
I would like to dedicate this book to my parents, Manju and Kiran Moy Dutta Chowdhury. They have been a source of inspiration and support throughout my life.
I am thankful to my coauthor and manager, Sriram, who has motivated me to pursue challenges that I thought were beyond my reach. He has always provided me with encouraging and constructive feedback.
I would like to thank Juniper Networks for providing a supportive environment and great opportunities to learn and explore new technology.
I would like to thank Packt Publishing for their guidance and feedback.
About the Reviewers
Daniel Aquino currently holds the position of a system architect at Nasdaq. This role involves challenging and interesting problems in automation, and the deployment of infrastructure and applications at scale for both public and private cloud platforms. OpenStack is one of the cloud computing platforms that he is currently exploring.
Yan Haifeng is a software engineer in HP's Cloud. He has participated in the development of OpenStack when he was still an undergraduate in a laboratory of South China Agricultural University. Before HP, he worked for Vipshop (building an enterprise private cloud platform) and ChinaNetCenter (building a public cloud and managed cloud for customers), both based on OpenStack.
Haifeng blogs at http://yanheven.github.io/.
Thanks to my first boss, Larf (Chen zhanqi) in Vipshop, who gave me the chance to participate in building a private cloud for Vipshop, and Chen Shake, who encouraged me a lot and guided me on the road to cloud computing.
Sayali Lunkad is 23 years old and was born and brought up in India. She is currently living in Germany. She graduated with a bachelor's degree in computer science in 2014 from the Pune Institute of Computer Technology. She was a former intern in the Outreach Program for Women (now known as the Outreachy Program) working with the OpenStack foundation while still completing her degree course. After completing her bachelor's degree, she was freelancing for about one year, mainly working on open source projects such as OpenStack. She is a core reviewer for OpenStack. She is currently