Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenStack Networking Cookbook

You're reading from   OpenStack Networking Cookbook Harness the power of OpenStack Networking for public and private clouds using 90 hands-on recipes

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785286100
Length 282 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Sriram Subramanian Sriram Subramanian
Author Profile Icon Sriram Subramanian
Sriram Subramanian
Chandan Dutta Chandan Dutta
Author Profile Icon Chandan Dutta
Chandan Dutta
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with OpenStack Networking 2. Using Open vSwitch for VLAN-Based Networks FREE CHAPTER 3. Exploring Other Network Types in Neutron 4. Exploring Overlay Networks with Neutron 5. Managing IP Addresses in Neutron 6. Using Routing Services in Neutron 7. Using Neutron Security and Firewall Services 8. Using HAProxy for Load Balancing 9. Monitoring OpenStack Networks 10. Writing Your Own Neutron ML2 Mechanism Driver 11. Troubleshooting Tips for Neutron 12. Advanced Topics Index

Creating a Subnet using OpenStack CLI

Similar to the CLI commands to create a Network, the next recipe will explore the CLI command to create a Subnet. The key aspect of the CLI commands for Subnet creation is that a Network Name is a mandatory attribute.

Getting ready

You will need the following information to get started:

  • The login credentials for SSH to a node where the Neutron client packages are installed
  • A shell RC file that initializes the environment variables for CLI

How to do it…

The next set of steps will show you how to use Neutron CLI to create a Subnet:

  1. Using the appropriate credentials, SSH into the OpenStack node where the Neutron client software packages are installed.
  2. Source the shell RC file to initialize the environment variables required for the CLI commands as seen in the previous recipe.
  3. The command to create a Subnet is neutron subnet-create and the mandatory arguments are the Network name and IP address range in the CIDR format. However, it is a good practice to specify a name for the Subnet. For simplicity, we will choose the Network, CookbookNetwork2, that was created earlier because it does not have any associated Subnet yet:
    How to do it…
  4. Now, when we execute the neutron net-list command, we will see that CookbookNetwork2 has an associated Subnet that we just created:
    How to do it…
  5. Users can view the list of Subnets using the neutron subnet-list command:
    How to do it…

How it works…

When the user executes the neutron subnet-create command, Neutron creates a Subnet with the specified IP address range and other parameters. Neutron also associates the Subnet with the specified Network.

lock icon The rest of the chapter is locked
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.
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 $19.99/month. Cancel anytime
Banner background image