Listing subnets in the CLI

To list existing subnets, use the openstack subnet list command, as shown in the following screenshot:

By default, the command output provides the ID, name, CIDR notation, and associated networks of each subnet that are available to the user. Users with the admin role may see all subnets, while ordinary users are restricted to subnets within their project or subnets associated with shared networks. The openstack subnet list command also accepts filters that narrow down returned results.

If tags are utilized, the results may be filtered using the following parameters:

  • --tags <tag>: Lists subnets which have all given tag(s)
  • --any-tags <tag>: Lists subnets which have any given tag(s)
  • --not-tags <tag>: Excludes subnets which have all given tag(s)
  • --not-any-tags <tag>: Excludes subnets which have any given tag(s)

Additional details can be found by using the -h or --help options.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset