To create a summary
address in a Border Gateway Protocol (BGP) routing table, use the
aggregate-address command. To remove the summary
address, use the
no form of this
command.
aggregate-address address/length [
advertise-map
map-name] [ as-set ] [
attribute-map
map-name] [ summary-only ] [
suppress-map
map-name]
no aggregate-address address/length [
advertise-map
map-name] [ as-set ] [
attribute-map
map-name] [ summary-only ] [
suppress-map
map-name]
Syntax Description
address/length
|
Specifies
aggregate IP address and mask length. Valid values for length are as follows:
- IPv4 addresses from1 to 32
- IPv6 addresses from 1 to 128
|
advertise-map
map-name
|
(Optional)
Specifies the name of the route map used to select attribute information from
specific routes.
|
as-set
|
(Optional)
Generates the autonomous system set path information and community information
from the contributing paths.
|
attribute-map
map-name
|
(Optional)
Specifies the name of the route map used to set the attribute information for
specific routes. The map-name is an alphanumeric string up to 63 characters.
|
summary-only
|
(Optional)
Filters all more-specific routes from updates.
|
suppress-map
map-name
|
(Optional)
Specifies the name of the route map used to conditionally filter more specific
routes. The map-name is an alphanumeric string up to 63 characters.
|
Command Default
The atomic aggregate
attribute is set automatically when an aggregate route is created with this
command unless the
as-set keyword
is specified.
Command Modes
Address-family configuration mode
Neighbor address-family configuration mode
Router BGP configuration mode
Command History
Release
|
Modification
|
Cisco NX-OS
5.0(3)N1(1)
|
This command
was introduced in an earlier Cisco NX-OS release.
|
Cisco NX-OS 6.1(2)I2(2)
|
This command was integrated.
|
Usage Guidelines
You can implement
aggregate routing in BGP and mBGP either by redistributing an aggregate route
into BGP or mBGP, or by using the conditional aggregate routing feature.
Using the
aggregate-address command with no keywords will
create an aggregate entry in the BGP or mBGP routing table if any more-specific
BGP or mBGP routes are available that fall within the specified range. (A
longer prefix which matches the aggregate must exist in the RIB.) The aggregate
route will be advertised as coming from your autonomous system and will have
the atomic aggregate attribute set to show that information might be missing.
(By default, the atomic aggregate attribute is set unless you specify the
as-set
keyword.)
Using the
as-set keyword
creates an aggregate entry using the same rules that the command follows
without this keyword, but the path advertised for this route will be an AS_SET
consisting of all elements contained in all paths that are being summarized. Do
not use this form of the
aggregate-address command when aggregating many
paths, because this route must be continually withdrawn and updated as
autonomous system path reachability information for the summarized routes
changes.
Using the
summary-only
keyword not only creates the aggregate route (for example,
192.*.*.*) but also suppresses advertisements of more-specific routes to all
neighbors. If you want to suppress only advertisements to certain neighbors,
you may use the neighbor distribute-list
command, with caution. If a more-specific route leaks
out, all BGP or mBGP routers will prefer that route over the less-specific
aggregate you are generating (using longest-match routing).
Using the
suppress-map
keyword creates the aggregate route but suppresses advertisement of specified
routes. You can use the match clauses of route maps to selectively suppress
some more-specific routes of the aggregate and leave others unsuppressed. IP
access lists and autonomous system path access lists match clauses are
supported.
Using the
advertise-map
keyword selects specific routes that will be used to build different components
of the aggregate route, such as AS_SET or community. This form of the aggregate-address
command is useful when the components of an aggregate are
in separate autonomous systems and you want to create an aggregate with AS_SET,
and advertise it back to some of the same autonomous systems. You must remember
to omit the specific autonomous system numbers from the AS_SET to prevent the
aggregate from being dropped by the BGP loop detection mechanism at the
receiving router. IP access lists and autonomous system path access lists match
clauses are supported.
Using the
attribute-map
keyword allows attributes of the aggregate route to be changed. This form of
the
aggregate-address
command is useful when one of the routes forming the
AS_SET is configured with an attribute such as the community no-export
attribute, which would prevent the aggregate route from being exported. An
attribute map route map can be created to change the aggregate attributes.
This command
requires the Enterprise Services license.
Examples
AS-Set Example
In This example,
an aggregate BGP address is created in router configuration mode. The path
advertised for this route will be an AS_SET consisting of all elements
contained in all paths that are being summarized.
Device(config)# router bgp 64496
Device(config-router)# aggregate-address 10.0.0.0 255.0.0.0 as-set
Summary-Only
Example
In This example,
an aggregate BGP address is created in address family configuration mode and
applied to the multicast database (SAFI) under the IP Version 4 address family.
Because the
summary-only
keyword is configured, more-specific routes are filtered from updates.
Device(config)# router bgp 64496
Device(config-router)# address-family ipv4 multicast
Device(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 summary-only
Conditional
Aggregation Example
In This example, a
route map called MAP-ONE is created to match on an as-path access list. The
path advertised for this route will be an AS_SET consisting of elements
contained in paths that are matched in the route map.
Device(config)# ip as-path access-list 1 deny ^1234_
Device(config)# ip as-path access-list 1 permit .*
Device(config)# !
Device(config)# route-map MAP-ONE
Device(config-route-map)# match ip as-path 1
Device(config-route-map)# exit
Device(config)# router bgp 64496
Device(config-router)# address-family ipv4
Device(config-router-af)# aggregate-address 10.0.0.0 255.0.0.0 as-set advertise-map MAP-ONE
Device(config-router-af)# end