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, no aggregated route is created in the BGP routing table.
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 ] *
Parameter | Description | Value |
---|---|---|
ipv4-address | Specifies the IPv4 address of an aggregated route. | The address is in dotted decimal notation. |
mask | Specifies the network mask of an aggregated route. | The mask is in dotted decimal notation. |
mask-length | Specifies the network mask length of an aggregated route. | The value is an integer that ranges from 0 to 32. |
ipv6-address | Specifies the IPv6 address of an 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 the length of the prefix of an aggregated IPv6 route. | The value is an integer that ranges from 0 to 128. |
as-set | Generates a route with the AS-SET. | - |
attribute-policy route-policy-name1 | Specifies the name of an attribute policy for aggregated routes. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
detail-suppressed | Advertises only the aggregated route. | - |
origin-policy route-policy-name2 | Specifies the name of a policy that allows route aggregation. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
suppress-policy route-policy-name3 | Specifies the name of a policy for suppressing the advertisement of specified routes. | The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, and BGP-VPN instance IPv4 address family view.
ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view
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 switch is NULL0. When receiving the summarized route, other switches 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 based on the configured parameter attribute-policy, origin-policy, suppress-policy, as-set, or detail-suppressed. If none of the parameters is not configured, the system will fail to execute the undo aggregate command.