Book Image

OpenStack Networking Cookbook

Book Image

OpenStack Networking Cookbook

Overview of this book

Table of Contents (19 chapters)
OpenStack Networking Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Subnet and Network using Horizon


Network and Subnet are the fundamental networking entities in OpenStack. Using these two entities, virtual machines or instances are provided with Network connectivity. The creation of a Subnet and Network go hand in hand. Both OpenStack CLI and Horizon support the creation of a Subnet and Network. This recipe explains how to create a Subnet and Network using Horizon.

Getting ready

In order to create a Network and Subnet, you will need the following information, minimally:

  • The Network name

  • The Subnet name

  • The IP address range for the Subnet—the range should be in CIDR format

How to do it…

  1. Log in to the OpenStack Horizon dashboard.

  2. In the left navigation menu, click on Project | Network | Networks.

  3. Now click on the + Create Network button. The following screen will be displayed:

  4. Enter the Network Name and click Next.

  5. The next screen lets you create the Subnet that will be part of the Network.

  6. Enter the Subnet Name and the address range in CIDR format, as shown in the following screenshot:

  7. Click Next. In the next screen, all the fields are optional, so click on Create.

  8. Once the Network and Subnet are created successfully, the entry will appear in the Networks table, as shown here:

The preceding steps covered the most commonly used workflow to create a Network and Subnet using Horizon.

How it works…

The Network and Subnet entities represent two basic Networking functionalities. A Network defines the Layer 2 (L2) boundary for all the instances that are associated with it. All the virtual machines in a Network are a part of the same L2 broadcast domain. The Subnet, on the other hand, is the range of IP addresses that are assigned to the virtual machines on the associated Network. OpenStack Neutron configures the DHCP server with this IP address range and it starts one DHCP server instance per Network, by default. OpenStack Neutron also allocates one IP to act as the gateway IP unless the user provides a specific IP address for the gateway.

There's more…

As you can see from the UI, it is possible to create a Network without a Subnet. You can choose between the IPv4 or IPv6 addressing schemes. The Subnet Details section allows operators to enable or disable DHCP for the Network. Optionally, you can also specify the DNS servers and IP pools.