---
title: "Private networks and subnets"
sidebar_label: "Private networks and subnets"
siderbar_position: 3
description: "Automatic private subnet settings, how to create a private network, add a subnet to a private network, and other instructions"
---

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical'
import EditIcon from '@selectel/docux/icons/edit'
import CheckIcon from '@selectel/docux/icons/check'
import CopyIcon from '@selectel/docux/icons/copy'
import TrashIcon from '@selectel/docux/icons/trash'
import ConnectPrivateSubnetToCloudRouter from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/cloud-servers/cloud-networks/connect-private-subnet-to-cloud-router.mdx'
import DisconnectPrivateSubnetFromCloudRouter from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/cloud-servers/cloud-networks/disconnect-private-subnet-from-cloud-router.mdx'
import Formbricks from '@theme/MDXComponents/Formbricks'

# Private networks and subnets

Private networks are L2 network segments. In each private network, at least one private subnet must be created. Private subnets are ranges of private IP addresses at the L3 level, limited by the CIDR size. If devices are in different private subnets of the same private network, they can communicate directly.

Subnets with the same prefixes (masks) can exist within different private networks, but within a single network, subnet prefixes must be unique. By default, private networks and subnets do not have access to or from the internet, and public addressing cannot be used in them.

For private subnets from different networks to communicate, they must be [connected to a single cloud router](#connect-private-subnet-to-cloud-router). To organize L3 network connectivity between devices in different pools (including across different projects and accounts) or between different services, you must [connect private subnets to a global router](#connect-private-network-to-global-router). The addresses of subnets connected to the same router (cloud or global) must not overlap.

In a private network, you can configure [DNS](/cloud-servers/private-dns/) so that devices within it can communicate using domain names instead of IP addresses.

By default, private networks and their subnets can only be used within a single [project](/access-control/projects/about-projects.mdx) and a single [pool](/infrastructure/locations.mdx#pool). You can [configure shared access to the private network](#configure-access-to-private-network) across different projects within the same account.

Private subnets have traffic volume limits—bandwidth. You can view it in the [Bandwidth](/cloud-servers/cloud-networks/about-networks.mdx#bandwidth) table. The default MTU is 1 500 B; you can [change the MTU](#change-mtu-in-private-network) in a private network.

You can work with private subnets and networks in the [control panel](https://my.selectel.ru/vpc/default/networks/), using the [OpenStack CLI](/cloud-servers/tools/openstack-cli/) or [Terraform](/terraform/providers/).

## Automatic private subnet settings \{#default-settings}

Default settings for a private subnet are specified: a default gateway and public DNS servers. If you add a device to an existing subnet, the settings are applied to it automatically. If you have changed the settings of a subnet that already contains devices, you must [update the network settings](/cloud-servers/cloud-networks/update-network-settings.mdx) on all devices in the subnet to apply the changes.

### Default gateway \{#default-gateway}

When creating a private subnet, the first free IP address is reserved for the default gateway. For example, for a subnet with CIDR `192.168.0.0/24`, `192.168.0.1` will be reserved for the gateway. The default gateway can be changed when [creating a subnet](#create-private-network) or [changed after creation](#change-default-gateway-on-private-subnet).

### DNS servers \{#dns-servers}

When you create a private subnet, the public Selectel DNS servers are automatically configured for devices in the subnet. DNS servers can be changed when [creating a subnet](#create-private-network) or [changed after creation](#change-dns-servers-on-private-subnet).

### Static routes

By default, no static routes are specified in subnets. For private subnets, you can [configure static routes](/cloud-servers/cloud-networks/static-routes.mdx#configure-static-routing-on-subnet).

## Create a private network \{#create-private-network}

<Tabs queryString="create-private-network">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [control panel](https://my.selectel.ru/vpc/default/networks/), on the top menu, click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private networks** tab.
    3. Click **Create network**.
    4. Select a [location](/infrastructure/locations.mdx) where the private network will be created.
    5. Enter the network name.
    6. Optional: enter a comment for the network.
    7. Enter the subnet CIDR — the range of IP addresses available in the subnet.
    8. Optional: to change the IP address of the [default gateway](#default-gateway), click <EditIcon />. Enter the value. Click <CheckIcon />.
    9. Optional: to change the [DNS servers](#dns-servers), click <EditIcon />. Enter one to three values. Click <CheckIcon />.
    10. Optional: to enable DHCP, check the **Enable DHCP** box.
    11. Optional: to add another subnet, click **Add Subnet** and repeat steps 7-10.
    12. Click **Create**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. Create a private network:

       ```bash
       openstack network create <network_name>
       ```

       Specify `<network_name>` — the private network name.

    3. [Add a subnet to the private network](#add-subnet-to-private-network).
  </TabItem>
</Tabs>

## Add a subnet to the private network \{#add-subnet-to-private-network}

<Tabs queryString="add-subnet-to-private-network">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the network page → **Subnets** tab.
    4. Click **Create Subnet**.
    5. Enter the subnet CIDR — the range of IP addresses available in the subnet.
    6. Optional: change the IP address of the [default gateway](#default-gateway).
    7. Optional: change the [DNS servers](#dns-servers). Enter one to three values.
    8. Optional: to enable DHCP, check the **Enable DHCP** box.
    9. Click <CheckIcon />.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Create a subnet in the private network:

       ```bash
       openstack subnet create \
         --subnet-range <cidr> \
         [--dhcp  | --no-dhcp] \
         --gateway <gateway> \
         --network <network> \
         <subnet_name>
       ```

       Specify:

       * `<cidr>` — the CIDR of the private subnet, for example, `192.168.0.0/24`;
       * DHCP option:
         * `--dhcp` — enable DHCP;
         * `--no-dhcp` — disable DHCP;
       * `<gateway>` — the IP address of the [default gateway](#default-gateway), for example, `192.168.0.2`;
       * `<network>` — the ID or name of the private network; you can view it using the `openstack network list` command;
       * `<subnet_name>` — the private subnet name.
  </TabItem>
</Tabs>

## Configure access to the private network in different projects \{#configure-access-to-private-network}

By default, a private network can only be used within one [project](/access-control/projects/about-projects.mdx) and one [pool](/infrastructure/locations.mdx#pool). You can configure shared access to a private network across different projects within one account. The network will still only be available within one pool.

The private network will have a **Cross-project** tag. You will only be able to manage the network in the project where the subnet is located.

If you need to combine private networks from different pools (including those in different projects and accounts), [connect the private network to a global router](#connect-private-network-to-global-router).

<Tabs queryString="configure-access-to-private-network">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Copy the ID of the recipient project you want to share the network with. To do this, open the project menu (the current project name) and in the project row, click <CopyIcon />.
    4. Make sure you are in the project where the network is located.
    5. Open the network page → **Projects** tab.
    6. Click **Add Project**.
    7. Paste the ID of the recipient project that you copied in step 3.
    8. Click <CheckIcon />.
  </TabItem>
</Tabs>

## Enable DHCP in a private subnet \{#enable-dhcp-in-private-subnet}

The DHCP protocol can be used for automatic network configuration on devices. It allows devices in a private subnet to automatically receive IP addresses, a subnet mask, a default gateway, DNS server addresses, and static routes. Devices in a subnet with DHCP enabled will automatically request settings from the DHCP server: upon enabling a network interface or when the address lease expires (default is 24 hours).

When DHCP is enabled, two ports for DHCP servers will be created in the subnet: for the primary and backup ones. Two first available IP addresses in the subnet will be reserved for the ports. For example, for a subnet with CIDR `192.168.0.0/24`, `192.168.0.2` and `192.168.0.3`

DHCP in a private subnet can be enabled when [creating a private network](#create-private-network), [adding a subnet to a network](#add-subnet-to-private-network), or for an existing private subnet.

<Tabs queryString="enable-dhcp-in-private-subnet">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the private network page → **Subnets** tab.
    4. In the subnet card, open the **Automatic Network Settings** block.
    5. Turn on the **DHCP Server** toggle.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Enable DHCP in the private subnet:

       ```bash
       openstack subnet set --dhcp <subnet>
       ```

       Specify `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.
  </TabItem>
</Tabs>

## Disable DHCP in a private subnet \{#disable-dhcp-in-private-subnet}

When you disable DHCP in a private subnet, two IP addresses that were reserved for DHCP servers are released.

<Tabs queryString="disable-dhcp-in-private-subnet">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the private network page → **Subnets** tab.
    4. In the subnet card, open the **Automatic Network Settings** block.
    5. Turn off the **DHCP Server** toggle.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Disable DHCP in the private subnet:

       ```bash
       openstack subnet set --no-dhcp <subnet>
       ```

       Specify `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.
  </TabItem>
</Tabs>

## Change the default gateway in a private subnet \{#change-default-gateway-on-private-subnet}

When creating a private subnet, the first available IP address is reserved for the [default gateway](#default-gateway). For example, for a subnet with CIDR `192.168.0.0/24`, `192.168.0.1`.

The default gateway can be changed when [creating a private network](#create-private-network), [adding a subnet to a network](#add-subnet-to-private-network), or for an existing private subnet.

<Tabs queryString="change-default-gateway-on-private-subnet">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the private network page → **Subnets** tab.
    4. In the subnet card, open the **Automatic Network Settings** block.
    5. In the **Subnet Gateway** field, click <EditIcon />.
    6. Enter a new value for the default gateway IP address.
    7. Click <CheckIcon />.
    8. Apply the changes. To do this, [update the network settings on the devices in the subnet](/cloud-servers/cloud-networks/update-network-settings.mdx).
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. Delete the existing pool of allocated IP addresses in the private subnet and add a new pool without the default gateway IP address:

       ```bash
       openstack subnet set \
         --no-allocation-pool \
         --allocation-pool start=<first_pool_ip_address>,end=<last_pool_ip_address> \
         <subnet>
       ```

       Specify:

       * `<first_pool_ip_address>` — the first IP address of the new pool;
       * `<last_pool_ip_address>` — the last IP address of the new pool. You can add several pools — each pool is added using the `--allocation-pool start=<first_pool_ip_address>,end=<last_pool_ip_address>` option;;
       * `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.

    3. Specify a new default gateway IP address:

       ```bash
       openstack subnet set --gateway <gateway> <subnet>
       ```

       Specify `<gateway>` — the IP address of the default gateway, for example, `192.168.0.5`.

       Example of changing the gateway IP address to `192.168.0.5`:

       ```bash
       openstack subnet set \
         --no-allocation-pool \
         --allocation-pool start=192.168.0.1,end=192.168.0.4 \
         --allocation-pool start=192.168.0.6,end=192.168.0.254 \
         --gateway 192.168.0.5 \
         1c6e70ea-db7e-4d2f-bf76-4cab8f0cf52a
       ```

    4. Apply the changes. To do this, [update the network settings on the devices in the subnet](/cloud-servers/cloud-networks/update-network-settings.mdx).
  </TabItem>
</Tabs>

## Change DNS servers in a private subnet \{#change-dns-servers-on-private-subnet}

When a private subnet is created, public [Selectel recursive DNS servers](/infrastructure/dns/dns-recursive-servers-list.mdx) are automatically configured on the devices in the subnet. DNS servers can be changed when [creating a private network](#create-private-network), when [adding a subnet to a network](#add-subnet-to-private-network), or for an existing private subnet.

<Tabs queryString="change-dns-servers-on-private-subnet">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the private network page → **Subnets** tab.
    4. In the subnet card, open the **Automatic Network Settings** block.
    5. In the **DNS Server Addresses** field, click <EditIcon />.
    6. Enter one to three values.
    7. Click <CheckIcon />.
    8. Apply the changes. To do this, [update the network settings on the devices in the subnet](/cloud-servers/cloud-networks/update-network-settings.mdx).
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. If you need to completely replace the list of DNS servers, remove the IP addresses of the specified DNS servers and add new ones:

       ```bash
       openstack subnet set \
         --no-dns-nameservers \
         --dns-nameserver <dns_server> \
         <subnet>
       ```

       Specify:

       * `<dns_server>` — the IP address of the DNS server. You can add several DNS servers — each is added using the `--dns-nameserver <dns_server>` option;;
       * `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.

       Example of changing the default DNS servers to `192.0.2.3` and `192.0.2.4`:

       ```bash
       openstack subnet set \
         --no-dns-nameservers \
         --dns-nameserver 192.0.2.3 \
         --dns-nameserver 192.0.2.4 \
         <subnet>
       ```

    3. If you need to add to the list of DNS servers, add the IP addresses of the new DNS servers:

       ```bash
       openstack subnet set \
         --dns-nameserver <dns_server> \
         <subnet>
       ```

       Specify:

       * `<dns_server>` — the IP address of the DNS server. You can add several DNS servers — each is added using the `--dns-nameserver <dns_server>` option;;
       * `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.

    4. Apply the changes. To do this, [update the network settings on the devices in the subnet](/cloud-servers/cloud-networks/update-network-settings.mdx).
  </TabItem>
</Tabs>

## Connect a subnet to a cloud router \{#connect-private-subnet-to-cloud-router}

For private subnets from different networks to communicate with each other, they must be connected to the same cloud router. Subnets must not overlap — they must not contain identical IP addresses.

To configure internet access for devices in private subnets using a cloud router, use the [Configure internet access](/cloud-servers/cloud-networks/configure-access-to-internet.mdx) guide.

<Tabs queryString="connect-private-subnet-to-cloud-router">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/routers/), in the top menu click **Products** and select **Cloud Servers**.

    2. Go to **Network** → **Private Networks** tab.

    3. Open the network page → **Subnets** tab.

    4. In the subnet card, in the **Cloud Router** field, click **Connect**. If the subnet is already connected to a cloud router, you can [connect it to another cloud router](/cloud-servers/cloud-networks/cloud-routers.mdx#connect-private-subnet-to-cloud-router) via the router card.

    5. Select a cloud router — existing or new.

    6. Optional: if the router will be used for internet access, check the **Connect to internet** box. If the router is already connected to the internet, the box is not displayed.

    7. If you chose to create a new router, configure it:

       7.1. Enter the router name.

       7.2. Optional: enter the router IP address. If you do not specify an IP address, it will be automatically selected from the available addresses in the subnet. The cloud router IP address must match the default gateway of the private subnet. You can view the gateway in the [Control panel](https://my.selectel.ru/vpc/default/networks/): in the top menu, click **Products** → **Cloud Servers** → **Network** → **Private Networks** tab → network page → **Subnets** tab → subnet card → **Automatic Network Settings** block → **Subnet Gateway** field.

    8. Click **Connect**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Connect the subnet to the cloud router:

       ```bash
       openstack router add subnet <router> <subnet>
       ```

       Specify:

       * `<router>` — the ID or name of the cloud router; you can view it using the `openstack router list` command;
       * `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.
  </TabItem>
</Tabs>

## Disconnect a subnet from a cloud router \{#disconnect-private-subnet-from-cloud-router}

<Tabs queryString="disconnect-private-subnet-from-cloud-router">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/routers/), in the top menu click **Products** and select **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. Open the private network page → **Ports** tab. The ports used by cloud routers are marked with the **Router** tag.
    4. In the row of the cloud router port that the subnet is connected to, click <TrashIcon />.
    5. Click **Delete**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).
    2. Disconnect the subnet from the cloud router:

       ```bash
       openstack router remove subnet <router> <subnet>
       ```

       Specify:

       * `<router>` — the ID or name of the cloud router; you can view it using the `openstack router list` command;
       * `<subnet>` — the ID or name of the subnet; you can view it using the `openstack subnet list`
  </TabItem>
</Tabs>

## Connect a private network to a global router \{#connect-private-network-to-global-router}

When you connect a private network to a global router, all subnets belonging to that network will be connected to it. All subnets will communicate at the L3 level.

The private network will have a **Global Router** tag. You will be able to manage the network and subnets connected to the global router only in the global router section in the [Control panel](https://my.selectel.ru/network/localnetwork/l3_list): in the top menu, click **Products** → **Global Router**.

Three service ports for network equipment will be automatically created in the private network.

<Tabs queryString="connect-private-network-to-global-router">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. Verify that subnets in the private network meet the following conditions:

       * belong to the RFC 1918 private address range: `10.0.0.0/8`, `172.16.0.0/12`, or `192.168.0.0/16`;
       * have a size of at least `/29`, as three addresses will be occupied by Selectel network equipment;
       * they do not overlap with other networks and subnets connected to this global router (IP addresses in subnets must not coincide);
       * if a Managed Kubernetes cluster on cloud servers is included in the global router network, the subnet must not overlap with the `10.10.0.0/16`, `10.96.0.0/12`, `10.250.0.0/16`, and `10.251.0.0/24` ranges. If a cluster on dedicated servers is included in the network — with the `10.10.0.0/16`, `10.222.0.0/16`, `10.250.0.0/16`, `10.251.0.0/24`, and `172.250.0.0/14` ranges. These subnets are used for internal Managed Kubernetes addressing; using them may lead to conflicts in the global router network.

    2. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** → **Cloud Servers**.

    3. Go to **Network** → **Private Networks** tab.

    4. In the <MoreVerticalIcon /> network menu, select **Connect to Global Router**.

    5. Select an existing global router or create a new one.

    6. For each subnet, enter the gateway IP address that will be assigned to the global router. Do not assign this address to devices to avoid disrupting network operation.

    7. Optional: change the service IP addresses that are assigned automatically for global router reservation.

    8. Click **Connect**. Do not close the window until the network is connected.
  </TabItem>
</Tabs>

## Disconnect a private network from a global router \{#disconnect-private-network-from-global-router}

<Tabs queryString="disconnect-private-network-from-global-router">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** → **Cloud Servers**.
    2. Go to **Network** → **Private Networks** tab.
    3. In the <MoreVerticalIcon /> network menu, select **Disconnect from Global Router**.
    4. Enter the network name to confirm disconnection.
    5. Click **Disconnect**. Do not close the window until the network is disconnected.
  </TabItem>
</Tabs>

## Change MTU in a private network \{#change-mtu-in-private-network}

When creating a private network, a standard MTU of 1 500 B is set; you can change the MTU.

The [cloud router](/cloud-servers/cloud-networks/cloud-routers.mdx) accepts packets up to 1,500 B, larger packets are dropped. If you set the MTU in the network to more than 1,500 B, you will need to reduce the packet size to 1,500 B when sending traffic from this network to the cloud router. For example, you can use PMTUD for this. The limit does not apply to TCP protocol transmission.

The [Global Router](/global-router/) accepts packets up to 8,500 B.

<Tabs queryString="change-mtu-in-private-network">
  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. Specify a new MTU value in the network:

       ```bash
       openstack network set \
         --mtu <mtu> \
         <network>
       ```

       Specify:

       * `<mtu>` — the new MTU value in bytes; the maximum value is `8500`;
       * `<network>` — the ID or name of the private network; you can view it using the `openstack network list` command.

    3. Apply the changes. To do this, [update the network settings on the devices in the network](/cloud-servers/cloud-networks/update-network-settings.mdx). You can view the list of devices in the network in the [Control panel](https://my.selectel.ru/vpc/default/networks/): in the top menu, click **Products** → **Cloud Servers** → **Network** → **Private Networks** tab → private network page → **Ports** tab.
  </TabItem>
</Tabs>

## View private network metrics \{#view-private-network-metrics}

You can view private network metrics for a cloud server as charts in the Control panel.

If no cloud server is added to the private network, metrics are not collected. To collect network metrics, [add a cloud server to the subnet via a port](/cloud-servers/cloud-networks/ports.mdx#add-cloud-server-to-subnet-via-port).

Values for all metrics are collected every minute. If you have just connected a private network to a cloud server, the first metric values will appear in a few minutes.

1. In the [Control panel](https://my.selectel.ru/vpc/default/images/), in the top menu click **Products** and select **Cloud Servers**.

2. Go to **Network** → **Private Networks** tab.

3. Open the private network page → **Metrics** tab.

4. Optional: filter the metrics:

   3.1. Select a preset range or specify the period for which you need metrics.

   3.2. Select **UTC Time** or **Local Time** for the displayed metric time.

5. View charts for available network metrics:

   * incoming traffic rate in bits per second;
   * outgoing traffic rate in bits per second;
   * incoming traffic rate in packets per second;
   * outgoing traffic rate in packets per second.

## Delete a private subnet \{#delete-private-subnet}

When deleting a private subnet, you must delete all ports in it.

<Tabs queryString="delete-private-subnet">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.

    2. Go to **Network** → **Private Networks** tab.

    3. If the private network card where the subnet is created has a **Global Router** tag, disconnect the network from the global router:

       3.1. In the <MoreVerticalIcon /> network menu, select **Disconnect from Global Router**.

       3.2. Enter the network name to confirm disconnection.

       3.3. Click **Disconnect**. Do not close the window until the network is disconnected.

    4. Delete all subnet ports:

       4.1. Open the network page where the subnet is created → **Ports** tab.

       4.2. In the <MoreVerticalIcon /> subnet port menu, select <TrashIcon /> **Delete Port**.

       4.3. Depending on whether additional actions are required to delete the port, a dialog box will appear:

       * if additional actions are required, a window with a description of the actions will appear. Perform them and return to step 4.1;
       * If no additional actions are required, a deletion confirmation window will appear. Click **Delete**.

       4.4. Repeat steps 4.1–4.3 for each subnet port.

    5. In the top menu, click **Products** and select **Cloud Servers**.

    6. Go to **Network** → **Private Networks** tab.

    7. Open the network page → **Subnets** tab.

    8. In the subnet card, click <TrashIcon />.

    9. Click **Delete**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. Delete each port in the private subnet:

       ```bash
       openstack port delete <port>
       ```

       Specify `<port>` — the ID or name of the port; you can view it using the `openstack port list` command.

    3. Delete the private subnet:

       ```bash
       openstack subnet delete <subnet>
       ```

       Specify `<subnet>` — the ID or name of the private subnet; you can view it using the `openstack subnet list` command.
  </TabItem>
</Tabs>

## Delete a private network \{#delete-private-network}

Together with the network, the subnets created within it will be deleted.

When deleting a private network, you must delete all ports in it.

<Tabs queryString="delete-private-network">
  <TabItem value="panel" default>
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. In the [Control panel](https://my.selectel.ru/vpc/default/networks/), in the top menu click **Products** and select **Cloud Servers**.

    2. Go to **Network** → **Private Networks** tab.

    3. If the network card has a **Global Router** tag, disconnect it from the global router:

       3.1. In the <MoreVerticalIcon /> network menu, select **Disconnect from Global Router**.

       3.2. Enter the network name to confirm disconnection.

       3.3. Click **Disconnect**. Do not close the window until the network is disconnected.

    4. Delete all network ports:

       4.1. Open the network page → **Ports** tab.

       4.2. In the <MoreVerticalIcon /> port menu, select <TrashIcon /> **Delete Port**.

       4.3. Depending on whether additional actions are required to delete the port, a dialog box will appear:

       * if additional actions are required, a window with a description of the actions will appear. Perform them and return to step 4.1;
       * If no additional actions are required, a deletion confirmation window will appear. Click **Delete**.

       4.4. Repeat steps 4.1–4.3 for each network port.

    5. In the top menu, click **Products** and select **Cloud Servers**.

    6. Go to **Network** → **Private Networks** tab.

    7. In the <MoreVerticalIcon /> network menu, select **Delete Network**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/).

    2. Delete all ports in the subnets belonging to the network:

       ```bash
       openstack port delete <port>
       ```

       Specify `<port>` — the ID or name of the port; you can view it using the `openstack port list` command.

    3. Delete the private network:

       ```bash
       openstack network delete <network>
       ```

       Specify `<network>` — the ID or name of the private network; you can view it using the `openstack network list` command.
  </TabItem>
</Tabs>

<Formbricks />
