openstack Verified current stable Not installed? Networking

Openstack / List Subnets Associated With Network

List Subnets Associated With Network

Lists all subnets associated with a specific network.

$
Terminal
openstack subnet list --network <network_id_or_name>

When To Use

When needing to analyze subnetting within a particular network context.

Pro Tip

Use `--format csv` for compatibility with spreadsheet applications.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
openstack subnet list --network <network_id_or_name>

Anatomy of Output

Understanding the result

+---------------------------------------+-------------------+----------+--------+ Table Header

Defines the boundaries of the associated subnet listing.

| Subnet ID | Name | CIDR | Status | Column Names

Indicates the fields returned for each associated subnet.

| 2345efgh-6789-90ab-cdef-0123456789 | Subnet1 | 10.1.1.0/24 | ACTIVE | Subnet Entry

Example of a listed subnet associated with the network.

Troubleshooting

Common pitfalls

Error: No subnets associated with network: network-name.

Solution: Ensure subnets are created and associated with the network.

Error: Permission denied for listing subnets of the network.

Solution: Check role permissions for the currently authenticated user.

Error: Unable to contact the network service.

Solution: Ensure the OpenStack network service is operational.

Command Breakdown

What each part is doing

openstack
Base Command
The executable that performs this operation. Here it runs Openstack before the shell applies any redirect operators.
<network_id_or_name>
network id or name
The value supplied for network id or name.
--network
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative networking tools for the same job.