[Yandex Cloud documentation](../../../index.md) > [Yandex BareMetal](../../index.md) > [Step-by-step guides](../index.md) > Servers > Switching the type of a network connected to a network interface

# Switching the type of a network connected to a network interface

If a server's [network interface](../../concepts/servers.md#network-interfaces) supports connection to both [private](../../concepts/private-network.md) and [public](../../concepts/public-network.md) networks, you can switch between these network types for that interface.

{% note alert %}

When switching the type of a network attached to a network interface, the physical interface remains connected to the same `Leaf`-[level](../../concepts/network.md) switch it was previously connected to. This means that if you replace a public network with a private one on the interface, access to the private network via this interface will be routed through the same switch that handles the public network interfaces of other servers in the same data center rack.

Consequently, if this switch fails or a network attack targets any server in the rack, private network traffic passing through this modified interface may be disrupted or restricted.

This limitation does not apply to servers with [MC-LAG](../../concepts/mc-lag.md) network redundancy.

{% endnote %}

To switch the type of a network connected to a network interface:

{% list tabs group=instructions %}

- 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 server update command:

      ```bash
      yc baremetal server update --help
      ```
  1. Get a list of BareMetal servers in the default folder:

      ```bash
      yc baremetal server list
      ```

      Result:

      ```text
      +----------------------+---------------+---------+-------+---------------------+
      |          ID          |      NAME     | STATUS  | DISKS |     CREATED AT      |
      +----------------------+---------------+---------+-------+---------------------+
      | ly5zeaqeklpg******** | sample-server | RUNNING |       | 2026-05-15 11:46:38 |
      +----------------------+---------------+---------+-------+---------------------+
      ```
  1. Identify the server interface that supports both private and public network connections. The procedure depends on the server configuration type ([ready-made](../../concepts/server-configurations.md) or [custom](../../concepts/server-custom-configurations.md)):

      {% list tabs group=bms_server_type %}

      - Ready-made configuration {#standard}

        1. Get detailed information about your server by specifying its name or ID:

            ```bash
            yc baremetal server get sample-server
            ```

            Result:

            ```yaml
            id: ly5zeaqeklpg********
            ...
            network_interfaces:
              - private_subnet:
                  private_subnet_id: ly5lpb2vydo7********
                private_interface:
                  native_subnet_id: ly5lpb2vydo7********
                  mac_limit: "5"
                id: ly5zjjc2vfpi********
                mac_address: b4:2e:99:58:2b:a6
                configuration_network_interface_id: ly5oc5p4u6vg********
              - private_subnet:
                  private_subnet_id: ly5lpb2vydo7********
                private_interface:
                  native_subnet_id: ly5lpb2vydo7********
                  mac_limit: "5"
                id: ly5mzklkjpa5********
                mac_address: b4:2e:99:58:2b:a8
                configuration_network_interface_id: ly5dmh2u3qwe********
            configuration_id: ly5tdlrmwezt********
            created_at: "2026-05-15T11:46:38.842525Z"
            ```

            As the output shows, your server has two network interfaces, both currently connected to a private network (private subnet `ly5lpb2vydo7********`):

            * Interface `ly5zjjc2vfpi********`, associated with network interface [configuration](../../concepts/server-configurations.md#components) `ly5oc5p4u6vg********`.
            * Interface `ly5mzklkjpa5********`, associated with network interface configuration `ly5dmh2u3qwe********`.

            Server configuration ID (`configuration_id`): `ly5tdlrmwezt********`. Save this value, as you will need it in the next step.
        1. Get details on your server's [configuration](../../concepts/server-configurations.md#components) to determine which of the two interfaces supports both `PRIVATE` and `PUBLIC` network types. To do this, run the following command while specifying the server configuration ID you saved earlier:

            ```bash
            yc baremetal configuration get ly5tdlrmwezt********
            ```

            Result:
            
            ```yaml
            id: ly5tdlrmwezt********
            name: LA-i107-S-1/10G
            memory_gib: "16"
            cpu:
              name: Xeon D-1521
              vendor: Intel
              cores: "8"
              physical_cores: "4"
              frequency_mhz: "2400"
            disk_drives:
              - type: SSD
                disk_count: "2"
                disk_size_gib: "838"
            network_capacity_gbps: "10"
            cpu_num: "1"
            network_interfaces:
            - id: ly5oc5p4u6vg********
              name: iface0
              configuration_id: ly5tdlrmwezt********
              link_speed_gbps: '1'
              available_modes:
              - PRIVATE
            - id: ly5dmh2u3qwe********
              name: iface1
              configuration_id: ly5tdlrmwezt********
              link_speed_gbps: '1'
              available_modes:
              - PUBLIC
              - PRIVATE
            ```

            The output shows that, given the server configuration, the interface with configuration ID `ly5dmh2u3qwe********` supports both `PRIVATE` and `PUBLIC` networks.

            From the earlier `yc baremetal server get` output, this network interface configuration ID (`ly5dmh2u3qwe********`) corresponds to the server's network interface `ly5mzklkjpa5********`. Thus, this is the only interface here that supports network type switching.

      - Custom configuration {#custom}

        1. Get detailed information about your server by specifying its name or ID:

            ```bash
            yc baremetal server get sample-server
            ```

            Result:

            ```yaml
            id: ly5zeaqeklpg********
            ...
            network_interfaces:
              - private_subnet:
                  private_subnet_id: ly5lpb2vydo7********
                private_interface:
                  native_subnet_id: ly5lpb2vydo7********
                  mac_limit: "5"
                id: ly5zjjc2vfpi********
                mac_address: b4:2e:99:58:2b:a6
                configuration_network_interface_id: ly5oc5p4u6vg********
              - private_subnet:
                  private_subnet_id: ly5lpb2vydo7********
                private_interface:
                  native_subnet_id: ly5lpb2vydo7********
                  mac_limit: "5"
                id: ly5mzklkjpa5********
                mac_address: b4:2e:99:58:2b:a8
                configuration_network_interface_id: ly5dmh2u3qwe********
            configuration:
              custom_configuration:
                cpu:
                  cores: "8"
                  frequency_mhz: "2600"
                  name: Xeon E5-2650V2
                  physical_cores: "8"
                  vendor: Intel
                cpu_num: "2"
                disk_drives:
                  - disk_count: "2"
                    disk_size_gib: "3725"
                    type: HDD
                id: ly5x6w3htlgx********
                memory_gib: "128"
                mounting_availability: UNAVAILABLE
                name: custom-ly5x6w3htlgx********
                network_capacity_gbps: "1"
                network_interfaces:
                  - id: ly5oc5p4u6vg********
                    name: iface0
                    configuration_id: ly5x6w3htlgx********
                    link_speed_gbps: '1'
                    available_modes:
                      - PRIVATE
                  - id: ly5dmh2u3qwe********
                    name: iface1
                    configuration_id: ly5x6w3htlgx********
                    link_speed_gbps: '1'
                    available_modes:
                      - PRIVATE
                      - PUBLIC
            created_at: "2026-05-18T07:42:32.835148Z"
            ```

            As you can see in the output:
            * Your server has two network interfaces (see them under `network_interfaces`), both currently connected to a private network (private subnet `ly5lpb2vydo7********`):

                * Interface `ly5zjjc2vfpi********`, associated with network interface [configuration](../../concepts/server-configurations.md#components) `ly5oc5p4u6vg********`.
                * Interface `ly5mzklkjpa5********`, associated with network interface configuration `ly5dmh2u3qwe********`.
            * The network interface [configuration](../../concepts/server-configurations.md#components) (under `configuration.custom_configuration.network_interfaces`) that supports connecting to different network types (`PRIVATE` and `PUBLIC`) has this ID (the `id` field value): `ly5dmh2u3qwe********`.
            * Under `network_interfaces`, network interface configuration `ly5dmh2u3qwe********` is associated (via the `configuration_network_interface_id` field) with the server's network interface `ly5mzklkjpa5********`. Thus, this is the only interface here that supports network type switching.

      {% endlist %}

  1. Get a list of subnets available for connecting to the server's network interface in the default folder:

      {% note warning %}
      
      The server and the private subnets connected to it must belong to the same server [pool](../../concepts/servers.md#server-pools).
      
      {% endnote %}

      {% list tabs group=bms_network_type %}

      - Connecting a public network {#public}

        To connect a network interface to a public network, get a list of available public subnets by running this command:

        ```bash
        yc baremetal public-subnet list
        ```

        Result:

        ```text
        +----------------------+------+---------------+-------------------+
        |          ID          | NAME |    ZONE-ID    | HARDWARE-POOL-IDS |
        +----------------------+------+---------------+-------------------+
        | ly57sgipg23b******** |      | ru-central1-m | ru-central1-m4    |
        +----------------------+------+---------------+-------------------+
        ```

      - Connecting a private network {#private}

        To connect a network interface to a private network, get a list of available private subnets by running this command:

        ```bash
        yc baremetal private-subnet list
        ```

        Result:

        ```text
        +----------------------+----------------------+--------+--------------------------------+
        |          ID          |         NAME         | STATUS |          VRF-OPTIONS           |
        +----------------------+----------------------+--------+--------------------------------+
        | ly5lpb2vydo7******** | m4-subnet            | READY  | vrf_id: ly5xox6z2fyn********,  |
        |                      |                      |        | cidr: 192.168.20.0/24,         |
        |                      |                      |        | gateway_ip: 192.168.20.1       |
        | ly5v3mfr4bm5******** | m3-subnet            | READY  | vrf_id: ly5xox6z2fyn********,  |
        |                      |                      |        | cidr: 192.168.21.0/24,         |
        |                      |                      |        | gateway_ip: 192.168.21.1,      |
        |                      |                      |        | start_ip: 192.168.21.1,        |
        |                      |                      |        | end_ip: 192.168.21.254         |
        +----------------------+----------------------+--------+--------------------------------+
        ```

      {% endlist %}

  1. Update the type of the network connected to the server's interface by specifying the server ID, the IDs of both network interfaces, and the IDs of the subnets to connect to each interface:

      {% note info %}
      
      To change the type of the network connected to a BareMetal server’s network interface, you need the [baremetal.editor](../../security/index.md#baremetal-editor) role or higher.
      
      {% endnote %}

      {% list tabs group=bms_network_type %}

      - Connecting a public network {#public}

        In the example, the network interface that supports switching between network types is connected to a public network, while the settings for the other interface remain unchanged:

        ```bash
        yc baremetal server update \
          --id=ly5zeaqeklpg******** \
          --network-interfaces='id=ly5zjjc2vfpi********,private-subnet-id=ly5lpb2vydo7********' \
          --network-interfaces='id=ly5mzklkjpa5********,public-subnet-id=ly57sgipg23b********' \
          --async
        ```

      - Connecting a private network {#private}

        In the example, the network interface that supports switching between network types is connected to a private network, while the settings for the other interface remain unchanged:

        ```bash
        yc baremetal server update \
          --id=ly5zeaqeklpg******** \
          --network-interfaces='id=ly5zjjc2vfpi********,private-subnet-id=ly5lpb2vydo7********' \
          --network-interfaces='id=ly5mzklkjpa5********,private-subnet-id=ly5lpb2vydo7********' \
          --async
        ```

      {% endlist %}

      Result:

      ```bash
      id: ly5mroq72gok********
      description: Server update
      created_at: "2026-05-18T05:44:28.751844Z"
      created_by: ajeol2afu1js********
      modified_at: "2026-05-18T05:44:28.751844Z"
      metadata:
        '@type': type.googleapis.com/yandex.cloud.baremetal.v1alpha.UpdateServerMetadata
        server_id: ly5zeaqeklpg********
      ```
  1. Wait for the operation to complete (usually about five minutes), then refetch server details to confirm the interface network update:

      ```bash
      yc baremetal server get sample-server
      ```

      Result:

      ```yaml
      id: ly5zeaqeklpg********
      ...
      network_interfaces:
        - private_subnet:
            private_subnet_id: ly5lpb2vydo7********
          private_interface:
            native_subnet_id: ly5lpb2vydo7********
            mac_limit: "5"
          id: ly5zjjc2vfpi********
          mac_address: b4:2e:99:58:2b:a6
          configuration_network_interface_id: ly5oc5p4u6vg********
        - public_subnet:
            public_subnet_id: ly57sgipg23b********
          public_interface:
            ip_address: 185.184.***.***
            native_subnet_id: ly57sgipg23b********
            mac_limit: "5"
          id: ly5mzklkjpa5********
          mac_address: b4:2e:99:58:2b:a8
          ip_address: 185.184.***.***
          configuration_network_interface_id: ly5dmh2u3qwe********
      ...
      ```

- API {#api}

  To use these examples, install [cURL](https://curl.haxx.se) and [get](../../../iam/operations/index.md#authentication) an IAM token for authenticating with the Yandex Cloud [API](../../../api-design-guide/index.md).

  {% note tip %}

  For convenience, consider storing the [IAM token](../../../iam/concepts/authorization/iam-token.md) in an environment variable before sending requests.

  {% endnote %}

  The procedure for switching the network type depends on the server configuration type ([ready-made](../../concepts/server-configurations.md) or [custom](../../concepts/server-custom-configurations.md)):

  {% list tabs group=bms_server_type %}

  - Ready-made configuration {#standard}

    1. Get information about your server by including its [ID](*server_id) in the request:

        ```bash
        curl \
          --request GET \
          --header "Authorization: Bearer <IAM_token>" \
          "https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>"
        ```

        Result:

        ```json
        {
          ...
          "networkInterfaces": [
            {
              "privateSubnet": {
                "privateSubnetId": "ly5lpb2vydo7********"
              },
              "privateInterface": {
                "nativeSubnetId": "ly5lpb2vydo7********",
                "macLimit": "5"
              },
              "id": "ly5zjjc2vfpi********",
              "macAddress": "b4:2e:99:58:2b:a6",
              "configurationNetworkInterfaceId": "ly5oc5p4u6vg********"
            },
            {
              "privateSubnet": {
                "privateSubnetId": "ly5lpb2vydo7********"
              },
              "privateInterface": {
                "nativeSubnetId": "ly5lpb2vydo7********",
                "macLimit": "5"
              },
              "id": "ly5mzklkjpa5********",
              "macAddress": "b4:2e:99:58:2b:a8",
              "configurationNetworkInterfaceId": "ly5dmh2u3qwe********"
            }
          ],
            "id": "ly5zeaqeklpg********",
            "cloudId": "b1gia87mbaom********",
            "folderId": "b1gt6g8ht345********",
            "name": "sample-server",
            "zoneId": "ru-central1-m",
            "hardwarePoolId": "ru-central1-m4",
            "status": "RUNNING",
            "configurationId": "ly5tdlrmwezt********",
            "createdAt": "2026-05-15T11:46:38.842525Z"
        }
        ```

        As the example shows, your server has two network interfaces, both currently connected to a private network (private subnet `ly5lpb2vydo7********`):

        * Interface `ly5zjjc2vfpi********`, associated with network interface [configuration](../../concepts/server-configurations.md#components) `ly5oc5p4u6vg********`.
        * Interface `ly5mzklkjpa5********`, associated with network interface configuration `ly5dmh2u3qwe********`.

        Server configuration ID (`configurationId`): `ly5tdlrmwezt********`. Save this value, as you will need it in the next request.
    1. Get details on your server's [configuration](../../concepts/server-configurations.md#components) to determine which of the two interfaces supports both `PRIVATE` and `PUBLIC` network types. To do this, execute the following request while specifying the server configuration ID you saved earlier:

        ```bash
        curl \
          --request GET \
          --header "Authorization: Bearer <IAM_token>" \
          "https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/configurations/ly5tdlrmwezt********"
        ```

        Result:

        ```json
        {
          "cpu": {
            "name": "Xeon D-1521",
            "vendor": "Intel",
            "cores": "8",
            "physicalCores": "4",
            "frequencyMhz": "2400"
          },
          "diskDrives": [
            {
              "type": "SSD",
              "diskCount": "2",
              "diskSizeGib": "838"
            }
          ],
          "id": "ly5tdlrmwezt********",
          "name": "LA-i107-S-1/10G",
          "memoryGib": "16",
          "networkCapacityGbps": "10",
          "cpuNum": "1",
          "networkInterfaces": [
            {
              "id": "ly5oc5p4u6vg********",
              "name": "iface0",
              "configurationId": "ly5tdlrmwezt********",
              "linkSpeedGbps": "1",
              "availableModes": [
                "PRIVATE"
              ]
            },
            {
              "id": "ly5dmh2u3qwe********",
              "name": "iface1",
              "configurationId": "ly5tdlrmwezt********",
              "linkSpeedGbps": "1",
              "availableModes": [
                "PRIVATE",
                "PUBLIC"
              ]
            }
          ],
          "mountingAvailability": "UNAVAILABLE"
        }
        ```

        The output shows that, given the server configuration, the interface with configuration ID `ly5dmh2u3qwe********` supports both `PRIVATE` and `PUBLIC` networks.

        From the output of your earlier server information request, this network interface configuration ID (`ly5dmh2u3qwe********`) corresponds to the server's network interface `ly5mzklkjpa5********`. Thus, this is the only interface here that supports network type switching.

  - Custom configuration {#custom}

    1. Get information about your server by including its [ID](*server_id) in the request:

        ```bash
        curl \
          --request GET \
          --header "Authorization: Bearer <IAM_token>" \
          "https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>"
        ```

        Result:

        ```json
        {
          ...
          "networkInterfaces": [
            {
              "privateSubnet": {
                "privateSubnetId": "ly5lpb2vydo7********"
              },
              "privateInterface": {
                "nativeSubnetId": "ly5lpb2vydo7********",
                "macLimit": "5"
              },
              "id": "ly5zjjc2vfpi********",
              "macAddress": "b4:2e:99:58:2b:a6",
              "configurationNetworkInterfaceId": "ly5oc5p4u6vg********"
            },
            {
              "privateSubnet": {
                "privateSubnetId": "ly5lpb2vydo7********"
              },
              "privateInterface": {
                "nativeSubnetId": "ly5lpb2vydo7********",
                "macLimit": "5"
              },
              "id": "ly5mzklkjpa5********",
              "macAddress": "b4:2e:99:58:2b:a8",
              "configurationNetworkInterfaceId": "ly5dmh2u3qwe********"
            }
          ],
          "customConfiguration": {
            "id": "ly5vpv5ktwut********",
            "name": "custom-ly5vpv5ktwut********",
            "memoryGib": "128",
            "cpu": {
              "name": "Xeon E5-2650V2",
              "vendor": "Intel",
              "cores": "8",
              "physicalCores": "8",
              "frequencyMhz": "2600"
            },
            "diskDrives": [
              {
                "type": "HDD",
                "diskCount": "2",
                "diskSizeGib": "3725"
              }
            ],
            "cpuNum": "2",
            "networkInterfaces": [
              {
                "id": "ly5oc5p4u6vg********",
                "name": "iface0",
                "configurationId": "ly5vpv5ktwut********",
                "linkSpeedGbps": "1",
                "availableModes": [
                  "PRIVATE"
                ]
              },
              {
                "id": "ly5dmh2u3qwe********",
                "name": "iface1",
                "configurationId": "ly5vpv5ktwut********",
                "linkSpeedGbps": "1",
                "availableModes": [
                  "PRIVATE",
                  "PUBLIC"
                ]
              }
            ],
            "mountingAvailability": "UNAVAILABLE"
          },
          "id": "ly5zeaqeklpg********",
          "cloudId": "b1gia87mbaom********",
          "folderId": "b1gt6g8ht345********",
          "name": "sample-server",
          "zoneId": "ru-central1-m",
          "hardwarePoolId": "ru-central1-m4",
          "status": "RUNNING",
          "createdAt": "2026-05-15T11:46:38.842525Z"
        }
        ```

        As you can see in the output:
        * Your server has two network interfaces (see them under `networkInterfaces`), both currently connected to a private network (private subnet `ly5lpb2vydo7********`):

            * Interface `ly5zjjc2vfpi********`, associated with network interface [configuration](../../concepts/server-configurations.md#components) `ly5oc5p4u6vg********`.
            * Interface `ly5mzklkjpa5********`, associated with network interface configuration `ly5dmh2u3qwe********`.
        * The network interface [configuration](../../concepts/server-configurations.md#components) (under `customConfiguration.networkInterfaces`) that supports connecting to different network types (`PRIVATE` and `PUBLIC`) has this ID (the `id` field value): `ly5dmh2u3qwe********`.
        * Under `networkInterfaces`, network interface configuration `ly5dmh2u3qwe********` is associated (via the `configurationNetworkInterfaceId` field) with the server's network interface `ly5mzklkjpa5********`. Thus, this is the only interface here that supports network type switching.
 
  {% endlist %}

  1. Update the type of the network connected to the server's interface by specifying the server ID, the IDs of both network interfaces, and the IDs of the subnets to connect to each interface:

      {% note info %}
      
      To change the type of the network connected to a BareMetal server’s network interface, you need the [baremetal.editor](../../security/index.md#baremetal-editor) role or higher.
      
      {% endnote %}

      {% list tabs group=bms_network_type %}

      - Connecting a public network {#public}

        In the example, the network interface that supports switching between network types is connected to a public network, while the settings for the other interface remain unchanged.

        Execute the following request specifying the server ID, the IDs of its network interfaces, and those of the desired [subnets](*subnets):

        {% note warning %}
        
        The server and the private subnets connected to it must belong to the same server [pool](../../concepts/servers.md#server-pools).
        
        {% endnote %}

        ```bash
        curl \
          --request PATCH \
          --header "Authorization: Bearer <IAM_token>" \
          "https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>" \
          --data \
                  '''
                  {
                    "updateMask": {
                      "paths": [
                        "network_interfaces"
                      ]
                    },
                    "networkInterfaces": [
                      {
                        "id": "ly5zjjc2vfpi********",
                        "privateInterface": {
                          "nativeSubnetId": "ly5lpb2vydo7********"
                        }
                      },
                      {
                        "id": "ly5mzklkjpa5********",
                        "publicInterface": {
                          "nativeSubnet": {
                            "subnetId": "ly57sgipg23b********"
                          }
                        }
                      }
                    ]
                  }
                  '''
        ```

      - Connecting a private network {#private}

        In the example, the network interface that supports switching between network types is connected to a private network, while the settings for the other interface remain unchanged.

        Execute the following request specifying the server ID, the IDs of its network interfaces, and those of the desired [subnets](*subnets):

        {% note warning %}
        
        The server and the private subnets connected to it must belong to the same server [pool](../../concepts/servers.md#server-pools).
        
        {% endnote %}

        ```bash
        curl \
          --request PATCH \
          --header "Authorization: Bearer <IAM_token>" \
          "https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/servers/<server_ID>" \
          --data \
                  '''
                  {
                    "updateMask": {
                      "paths": [
                        "network_interfaces"
                      ]
                    },
                    "networkInterfaces": [
                      {
                        "id": "ly5zjjc2vfpi********",
                        "privateInterface": {
                          "nativeSubnetId": "ly5lpb2vydo7********"
                        }
                      },
                      {
                        "id": "ly5mzklkjpa55xikrktd",
                        "privateInterface": {
                          "nativeSubnetId": "ly5lpb2vydo7********"
                        }
                      }
                    ]
                  }
                  '''
        ```

      {% endlist %}

      Result:

      ```json
      {
        "done": false,
        "metadata": {
          "@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.UpdateServerMetadata",
          "serverId": "ly5zeaqeklpg********"
        },
        "id": "ly56w27i7ehd********",
        "description": "Server update",
        "createdAt": "2026-05-18T18:28:52.058175Z",
        "createdBy": "ajeol2afu1js********",
        "modifiedAt": "2026-05-18T18:28:52.058175Z"
      }
      ```
  1. Wait for the operation to complete (usually about five minutes), then refetch server details to confirm the interface network update.

{% endlist %}

[*server_id]: You can get the server ID using the [management console](https://console.yandex.cloud) or this [Yandex Cloud CLI](../../../cli/cli-ref/baremetal/cli-ref/server/list.md) command: `yc baremetal server list`.

[*subnets]: * Private subnet IDs are available in the [management console](https://console.yandex.cloud) or via this [Yandex Cloud CLI](../../../cli/cli-ref/baremetal/cli-ref/private-subnet/list.md) command: `yc baremetal private-subnet list`.
* Public subnet IDs are available in the [management console](https://console.yandex.cloud) or via this [Yandex Cloud CLI](../../../cli/cli-ref/baremetal/cli-ref/public-subnet/list.md) command: `yc baremetal public-subnet list`.