Managing compute subnets
You can add and delete subnets of physical compute networks. Also, 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.
Limitations
- For an IPv6 subnet, you cannot change the IPv6 address mode.
- A compute network with enabled IP address management must have at least one subnet.
Prerequisites
- Compute networks are created automatically during the compute cluster deployment or manually, as described in Creating physical compute networks and Creating virtual compute networks.
- To authorize further OpenStack commands, the OpenStack command-line client must be configured, as outlined in Connecting to OpenStack command-line interface.
To add a subnet to a physical compute network
- On the Compute > Networks tab, click the desired physical network.
- In the Subnets section, click Add, and then select IPv4 subnet or IPv6 subnet, depending on the available option.
- In the new window, specify the subnet settings, and then click Add.
To add more subnets to a physical compute network
-
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
To delete a subnet from a physical compute network
- On the Compute > Networks tab, click the desired physical network.
-
In the Subnets section, click the bin icon next to the subnet you want to remove.
You cannot delete the only subnet.