< Home

aggregate (BGP)

Function

The aggregate command creates an aggregated route in the BGP routing table.

The undo aggregate command deletes an aggregated route in the BGP routing table.

By default, the routes are not aggregated.

Format

aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

undo aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

undo aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

Parameters

Parameter Description Value
ipv4-address Specifies the IPv4 address of the aggregated route. It is in dotted decimal notation.
mask Specifies mask of the aggregated route. It is in dotted decimal notation.
mask-length Specifies mask length of the aggregated route. It is an integer ranges from 0 to 32.
as-set Specifies to create a route with the AS-SET. -
attribute-policy route-policy-name1 Specifies the name of the attribute-policy for the aggregated routes. The name must be unique and is a string of 1 to 40 characters. It is case-sensitive.
detail-suppressed Specifies to advertise only the aggregated routes. -
origin-policy route-policy-name2 Specifies the name of the origin-policy that allows generating aggregated routes. The name must be unique and is a string of 1 to 40 characters. It is case-sensitive.
suppress-policy route-policy-name3 Specifies the name of the suppress-policy that suppresses the advertisement of specified routes. The name must be unique and is a string of 1 to 40 characters. It is case-sensitive.
ipv6-address Specifies the IPv6 address of the aggregated route. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
prefix-length Specifies prefix length of the aggregated IPv6 route. It is an integer ranges from 0 to 128.
  • ipv4-address is valid only in BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP route summarization is classified into manual summarization and automatic summarization. The aggregate command can be used to configure manual summarization. This command can summarize routes in the local BGP routing table. Manually-summarized routes take precedence over automatically-summarized routes. The outbound interface of the summarized route on the local router is NULL0. When receiving the summarized route, other routers automatically add the outbound interface.

If the specific member routes of a summarized route have different Origin attributes, the Origin attribute of the summarized route uses the value in the order of incomplete, egp, and igp. The summarized route will carry the community attribute of every specific route.

The aggregate command adds a summarized route to the BGP routing table.

  • The parameter as-set is used to create a summarized route whose AS_Path attribute contains AS_Path information of specific routes. Exercise caution when using this parameter if many AS_Path attributes need to be summarized because frequent changes in routes may cause route flapping.

  • The parameter detail-suppressed is used to suppress the advertisement of specific routes. After detail-suppressed is configured, only summarized routes are advertised. Summarized routes carry the atomic-aggregate attribute, not the community attributes of specific routes.

  • The parameter suppress-policy is used to suppress the advertisement of specified routes. The if-match clause of route-policy can be used to filter the routes to be suppressed. This means that only the routes matching the policy will be suppressed, and the other routes will still be advertised. The peer route-policy command can also be used to filter out the routes not to be advertised to peers.

  • After the parameter origin-policy is used, only the routes matching route-policy are summarized.

  • The parameter attribute-policy is used to set attributes for a summarized route. If the AS_Path attribute is set in the policy using the apply as-path command and as-set is set in the aggregate command, the AS_Path attribute in the policy does not take effect. The peer route-policy command can also be used to set attributes for a summarized route.

Prerequisites

Before the aggregate command is run, BGP must be enabled.

Configuration Impact

Summarized routes are generated after you run the aggregate command. If detail-suppressed is configured in the command, the advertisement of specific routes will be suppressed. If suppress-policy is configured in the command, the advertisement of specific routes that match the policy will be suppressed.

Precautions

If the undo aggregate command is run, the system will match routes base on the configured parameter attribute-policy, origin-policy, suppress-policy, as-set, or detail-suppressed. If the parameter is not configured, the system will fail to execute the undo aggregate command.

Example

# Create an aggregate address. The path that is used to advertise this route is an AS-SET consisting of all aggregated paths.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] aggregate 10.32.0.0 255.255.0.0 as-set
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >