Configuring multiple subnets in compute networks
If you exhaust all public IP addresses in a physical compute network, you can add more subnets to this network by using the OpenStack command-line tool. The new subnets will be available in the admin and self-service panel for IP address allocation and management.
To create an additional subnet for a compute network, do the following:
-
Connect to the OpenStack command-line interface as a system administrator to authorize further OpenStack commands (refer to Connecting to OpenStack command-line interface).
# kolla-ansible post-deploy
# source /etc/kolla/admin-openrc.sh -
Identify the required network by listing all of the existing networks:
# openstack --insecure network list +-----------------------+---------+--------------------------------------+ | ID | Name | Subnets | +-----------------------+---------+--------------------------------------+ | a1d8d6ae-c89d-4307<…> | public | d52aa9f4-6a4b-4268-a71d-1a50f9b60aa9 | | e31eac69-9ab7-41ad<…> | private | 470526d3-ea5a-48fb-81ac-20273f005f61 | +-----------------------+---------+--------------------------------------+
-
Create a new subnet in the network by using the
openstack subnet create
command. For example:# openstack --insecure subnet create --ip-version 4 --subnet-range 10.164.132.0/24 \ --gateway 10.164.132.1 --dhcp --dns-nameserver 8.8.8.8 --allocation-pool \ start=10.164.132.201,end=10.164.132.212 --network public newsubnet