An aggregate route is a configured IP route that is activated and installed in the routing table when it has at least one contributing route. A route (R) contributes to an aggregate route (S1) if all of the following conditions are true:
the prefix length of (R) is greater than the prefix length of (S1)
the prefix bits of (R) match the prefix bits of (S1) up to the prefix length of (S1)
there is no other active aggregate route (S2) with a longer prefix length than (S1) that meets the previous two conditions
(R) is actively used for forwarding and is not an aggregate route
(R) is accepted by the route policy that is associated with (S1); if there is no configured route policy then (R1) is by default considered accepted
When an aggregate route is activated by a router, it is not installed in the forwarding table by default. In general though, it is advisable to specify the black-hole next-hop option for an aggregate route, so that when it is activated it is installed in the forwarding table with a black-hole next-hop; this avoids the possibility of creating a routing loop. SR OS also supports the option to program an aggregate route into the forwarding table with an indirect next-hop; in this case, packets matching the aggregate route but not a more-specific contributing route are forwarded toward the indirect next-hop rather than discarded.
An active aggregate route can be advertised to a BGP peer (by exporting it into BGP) and this can avoid the need to advertise the more-specific contributing routes to the peer, reducing the number of routes in the peer AS and improving overall scalability. When a router advertises an aggregate route to a BGP peer the attributes in the route are set as follows.
The ATOMIC_AGGREGATE attribute is included in the route if at least one contributing route has the ATOMIC_AGGREGATE attribute or the aggregate route was formed without the as-set option and at least one contributing route has a non-empty AS_PATH. The ATOMIC_AGGREGATE attribute indicates that some of the AS numbers present in the AS paths of the contributing routes are missing from the advertised AS_PATH.
The AGGREGATOR attribute is added to the route. This attribute encodes, by default, the global AS number (or confederation ID) and router ID (BGP identifier) of the router that formed the aggregate, but these values can be changed on a per aggregate route basis using the aggregator command option. The AS number in the AGGREGATOR attribute is either 2 bytes or 4 bytes (if the 4-octet ASN capability was announced by both peers). The router ID in the aggregate routes advertised to a particular set of peers can be set to 0.0.0.0 using the aggregator-id-zero command.
The BGP next-hop is set to the local-address used with the peer receiving the route regardless of the BGP next-hops of the contributing routes.
The ORIGIN attribute is based on the ORIGIN attributes of the contributing routes as described in RFC 4271.
The information in the AS_PATH attribute depends on the as-set option of the aggregate route.
If the as-set option is not specified the AS_PATH of the aggregate route starts as an empty AS path and has elements added per the description in AS path.
If the as-set option is specified and all the contributing routes have the same AS_PATH then the AS_PATH of the aggregate route starts with that common AS_PATH and has elements added per the description in AS path.
If the as-set option is specified and some of the contributing routes have different AS paths the AS_PATH of the aggregate route starts with an AS_SET and/or an AS_CONFED_SET and then adds elements per the description in AS path.
The COMMUNITY attribute contains all of the communities from all of the contributing routes unless the discard-component-communities option is configured for the aggregate route. It also contains the communities associated directly with the aggregate route itself (up to 12 per aggregate route).
No MED attribute is included by default.