Quotas and limits

This document lists the quotas and limits that apply to Cloud Router.

To change a quota, see requesting additional quota.

A quota restricts how much of a shared Google Cloud resource your Google Cloud project can use, including hardware, software, and network components. Therefore, quotas are a part of a system that does the following:

  • Monitors your use or consumption of Google Cloud products and services.
  • Restricts your consumption of those resources, for reasons that include ensuring fairness and reducing spikes in usage.
  • Maintains configurations that automatically enforce prescribed restrictions.
  • Provides a means to request or make changes to the quota.

In most cases, when a quota is exceeded, the system immediately blocks access to the relevant Google resource, and the task that you're trying to perform fails. In most cases, quotas apply to each Google Cloud project and are shared across all applications and IP addresses that use that Google Cloud project.

There are also limits on Cloud Router resources. These limits are unrelated to the quota system. Limits cannot be changed unless otherwise stated.

Quotas

This table covers important quotas per project. For other quotas, see the Google Cloud console Quotas page.

Item Quota Notes
Cloud Routers per project Quota Regardless of quota, each network is limited to five Cloud Routers per region. See Limits.

Limits

The following limits for Cloud Router apply to Virtual Private Cloud (VPC) networks. Unless otherwise stated, these limits cannot be increased.

Item Limit Notes
Maximum number of Cloud Routers per combination of VPC network and region 5 If you have sufficient project quota, you can create up to five Cloud Routers in a given VPC network and region.
Maximum number of BGP peers for each Cloud Router in a given VPC network and region 128 The BGP peer can be a Cloud VPN tunnel using dynamic routing or a VLAN attachment for Dedicated Interconnect or Partner Interconnect.
For a given Cloud Router, maximum number of subnet route advertisements per BGP session No restriction Cloud Routers do not have a limit for the number of subnet routes they can advertise. The number of subnet routes are determined by the number of subnets, which are controlled by VPC network quotas and limits.
For a given Cloud Router, maximum number of custom advertised routes per BGP session 200 If the custom advertised routes are identical for all BGP sessions on a Cloud Router, this limit represents the total number of unique IPv4 and IPv6 custom advertised routes for the Cloud Router. In this case, each session receives the same set of custom advertised routes.
Maximum number of assured unique destinations for learned routes that can be applied to subnets in a given region by all Cloud Routers in the same region. This limit is referred to as a region's from-own-region limit. 250

For both limits on the maximum assured number of unique destinations for learned routes:

Both IPv4 and IPv6 prefixes count toward each limit.

All learned routes count toward this limit, including custom learned routes and routes learned from a BGP peer.

Routes are grouped by unique destinations. Routes with identical destinations but different next hops only count as a single destination. Routes with identical destinations and identical next hops also only count as a single destination.

For networks in global dynamic routing mode, it is possible to reach one of the maximum number of unique destination limits without reaching the other. When either of the limits has been reached, you can experience intermittent connectivity issues when the routes are dropped. For details, see the learned route example.

For more information about these limits, including metrics that you can use to understand your current limits and usage, see Check quotas and limits in Troubleshooting.

If you need to increase either of these limits, file a support case.

Only applicable to VPC networks in global dynamic routing mode.

Maximum number of assured unique destinations for learned routes that can be applied to subnets in a given region by Cloud Routers from different regions. This limit is referred to as a region's from-other-regions limit.

250
For a given BGP session, the maximum number of custom learned routes 10

For more information about this feature, see Custom learned routes.

For a given region in a VPC network, the maximum number of unique IP prefixes that can be configured as custom learned routes; this limit allows for the same ranges to be used on multiple peers

10

Learned route example

The following examples illustrate the route dropping behavior that you can encounter when the from-own-region limit or the from-other-regions limit is exceeded.

Suppose you have Cloud Routers in the us-east1 region and Cloud Routers in the us-west1 region in the same VPC network, and global dynamic routing is enabled. Each Cloud Router in each region learns 250 unique destinations. For illustrative purposes of this example, each Cloud Router in each region doesn't learn any of the same destinations.

Regardless of which Cloud Routers learn the routes within each region, each region's from-own-region limit is exhausted because 250 of 250 unique destinations are learned by the Cloud Routers in each region. The from-other-regions limits for both regions are also exhausted because each Cloud Router imports 250 unique destinations from the other region. If the example VPC network used regional dynamic routing, the from-other-regions limits in each region would not apply because regional dynamic routing mode instructs the VPC network to only create dynamic routes in the region that matches the route's next hop.

Exceeding a region's from-own-region limit

Suppose your on-premises router that's connected to a Cloud Router in us-west1 advertises a 251st destination. Cloud Routers in the us-west1 region pick 250 of the 251 unique destinations following a deterministic route order. These routers send those 250 unique destinations to the VPC network, creating 250 dynamic routes in the us-west1 region.

Because the VPC network uses global dynamic routing mode, it also creates no more than 250 dynamic routes in every other region, subject to each other region's from-other-regions unique destination limit. The next section describes what happens in other regions in more detail.

Exceeding a region's from-other-regions limit

When 251 unique destinations are learned by Cloud Routers in the us-west1 region, 250 of the 251 unique destinations from us-west1 are made available to resources in the us-east1 region because the us-east1 region's from-other-regions limit can only accept 250 unique destinations.

Suppose that you create a Cloud Router in a third region, us-central1, in the same VPC network. Suppose that the new Cloud Router learns 10 unique destinations from its BGP peer. Although the us-central1 region's from-own-region limit has not been exceeded, the us-central1 region's from-other-regions unique destination limit has been exceeded because a total of 500 unique destinations are provided by the other two regions (250 from us-east1 and a different 250 from us-west1).

On a region-by-region basis, the deterministic route order selects routes for no more than 250 unique destinations in other regions, as indicated in the following table.

Region Unique destinations local to the region
(usage of region's from-own-region limit)
Unique destinations from other regions
(usage of region's from-other-regions limit)
us-west1

251 received. 250 of the 251 are selected, and one of the 251 is dropped by the deterministic route order. 250 dynamic routes with next hops in us-west1 are created in us-west1.

The 250 selected prefixes are shared with other regions.

260 received (250 from us-east1, 10 from us-central1). 250 of the 260 are selected, and 10 of the 260 are dropped by the deterministic route order.

250 dynamic routes with next hops outside of us-west1 are created in us-west1.

us-east1

250 received. All 250 are selected by the deterministic route order. 250 dynamic routes with next hops in us-east1 are created in us-east1.

All 250 selected prefixes are shared with other regions.

260 received (250 from us-west1, 10 from us-central1). 250 of the 260 are selected, and 10 of the 260 are dropped by the deterministic route order.

250 dynamic routes with next hops outside of us-east1 are created in us-east1.

us-central1

10 received. All 10 are selected by the deterministic route order. 10 dynamic routes with next hops in us-central1 are created in us-central1.

All 10 selected prefixes are shared with other regions.

500 received (250 from us-west1, 250 from us-east1). 250 of the 500 are selected, and 250 of the 500 are dropped by the deterministic route order.

250 dynamic routes with next hops outside of us-central1 are created in us-central1.

Although the us-central1 region's from-other-regions limit is exceeded, its from-own-region limit can accept destinations whose next hops are in the us-central1 region.

Deterministic route dropping behavior

Cloud Router implements a deterministic route dropping behavior based on the subnet mask length and lexicographic characteristics of each prefix received. Within each region, the following process applies independently to the region's from-own-region destinations list and the region's from-other-regions unique destinations list:

  • The list is sorted first from shortest to longest subnet mask length, then lexicographically. For example, 10.0.0.0/8 comes before 10.2.1.0/24, which comes before 10.99.1.0/24.

  • The first 250 entries in the list are preserved. All others are discarded.

As shown in exceeding a region's from-other-regions limit, the deterministic dropping behavior is applied independently to each region's from-own-region limit and each region's from-other-regions limit.

The deterministic route dropping behavior has the following consequences:

  • When IPv4 and IPv6 prefixes are both received, Cloud Router generally discards IPv6 prefixes first whenever a unique destination limit is exceeded. This happens because the most common shortest subnet mask length for IPv6 (/48) is longer than the longest possible subnet mask length for IPv4 (/32).

  • If the set of prefixes learned in each region remains constant, Google Cloud programs a consistent set of local dynamic routes in every region, subject to the dynamic routing mode of the VPC network. This consistency, including which routes are dropped by Cloud Router, is preserved when Cloud Router tasks restart.

Avoiding route dropping

During route dropping, you lose connectivity for the prefixes that are dropped. To avoid route dropping, monitor each region's from-own-region and from-other-regions prefix usage by using Cloud Monitoring or Cloud Logging, and make sure not to advertise more unique destinations than each limit.

Consider aggregating prefixes (for example, by aggregating prefixes into a prefix of smaller length) to reduce the number of unique destinations. If aggregating prefixes isn't possible, contact your Google Cloud Sales team to discuss alternative options.

Managing quotas

Cloud Router enforces quotas on resource usage for various reasons. For example, quotas protect the community of Google Cloud users by preventing unforeseen spikes in usage. Quotas also help users who are exploring Google Cloud with the free tier to stay within their trial.

All projects start with the same quotas, which you can change by requesting additional quota. Some quotas may increase automatically based on your use of a product.

Permissions

To view quotas or request quota increases, Identity and Access Management (IAM) principals need one of the following roles.

Task Required role
Check quotas for a project One of the following:
Modify quotas, request additional quota One of the following:
  • Project Owner (roles/owner)
  • Project Editor (roles/editor)
  • Quota Administrator (roles/servicemanagement.quotaAdmin)
  • A custom role with the serviceusage.quotas.update permission

Checking your quota

Console

  1. In the Google Cloud console, go to the Quotas page.

    Go to Quotas

  2. To search for the quota that you want to update, use the Filter table. If you don't know the name of the quota, use the links on this page instead.

gcloud

Using the Google Cloud CLI, run the following command to check your quotas. Replace PROJECT_ID with your own project ID.

      gcloud compute project-info describe --project PROJECT_ID
    

To check your used quota in a region, run the following command:

      gcloud compute regions describe example-region
    

Errors when exceeding your quota

If you exceed a quota with a gcloud command, gcloud outputs a quota exceeded error message and returns with the exit code 1.

If you exceed a quota with an API request, Google Cloud returns the following HTTP status code: HTTP 413 Request Entity Too Large.

Requesting additional quota

To increase or decrease most quotas, use the Google Cloud console. For more information, see Request a higher quota.

Console

  1. In the Google Cloud console, go to the Quotas page.

    Go to Quotas

  2. On the Quotas page, select the quotas that you want to change.
  3. At the top of the page, click Edit quotas.
  4. Fill out your name, email, and phone number, and then click Next.
  5. Fill in your quota request, and then click Done.
  6. Submit your request. Quota requests take 24 to 48 hours to process.

Resource availability

Each quota represents a maximum number for a particular type of resource that you can create, if that resource is available. It's important to note that quotas do not guarantee resource availability. Even if you have available quota, you can't create a new resource if it is not available.

For example, you might have sufficient quota to create a new regional, external IP address in the us-central1 region. However, that is not possible if there are no available external IP addresses in that region. Zonal resource availability can also affect your ability to create a new resource.

Situations where resources are unavailable in an entire region are rare. However, resources within a zone can be depleted from time to time, typically without impact to the service level agreement (SLA) for the type of resource. For more information, review the relevant SLA for the resource.