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:

  1. 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/
  2. 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 |
  3. 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 \
    --gateway --dhcp --dns-nameserver --allocation-pool \
    start=,end= --network public newsubnet