After completing this section, you should be able to create the network configuration and IP addressing for launching tenant instances.
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.
Use the openstack network create command to create a new network.
[user@demo ~(user)]$ openstack network create demonetUse the openstack network set command to modify an existing network.
[user@demo ~(user)]$openstack network set \>--dns-domain example.com demonet
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.
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
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