Aggregate routes

更新时间:
复制 MD 格式

When you use a transit router to connect network instances, route entries can accumulate quickly across multiple virtual private clouds (VPCs), virtual border routers (VBRs), and VPN connections — making route tables difficult to manage. The aggregate route feature lets you consolidate multiple specific routes into a single entry. This reduces route table size and eliminates the need to update each network instance separately when routing requirements change.

Limitations

  • Only Enterprise Edition transit routers support aggregate routes. Adding an aggregate route to an Enterprise Edition transit router does not interrupt traffic forwarding.

  • Aggregate routes can be advertised to VPC, VBR, Express Connect Router (ECR), VPN, and inter-region transit router instances.

  • Aggregate routes cannot be aggregated into other aggregate routes. For example, if you add an aggregate route with destination CIDR block 10.0.0.0/16 and another with 10.0.0.0/8, the transit router advertises 10.0.0.0/16 to VPCs even though it is a subnet of 10.0.0.0/8.

  • An aggregate route cannot have the same destination CIDR block as an existing route entry in the transit router route table.

  • Aggregate routes advertised to network instances consume the route quota on instance route tables. For example, each VPC route table supports at most 200 custom routes. To request a quota increase, go to the Quota Management page in the VPC console or the Quota Center console.

  • Aggregate routes do not support AS_PATH aggregation or AS_SET. They do not carry BGP attributes and are equivalent to new route entries originated from the transit router.

  • Each route table of an Enterprise Edition transit router supports a maximum of 20 aggregate routes. This quota is not adjustable.

Add an aggregate route

After you add an aggregate route to a route table of an Enterprise Edition transit router, the transit router advertises it only to VPCs that are connected to the transit router and have route synchronization enabled. Once advertised, specific routes whose destination CIDR blocks fall within the aggregate route's CIDR block are automatically withdrawn from the instance route tables.

Prerequisites

Before you begin, ensure that you have:

Procedure

  1. Log on to the CEN console.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

  4. Click the Route Table tab.

  5. In the left-side section, click the ID of the route table that you want to manage. Click the Aggregate Route tab, then click Add Aggregate Route.

  6. In the Add Aggregate Route dialog box, set the following parameters and click OK.

    ParameterDescription
    NameEnter a name for the aggregate route.
    Destination CIDR blockEnter the destination CIDR block for the aggregate route. For example, enter 10.1.0.0/16 to aggregate more specific routes such as 10.1.0.0/24 and 10.1.1.0/24.
    Route typeSelect the type of aggregate route. Default value: Static. Routes advertised to network instances are custom routes, with the next hops set to the instance connections.
    Destination rangeSelect the instance types to which the aggregate route is advertised. Valid values: VPC, VBR, Inter-region, VPN, ECR. After you add the aggregate route, it is automatically advertised to instances that are in associated forwarding correlation with the Enterprise Edition transit router and have route synchronization enabled.
    Description(Optional) Enter a description for the aggregate route.

After adding the aggregate route:

  • Click Details in the Status column to view the advertisement status and description. If an aggregate route fails to be advertised, fix the issue and re-advertise it. For details, see Re-advertise an aggregate route.

    Aggregate route advertisement details

  • On the Network Routes tab, check the Status column to view the status of specific routes. Specific route advertisement details

Re-advertise an aggregate route

If an aggregate route fails to be advertised — for example, due to insufficient route quotas or route overlapping — fix the issue and manually re-advertise the route.

If the following solutions can fix the issues, the aggregate route is re-advertised automatically without manual action:

  • Deleting associated forwarding correlations

  • Disabling route synchronization

  • Deleting route tables

  • Deleting aggregate routes

Procedure

  1. Log on to the CEN console.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

  4. Click the Route Table tab.

  5. In the left-side section, click the ID of the route table that you want to manage.

  6. Click the Aggregate Route tab, find the aggregate route, and click Re-apply in the Actions column.

Modify an aggregate route

Warning

If the new aggregate route has a smaller destination CIDR block than the existing one, specific routes outside the new CIDR block are re-advertised to instances. Check the route quota on instance route tables before proceeding — if the quota is insufficient, some routes may fail to be advertised and services may be interrupted.

You cannot directly modify an aggregate route's destination CIDR block in the CEN console. Instead, add a new aggregate route with the desired CIDR block, then delete the existing one.

  1. Add an aggregate route with the destination CIDR block you want.

  2. Delete the existing aggregate route.

Behavior when increasing the CIDR block (for example, from /22 to /20): Specific routes whose destination CIDR blocks fall within the new, larger CIDR block are withdrawn from the instances.

Behavior when decreasing the CIDR block (for example, from /20 to /23): Specific routes that fall outside the new, smaller CIDR block are re-advertised to the instances.

Examples

The following examples show how routes change when you resize the destination CIDR block of an aggregate route.

Aggregate route - original CIDR block

Route Table A of an Enterprise Edition transit router is associated with VPC1, VPC2, and VPC3. Route Table A contains routes with destination CIDR blocks 10.0.0.0/21, 10.0.0.0/24, and 10.0.1.0/24. After you add an aggregate route 10.0.0.0/22 and enable route synchronization for VPC1 and VPC2, the routes 10.0.0.0/22 and 10.0.0.0/21 are advertised to VPC1 and VPC2.

Increase the destination CIDR blockAggregate route - larger CIDR block

To increase the destination CIDR block from 10.0.0.0/22 to 10.0.0.0/20: create a new aggregate route 10.0.0.0/20, then delete the existing 10.0.0.0/22 aggregate route.

BeforeAfter
Routes in VPC1 and VPC2 route tables10.0.0.0/22, 10.0.0.0/2110.0.0.0/20 only
Reason10.0.0.0/21 falls within 10.0.0.0/20 and is withdrawn

Decrease the destination CIDR blockAggregate route - smaller CIDR block

To decrease the destination CIDR block from 10.0.0.0/20 to 10.0.0.0/23: create a new aggregate route 10.0.0.0/23, then delete the existing 10.0.0.0/20 aggregate route.

BeforeAfter
Routes in VPC1 and VPC2 route tables10.0.0.0/20 only10.0.0.0/21, 10.0.0.0/23
Reason10.0.0.0/21 falls outside 10.0.0.0/23 and is re-advertised; 10.0.0.0/20 is withdrawn

Modify the target range

Warning

Before narrowing the target range, make sure that the instances you are removing have redundant routes to avoid service interruptions.

After adding an aggregate route, you can expand or narrow its propagation scope by adding or removing instance types from the target range. Valid values: VPC, VBR, Inter-region, VPN, ECR.

  1. Log on to the CEN console.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

  4. Click the Route Table tab.

  5. In the left-side section, click the ID of the route table that you want to manage.

  6. Click the Aggregate Route tab and click Modify in the Actions column.

  7. In the Edit Aggregation Routes dialog box, update the Target Range and click OK.

Delete an aggregate route

Warning

Before deleting an aggregate route, make sure that your network has a redundant route to prevent service interruptions.

After an aggregate route is deleted, it is automatically withdrawn from all instances. Specific routes whose destination CIDR blocks fall within the deleted aggregate route's CIDR block are then re-advertised to the instances.

  1. Log on to the CEN console.

  2. On the Instances page, click the ID of the CEN instance that you want to manage.

  3. Go to the Basic Information > Transit Router tab and click the ID of the transit router that you want to manage.

  4. Click the Route Table tab.

  5. In the left-side section, click the ID of the route table that you want to manage.

  6. Click the Aggregate Route tab, find the route you want to delete, and click Delete in the Actions column.

  7. Confirm the information and click OK.

API reference