aggregate

Use aggregate to create a summary route in the BGP routing table.

Use undo aggregate to remove a summary route.

Syntax

In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view:

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

undo aggregate ipv4-address { mask-length | mask }

In BGP IPv6 unicast address family view/BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:

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

undo aggregate ipv6-address prefix-length

Default

No summary routes are configured.

Views

BGP IPv4 unicast address family view

BGP-VPN IPv4 unicast address family view

BGP IPv6 unicast address family view

BGP-VPN IPv6 unicast address family view

BGP IPv4 multicast address family view

BGP IPv6 multicast address family view

Predefined user roles

network-admin

Parameters

ipv4-address: Specifies an IPv4 summary address.

mask-length: Specifies a mask length for the IPv4 summary address, in the range of 0 to 32.

mask: Specifies a mask for the IPv4 summary address, in dotted decimal notation.

ipv6-address: Specifies an IPv6 summary address.

prefix-length: Specifies a prefix length for the IPv6 summary address, in the range of 0 to 128.

as-set: Enables the AS_PATH attribute of the summary route to contain the AS path information for all summarized routes. The AS_PATH attribute is of the AS_SET type that requires no sequence when arranging AS numbers. If you do not specify this keyword, the AS_PATH attribute of the summary route contains only the AS number of the local router.

attribute-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to set attributes for the summary route.

detail-suppressed: Advertises only the summary route. If you do not specify this keyword, BGP advertises both the summary route and the more specific routes.

origin-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to select routes to be summarized.

suppress-policy route-policy-name: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters, to filter more specific routes to be advertised. Routes permitted by the specified routing policy are not advertised. Routes denied by the specified routing policy are advertised.

Usage guidelines

This command creates a summary route. If the BGP routing table has routes whose destination addresses fall within the specified network, the summary route is added to the BGP routing table. For example, if two routes 10.1.1.0/24 and 10.1.2.0/24 exist in the BGP routing table, configuring the aggregate 10.1.0.0 16 command creates a summary route 10.1.0.0/16.

If the summarized routes have different ORIGIN attributes, the summary route selects the ORIGIN attribute in the sequence of INCOMPLETE, EGP, and IGP. For example, if the ORIGIN attributes of the summarized routes include INCOMPLETE and IGP, the ORIGIN attribute of the summary route is INCOMPLETE.

The COMMUNITY attribute of the summary route includes all the COMMUNITY (or extended community) attribute values if the routes have the following details:

Table 82: Functions of the keywords

Keywords

Function

as-set

Enables the summary route to carry the AS path information for all summarized routes. This feature can help avoid routing loops. However, if many routes are summarized and are changed frequently, do not specify this keyword. This configuration causes the summary route to flap with the more specific routes.

attribute-policy

Sets attributes except the AS-PATH attribute for the summary route. The peer route-policy command can achieve the same purpose.

The attribute-policy and as-set keywords are mutually exclusive when they are used to modify the AS_PATH attribute for the summary route. Modifying the AS_PATH attribute of the summary route might cause routing loops.

detail-suppressed

Disables advertisement of all more specific routes. To disable advertisement of some more specific routes, use the suppress-policy keyword or the peer filter-policy command.

origin-policy

Summarizes only routes matching a routing policy.

If the destination address of a route falls within the summary network but does not match the routing policy, the route is not summarized. It is not controlled by the detail-suppressed and suppress-policy keywords.

There is no need to configure apply clauses for the routing policy applied by the origin-policy keyword because they do not take effect.

suppress-policy

Disables advertisement of some more specific routes filtered by a routing policy. The routing policy uses if-match clauses to filter routes.

There is no need to configure apply clauses for the routing policy applied by the suppress-policy keyword because they do not take effect.

Examples

# In BGP IPv4 unicast address family view, create summary route 1.1.0.0/16 in the BGP routing table.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] aggregate 1.1.0.0 255.255.0.0

Related commands

display bgp routing-table ipv4 multicast

display bgp routing-table ipv4 unicast

display bgp routing-table ipv6 multicast

display bgp routing-table ipv6 unicast

summary automatic