Bookmark this page

Creating Project Networks and Subnetworks

Objectives

After completing this section, you should be able to create the network configuration and IP addressing for launching tenant instances.

Describing OpenStack Tenant Networks

Tenant networks are the most common network type that cloud users interact with. They are also self-service, meaning that cloud users create the network themselves. As a domain operator, you advise cloud users about configuring IP addressing, name resolution, and other services for each network type they use with their application deployments.

Cloud users are not expected to be familiar with network design, and so tenant networks were designed to be isolated. Overlapping IP address ranges for tenant networks are allowed within the OpenStack cluster, and DHCP is also configured independently.

You can implement a typical 3-tier application architecture by creating a network for each tier, connecting the networks to routers, and configuring security group rules to allow the required access.

Use the openstack network create command to create a new network.

[user@demo ~(user)]$ openstack network create demonet

Use the openstack network set command to modify an existing network.

[user@demo ~(user)]$ openstack network set \
> --dns-domain example.com demonet

Managing OpenStack Subnets

A subnet in OpenStack is a collection of IP addressing configurations, and must be linked to a network. You can specify the subnet range either as a whole network or as a subset of addresses. In both cases, an IP address is reserved for the subnet gateway.

By default, subnets are created with DHCP enabled. With DHCP enabled, the entire subnet range is available for instances. You can, however, specify an allocation pool to restrict the available address range. You can also create subnets without DHCP, which means that instances must have an IP address assigned manually. OVN now provides native DHCP support, which removes the requirement for the DHCP agent previously provided by the OpenStack Networking service.

You can specify a DNS name server independently for each subnet, and it is configured on each instance deployed on the subnet as its default name server.

Use the openstack subnet create command to create a new subnet. The subnet must be associated with an existing network using the --network option.

[user@demo ~(user)]$ openstack subnet create \
> --network demonet demosubnet1

Configure the range in CIDR format using the --subnet-range option. Configure the DNS name server using the --dns-nameserver option.

[user@demo ~(user)]$ openstack subnet create \
> --network demonet \
> --subnet-range 192.168.1.0/24 \
> --dns-nameserver 10.0.0.254 demosubnet1

Use the openstack subnet set command to modify an existing subnet. Disable DHCP for a subnet using the --no-dhcp option.

[user@demo ~(user)]$ openstack subnet set \
> --no-dhcp demonet

Managing Networks and Subnets in the Dashboard

Using the OpenStack Dashboard, navigate to ProjectNetworkNetworks to manage networks and subnets.

Click Create Network, and then in the Network section, enter the network name in the Network Name field. Verify that the Create Subnet check box is selected, and then click Next.

In the Subnet section, complete the Subnet Name and Network Address fields, and then click Next.

In the Subnet Details section, complete the DNS Name Servers field, and then click Create to create both the network and subnet.

 

References

Additional information is available in the OpenStack Networking Concepts section of the Networking Guide for Red Hat OpenStack Platform at https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/networking_guide/index#sec-networking-concepts

Revision: cl110-16.1-4c76154