[Yandex Cloud documentation](../../index.md) > [Yandex Virtual Private Cloud](../index.md) > [Step-by-step guides](index.md) > Subnet > Viewing a list of used addresses

# Viewing a list of addresses used in a subnet

You can view [internal IP addresses](../concepts/address.md#internal-addresses) that are assigned to cloud resources in your folder.

To view a list of internal addresses used in a subnet:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder containing the subnet.
  1. Navigate to **Virtual Private Cloud**.
  1. In the left-hand panel, select ![subnets](../../_assets/console-icons/nodes-right.svg) **Subnets**.
  1. Click the subnet name.
  1. Navigate to the **IP addresses** tab.

- CLI {#cli}

   If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

   The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

   1. View the description of the CLI command to get a list of addresses in use:

      ```bash
      yc vpc subnet list-used-addresses --help
      ```

   1. Get a list of addresses in the selected subnet:

      ```bash
      yc vpc subnet list-used-addresses --name <subnet_name>
      ```

      Result:

      ```text
      +-----------+------------+---------------------------------------+
      |  ADDRESS  | IP VERSION |              REFERENCES               |
      +-----------+------------+---------------------------------------+
      | 10.1.2.1  | IPV4       | vpc.virtualGateway:                   |
      | 10.1.2.2  | IPV4       | vpc.virtualDns:                       |
      | 10.1.2.3  | IPV4       | compute.instance:epdf6lfsaki9******** |
      | 10.1.2.15 | IPV4       | compute.instance:epdb2hmhj935******** |
      | 10.1.2.28 | IPV4       | managedKubernetes.cluster:            |
      +-----------+------------+---------------------------------------+
      ```

- API {#api}

   Use the [listUsedAddresses](../api-ref/Subnet/listUsedAddresses.md) REST API method for the [Subnet](../api-ref/Subnet/index.md) resource or the [SubnetService/ListUsedAddresses](../api-ref/grpc/Subnet/listUsedAddresses.md) gRPC API call and provide the ID of the subnet you want to update in the `subnetId` request parameter.

   To get the subnet ID, use the [list](../api-ref/Subnet/list.md) REST API method for the [Subnet](../api-ref/Subnet/index.md) resource or the [SubnetService/List](../api-ref/grpc/Subnet/list.md) gRPC API call and provide the folder ID in the `folderId` request parameter.

   To learn how to find out the folder ID, see [Getting the folder ID](../../resource-manager/operations/folder/get-id.md).

{% endlist %}