Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Router
    • All guides
    • Getting information about a virtual router
    • Getting a list of operations for a virtual router
    • Creating a virtual router
    • Changing the virtual router parameters
    • Managing networks and IP prefixes in a virtual router
    • Adding a private connection to a virtual router
    • Deleting a private connection from a virtual router
    • Deleting a virtual router
    • Cloud Interconnect tutorials
    • All use cases
    • On-premises without redundancy and one cloud network
    • On-premises without redundancy and multiple cloud networks
    • On-premises with redundancy and one cloud network
    • On-premises with redundancy and multiple cloud networks
    • Two separate virtual routers without on-premises redundancy
    • Even redistribution of on-premise traffic (Active-Active)
    • Prioritizing on-premise traffic based on direction (Active-Standby)
    • Reserving an on-premise connection via a VPN gateway (PRC)
    • Prioritizing a static VPC route over routes from PRC
    • Even traffic distribution for route 0.0.0.0/0
    • Prioritizing traffic by direction for route 0.0.0.0/0
    • Connectivity for two cloud networks
    • Connectivity for two cloud networks and on-premises
  • Access management
  • Pricing policy
  • Release notes

In this article:

  • Updating networks and IP prefixes in a virtual router
  • Adding a new cloud network to a virtual router
  • Deleting an existing cloud network from a virtual router
  • Updating IP prefixes of existing cloud networks in a virtual router
  • Adding IP prefixes to a virtual router
  • Deleting IP prefixes from a virtual router
  1. Step-by-step guides
  2. Managing networks and IP prefixes in a virtual router

Managing networks and IP prefixes in a virtual router

Written by
Yandex Cloud
Updated at August 21, 2026
View in Markdown
  • Updating networks and IP prefixes in a virtual router
    • Adding a new cloud network to a virtual router
    • Deleting an existing cloud network from a virtual router
    • Updating IP prefixes of existing cloud networks in a virtual router
  • Adding IP prefixes to a virtual router
  • Deleting IP prefixes from a virtual router

Updating networks and IP prefixes in a virtual routerUpdating networks and IP prefixes in a virtual router

Note

To manage networks and IP prefixes in a routing instance, you need the cloud-router.editor role.

Adding a new cloud network to a virtual routerAdding a new cloud network to a virtual router

Management console
CLI
  1. In the management console, select the folder containing the virtual router.
  2. Navigate to Cloud Router.
  3. In the virtual router row, click and select Edit.
  4. Under Routed networks and prefixes, expand the drop-down list and select the network to add. Use search, if required.
  5. Click Save.

You can use the yc cloudrouter routing-instance update-networks Yandex Cloud CLI command to simultaneously manage multiple announced IP prefixes of Yandex Virtual Private Cloud cloud networks added to a virtual router, as well as add new networks to a virtual router and delete the existing ones.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

  1. View the description of the command for managing networks and IP prefixes in a routing instance:

    yc cloudrouter routing-instance update-networks --help
    
  2. View the list of all routing instances in the folder:

    yc cloudrouter routing-instance list \
      --folder-id <folder_ID>
    

    Where --folder-id is the ID of the folder containing the routing instance.

    Result:

    +----------------------+------+----------+--------------------------------+
    |          ID          | NAME |  STATUS  |     PRIVATE CONNECTION ID      |
    +----------------------+------+----------+--------------------------------+
    | c3lgk007olse******** | ri1  | UPDATING | cf3or586ln29********,          |
    |                      |      |          | cf3uj9uph7b6********           |
    +----------------------+------+----------+--------------------------------+
    
  3. Get information about a routing instance by specifying its ID:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uld********
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
      - vpc_network_id: enpt8ok6snlp********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.45.0/24
                - 192.168.46.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: UPDATING
    created_at: "2025-12-23T07:30:19Z"
    
  4. Add a new network with an announced IP prefix to the virtual router by specifying this network's ID under id in the --add-vpc-net parameter:

    yc cloudrouter routing-instance update-networks \
      --folder-id <folder_ID> \
      --id c3lgk007olse******** \
      --add-vpc-net id=enpvt41bh5gk********,zone=ru-central1-a,ipv4-prefixes=192.168.100.0/24,192.168.101.0/24 \
      --async
    

    Result:

    id: foku4jbrp07i********
    description: routing instance update prefix mask
    created_at: "2025-12-23T08:35:04.852963002Z"
    created_by: ajeol2afu1js********
    modified_at: "2025-12-23T08:35:04.852963002Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.cloudrouter.v1.UpdateRoutingInstanceMetadata
      routing_instance_id: c3lgk007olse********
    

    Where:

    • id: ID of the operation performed with a routing instance.
    • description: Description of the operation in progress.
    • created_by: ID of the subject running the operation.
    • async: Running the operation in asynchronous mode. We recommend using this mode for all operations that modify your resources.
  5. Wait for the operation to complete and make sure the virtual router configuration has been updated:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uldme5e5929
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
      - vpc_network_id: enpt8ok6snlp********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.45.0/24
                - 192.168.46.0/24
      - vpc_network_id: enpvt41bh5gk********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.100.0/24
                - 192.168.101.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: ACTIVE
    created_at: "2025-12-23T08:35:07Z"
    
    • id: Routing instance ID.
    • name: Routing instance name.
    • description: Routing instance description.
    • folder_id: ID of the folder the routing instance was created in.
    • region_id: Region of the cloud the routing instance was created in.
    • vpc_info: List of IP prefixes by availability zone. Prefixes are shown separately for each availability zone.
    • cic_private_connection_info: List of private connections connected to the routing instance.
    • status: Resource state. The target state is ACTIVE. When being updated, it may be in the UPDATING state.
    • created_at: Date and time of resource creation.

Deleting an existing cloud network from a virtual routerDeleting an existing cloud network from a virtual router

Management console
CLI
  1. In the management console, select the folder containing the virtual router.
  2. Navigate to Cloud Router.
  3. Select the virtual router.
  4. Under Routed networks and prefixes, click next to the cloud network and select Delete.
  5. In the window that opens, confirm the deletion.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

  1. View the description of the command for managing networks and IP prefixes in a routing instance:

    yc cloudrouter routing-instance update-networks --help
    
  2. View the list of all routing instances in the folder:

    yc cloudrouter routing-instance list \
      --folder-id <folder_ID>
    

    Where --folder-id is the ID of the folder containing the routing instance.

    Result:

    +----------------------+------+----------+--------------------------------+
    |          ID          | NAME |  STATUS  |     PRIVATE CONNECTION ID      |
    +----------------------+------+----------+--------------------------------+
    | c3lgk007olse******** | ri1  | UPDATING | cf3or586ln29********,          |
    |                      |      |          | cf3uj9uph7b6********           |
    +----------------------+------+----------+--------------------------------+
    
  3. Get information about a routing instance by specifying its ID:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uld********
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
      - vpc_network_id: enpt8ok6snlp********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.45.0/24
                - 192.168.46.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: UPDATING
    created_at: "2025-12-23T07:30:19Z"
    
  4. Delete the existing network from the virtual router:

    yc cloudrouter routing-instance update-networks \
      --folder-id <folder_ID> \
      --id c3lgk007olse******** \
      --delete-vpc-net-id id=enpt8ok6snlp******** \
      --async
    

    Result:

    id: fokg66rcqie1********
    description: routing instance update prefix mask
    created_at: "2025-12-23T08:53:09.626102995Z"
    created_by: ajeol2afu1js********
    modified_at: "2025-12-23T08:53:09.626102995Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.cloudrouter.v1.UpdateRoutingInstanceMetadata
      routing_instance_id: c3lgk007olse********
    

    Where:

    • id: ID of the operation performed with a routing instance.
    • description: Description of the operation in progress.
    • created_by: ID of the subject running the operation.
    • async: Running the operation in asynchronous mode. We recommend using this mode for all operations that modify your resources.
  5. Wait for the operation to complete and make sure the virtual router configuration has been updated:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uldme5e5929
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: ACTIVE
    created_at: "2025-12-23T08:35:07Z"
    
    • id: Routing instance ID.
    • name: Routing instance name.
    • description: Routing instance description.
    • folder_id: ID of the folder the routing instance was created in.
    • region_id: Region of the cloud the routing instance was created in.
    • vpc_info: List of IP prefixes by availability zone. Prefixes are shown separately for each availability zone.
    • cic_private_connection_info: List of private connections connected to the routing instance.
    • status: Resource state. The target state is ACTIVE. When being updated, it may be in the UPDATING state.
    • created_at: Date and time of resource creation.

Updating IP prefixes of existing cloud networks in a virtual routerUpdating IP prefixes of existing cloud networks in a virtual router

Management console
CLI
  1. In the management console, select the folder containing the virtual router.

  2. Navigate to Cloud Router.

  3. Select the virtual router.

  4. Under Routed networks and prefixes, click next to the cloud network and select Edit. In the window that opens:

    1. Mark the subnets you want to update IP prefixes in.
    2. Edit the IP prefixes as appropriate.
    3. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

  1. View the description of the command for managing networks and IP prefixes in a routing instance:

    yc cloudrouter routing-instance update-networks --help
    
  2. View the list of all routing instances in the folder:

    yc cloudrouter routing-instance list \
      --folder-id <folder_ID>
    

    Where --folder-id is the ID of the folder containing the routing instance.

    Result:

    +----------------------+------+----------+--------------------------------+
    |          ID          | NAME |  STATUS  |     PRIVATE CONNECTION ID      |
    +----------------------+------+----------+--------------------------------+
    | c3lgk007olse******** | ri1  | UPDATING | cf3or586ln29********,          |
    |                      |      |          | cf3uj9uph7b6********           |
    +----------------------+------+----------+--------------------------------+
    
  3. Get information about a routing instance by specifying its ID:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uld********
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
      - vpc_network_id: enpt8ok6snlp********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.45.0/24
                - 192.168.46.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: UPDATING
    created_at: "2025-12-23T07:30:19Z"
    
  4. Update the announced IP prefixes in the virtual router:

    yc cloudrouter routing-instance update-networks \
      --folder-id <folder_ID> \
      --id c3lgk007olse******** \
      --update-vpc-net id=enpcfncr6uld********,zone=ru-central1-a,ipv4-prefixes=192.168.2.0/28 \
      --update-vpc-net id=enpcfncr6uld********,zone=ru-central1-b,ipv4-prefixes=192.168.15.0/24 \
      --update-vpc-net id=enpcfncr6uld********,zone=ru-central1-d,ipv4-prefixes=192.168.7.0/24 \
      --update-vpc-net id=enpt8ok6snlp********,zone=ru-central1-d,ipv4-prefixes=192.168.47.0/28 \
      --async
    

    Result:

    id: fokr80vgdskp********
    description: routing instance update prefix mask
    created_at: "2025-12-23T09:56:40.259684884Z"
    created_by: ajeol2afu1js********
    modified_at: "2025-12-23T09:56:40.259684884Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.cloudrouter.v1.UpdateRoutingInstanceMetadata
      routing_instance_id: c3lgk007olse********
    

    Where:

    • id: ID of the operation performed with a routing instance.
    • description: Description of the operation in progress.
    • created_by: ID of the subject running the operation.
    • async: Running the operation in asynchronous mode. We recommend using this mode for all operations that modify your resources.
  5. Wait for the operation to complete and make sure the virtual router configuration has been updated:

    yc cloudrouter routing-instance get c3lgk007olse******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3lgk007olse********
    name: ri1
    description: Routing instance 1
    folder_id: b1gt6g8ht345********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: enpcfncr6uld********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.2.0/28
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 192.168.15.0/24
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 192.168.7.0/24
      - vpc_network_id: enpt8ok6snlp********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 192.168.47.0/28
    cic_private_connection_info:
      - cic_private_connection_id: cf3or586ln29********
      - cic_private_connection_id: cf3uj9uph7b6********
    status: ACTIVE
    created_at: "2025-12-23T10:46:55Z"
    
    • id: Routing instance ID.
    • name: Routing instance name.
    • description: Routing instance description.
    • folder_id: ID of the folder the routing instance was created in.
    • region_id: Region of the cloud the routing instance was created in.
    • vpc_info: List of IP prefixes by availability zone. Prefixes are shown separately for each availability zone.
    • cic_private_connection_info: List of private connections connected to the routing instance.
    • status: Resource state. The target state is ACTIVE. When being updated, it may be in the UPDATING state.
    • created_at: Date and time of resource creation.

Adding IP prefixes to a virtual routerAdding IP prefixes to a virtual router

Management console
CLI
  1. In the management console, select the folder containing the virtual router.

  2. Navigate to Cloud Router.

  3. Select the virtual router.

  4. Under Routed networks and prefixes, click next to the cloud network and select Edit. In the window that opens:

    1. Mark the sections containing the subnets you want to add IP prefixes in.
    2. Enter the IP prefixes as appropriate.
    3. Click Save.

You can use the yc cloudrouter routing-instance upsert-prefixes Yandex Cloud CLI command to announce new IP prefixes in a virtual router.

Tip

If you need to add new IP prefixes to a virtual router while also deleting all or some of its existing prefixes, use the yc cloudrouter routing-instance update-networks command.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

  1. See the description of the CLI command for updating the list of IP prefixes in a virtual router:

    yc cloudrouter routing-instance upsert-prefixes --help
    
  2. View the virtual router configuration and the list of IP prefixes:

    yc cloudrouter routing-instance get c3l871dpin4f******** \
      --folder-id <folder_ID>
    

    Where --folder-id is the ID of the folder containing the virtual router.

    Result:

    id: c3l871dpin4f********
    name: ri1
    description: Routing instance 1
    folder_id: b1gqfjiz2wda********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: c64ckjtr7b3l********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 10.128.0.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3td2nufvr5********
    status: ACTIVE
    created_at: "2025-03-19T13:35:56Z"
    
  3. Add more prefixes to the virtual router IP prefix list:

    Note

    To manage networks and IP prefixes in a routing instance, you need the cloud-router.editor role.

    yc cloudrouter routing-instance upsert-prefixes c3l871dpin4f******** \
      --folder-id <folder_ID> \
      --vpc-net id=c64ckjtr7b3l********,zone=ru-central1-b,ipv4-prefixes=10.129.0.0/24 \
      --vpc-net id=c64ckjtr7b3l********,zone=ru-central1-d,ipv4-prefixes=172.16.1.0/24 \
      --async
    

    Result:

    id: al457njn6pj1********
    description: routing instance upsert prefixes
    created_at: "2025-03-24T15:24:15.817401507Z"
    created_by: bfbudv7dfn22********
    modified_at: "2025-03-24T15:24:15.817401507Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.cloudrouter.v1.UpdateRoutingInstanceMetadata
      routing_instance_id: c3l871dpin4f********
    

    Where:

    • id: ID of the operation performed with a routing instance.
    • description: Description of the operation in progress.
    • created_by: ID of the subject running the operation.
    • async: Running the operation in asynchronous mode. We recommend using this mode for all operations that modify your resources.
  4. Wait for the operation to complete and make sure the virtual router configuration has been updated:

    yc cloudrouter routing-instance get c3l871dpin4f******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3l871dpin4f********
    name: ri1
    description: Routing instance 1
    folder_id: b1gqfjiz2wda********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: c64ckjtr7b3l********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 10.128.0.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 10.129.0.0/24
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 172.16.1.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3td2nufvr5********
    status: ACTIVE
    created_at: "2025-03-19T13:35:56Z"
    

    Where:

    • id: Routing instance ID.
    • name: Routing instance name.
    • description: Routing instance description.
    • folder_id: ID of the folder the routing instance was created in.
    • region_id: Region of the cloud the routing instance was created in.
    • vpc_info: List of IP prefixes by availability zone. Prefixes are shown separately for each availability zone.
    • cic_private_connection_info: List of private connections connected to the routing instance.
    • status: Resource state. The target state is ACTIVE. When being updated, it may be in the UPDATING state.
    • created_at: Date and time of resource creation.

Deleting IP prefixes from a virtual routerDeleting IP prefixes from a virtual router

Management console
CLI
  1. In the management console, select the folder containing the virtual router.

  2. Navigate to Cloud Router.

  3. Select the virtual router.

  4. Under Routed networks and prefixes, click next to the cloud network and select Edit. In the window that opens:

    1. Mark the sections containing the subnets you want to delete IP prefixes from.
    2. Click next to the prefixes you want to delete.
    3. Click Save.

You can use the yc cloudrouter routing-instance remove-prefixes Yandex Cloud CLI command to delete announced IP prefixes from a virtual router.

Tip

If you need to delete existing IP prefixes from a virtual router while also adding new prefixes to it, use the yc cloudrouter routing-instance update-networks command.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

  1. See the description of the CLI command for deleting IP prefixes from a virtual router:

    yc cloudrouter routing-instance remove-prefixes --help
    
  2. View the virtual router configuration and the list of IP prefixes:

    yc cloudrouter routing-instance get c3l871dpin4f******** \
      --folder-id <folder_ID>
    

    Where --folder-id is the ID of the folder containing the virtual router.

    Result:

    id: c3l871dpin4f********
    name: ri1
    description: Routing instance 1
    folder_id: b1gqfjiz2wda********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: c64ckjtr7b3l********
        az_infos:
          - manual_info:
              az_id: ru-central1-a
              prefixes:
                - 10.128.0.0/24
          - manual_info:
              az_id: ru-central1-b
              prefixes:
                - 10.129.0.0/24
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 172.16.1.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3td2nufvr5********
    status: ACTIVE
    created_at: "2025-03-19T13:35:56Z"
    
  3. Delete IP prefixes from the virtual router:

    Note

    To manage networks and IP prefixes in a routing instance, you need the cloud-router.editor role.

    yc cloudrouter routing-instance remove-prefixes c3l871dpin4f******** \
      --folder-id <folder_ID> \
      --vpc-net id=c64ckjtr7b3l********,zone=ru-central1-b,ipv4-prefixes=10.128.0.0/24 \
      --vpc-net id=c64ckjtr7b3l********,zone=ru-central1-d,ipv4-prefixes=10.129.0.0/24 \
      --async
    

    Result:

    id: al457njn6pj1********
    description: routing instance remove prefixes
    created_at: "2025-03-24T15:24:15.817401507Z"
    created_by: bfbudv7dfn22********
    modified_at: "2025-03-24T15:24:15.817401507Z"
    metadata:
      '@type': type.googleapis.com/yandex.cloud.cloudrouter.v1.UpdateRoutingInstanceMetadata
      routing_instance_id: c3l871dpin4f********
    

    Where:

    • id: ID of the operation performed with a routing instance.
    • description: Description of the operation in progress.
    • created_by: ID of the subject running the operation.
    • async: Running the operation in asynchronous mode. We recommend using this mode for all operations that modify your resources.
  4. Wait for the operation to complete and make sure the virtual router configuration has been updated:

    yc cloudrouter routing-instance get c3l871dpin4f******** \
      --folder-id <folder_ID>
    

    Result:

    id: c3l871dpin4f********
    name: ri1
    description: Routing instance 1
    folder_id: b1gqfjiz2wda********
    region_id: ru-central1
    vpc_info:
      - vpc_network_id: c64ckjtr7b3l********
        az_infos:
          - manual_info:
              az_id: ru-central1-d
              prefixes:
                - 172.16.1.0/24
    cic_private_connection_info:
      - cic_private_connection_id: cf3td2nufvr5********
    status: ACTIVE
    created_at: "2025-03-19T13:35:56Z"
    

    Where:

    • id: Routing instance ID.
    • name: Routing instance name.
    • description: Routing instance description.
    • folder_id: ID of the folder the routing instance was created in.
    • region_id: Region of the cloud the routing instance was created in.
    • vpc_info: List of IP prefixes by availability zone. Prefixes are shown separately for each availability zone.
    • cic_private_connection_info: List of private connections connected to the routing instance.
    • status: Resource state. The target state is ACTIVE. When being updated, it may be in the UPDATING state.
    • created_at: Date and time of resource creation.

Was the article helpful?

Previous
Changing the virtual router parameters
Next
Adding a private connection to a virtual router
© 2026 Direct Cursus Technology L.L.C.