Table of Contents
Overview
The aggregate-address command for aggregating BGP routes on Cisco routers has many options. The options are divided into two categories.
- What to do with the attributes of the aggregate route
- How to handle pre-aggregation routes
The advertise-map is an option for “what to do with the attributes of the aggregate route”. And it is an option to be used with as-set.
The as-set allows the aggregate route to inherit the attributes of the pre-aggregate route. The AS number and community of “all” pre-aggregation routes will then be inherited by the aggregate route. With advetise-map, only the attributes of a particular pre-aggregate route can be inherited to the aggregate route.
Related article
For more information about inheritance of attributes to aggregate routes by as-set, see the following article.
aggregate-address command : advertise-map
The advertise-map is an option to be used with as-set. The as-set allows the aggregate route to inherit the attributes of the pre-aggregate route. The AS number and community of “all” pre-aggregation routes will then be inherited by the aggregate route. With advetise-map, only the attributes of a particular pre-aggregate route can be inherited to the aggregate route.
The following figure shows how advertise-map allows the aggregate route 192.168.0.0/22 to inherit the attributes of the pre-aggregate routes 192.168.1.0/24 and 192.168.3.0/24.
The advertise-map option must first be configured as-set. Then, a route map is specified. The attributes of the pre-aggregation routes that are permitted in the route-map will be inherited by the aggregate route.
aggregate-address advertise-map
(config)#router bgp <AS>
(config-router)#aggregate-address <network-address> <subnetmask> as-set advertise-map <route-map-name>
<AS>: AS number
<network-address>: Network address of the aggregate route
<subnetmask>: Subnet mask of the aggregate route
<route-map-name>: route-map name
The router configuration in the previous figure is as follows.
advertise-map configuration example
access-list 1 permit 192.168.1.0 access-list 1 permit 192.168.3.0 ! route-map ADV-MAP permit 10 match ip address 1 ! router bgpaggregate-address 192.168.0.0 255.255.252.0 as-set advertise-map ADV-MAP
The route-map specified by the advertise-map option does not require “set” action. The match condition in the route map matches the pre-aggregation routes that you want to inherit.
aggregate-address advertise-map option configuration example
Network diagram and initial configuration
Consider the advertise-map option of aggregate-address on R1 in the following network diagram.
The configurations related to BGP for R1 to R4 before aggregate-address is configured are as follows.
R1 Initial Configuration
On R1, an EBGP neighbor is established with AS2 (R2), AS3 (R3), and AS4 (R4), and 100.1.1.0/24 to 100.1.4.0/24 is advertised with the network command.
R1 Initial Configuration
interface Loopback0 ip address 100.1.2.1 255.255.255.0 secondary ip address 100.1.3.1 255.255.255.0 secondary ip address 100.1.4.1 255.255.255.0 secondary ip address 100.1.1.1 255.255.255.0 ! router bgp 1 network 100.1.1.0 mask 255.255.255.0 network 100.1.2.0 mask 255.255.255.0 network 100.1.3.0 mask 255.255.255.0 network 100.1.4.0 mask 255.255.255.0 neighbor 12.12.12.2 remote-as 2 neighbor 12.12.12.2 send-community neighbor 13.13.13.3 remote-as 3 neighbor 13.13.13.3 send-community neighbor 14.14.14.4 remote-as 4 neighbor 14.14.14.4 send-community ip bgp-community new-format
R2 Initial Configuration
R2 has established EBGP with AS1 (R1) and advertises routes 100.2.1.0/24 through 100.2.4.0/24 with COMMUNITY. The COMMUNITY of each route is as follows.
100.2.1.0/24 2:1000
100.2.2.0/24 2:2000
100.2.3.0/24 2:3000
100.2.4.0/24 2:4000
R2 Initial Configuration
interface Loopback0 ip address 100.2.2.1 255.255.255.0 secondary ip address 100.2.3.1 255.255.255.0 secondary ip address 100.2.4.1 255.255.255.0 secondary ip address 100.2.1.1 255.255.255.0 ! router bgp 2 network 100.2.1.0 mask 255.255.255.0 network 100.2.2.0 mask 255.255.255.0 network 100.2.3.0 mask 255.255.255.0 network 100.2.4.0 mask 255.255.255.0 neighbor 12.12.12.1 remote-as 1 neighbor 12.12.12.1 send-community neighbor 12.12.12.1 route-map COMMUNITY ip bgp-community new-format ! route-map COMMUNITY permit 10 match ip address 1 set community 2:1000 route-map COMMUNITY permit 20 match ip address 2 set community 2:2000 route-map COMMUNITY permit 30 match ip address 3 set community 2:3000 route-map COMMUNITY permit 40 match ip address 4 set community 2:4000 route-map COMMUNITY permit 1000 ! access-list 1 permit 100.2.1.0 access-list 2 permit 100.2.2.0 access-list 3 permit 100.2.3.0 access-list 4 permit 100.2.4.0
R3 Initial Configuration
R3 has established an EBGP neighbor with AS1 (R1) and advertises routes 100.3.1.0/24 through 100.3.4.0/24 with COMMUNITY. The COMMUNITY of each route is as follows
100.3.1.0/24 3:1000
100.3.2.0/24 3:2000
100.3.3.0/24 3:3000
100.3.4.0/24 3:4000
R3 Initial Configuration
interface Loopback0 ip address 100.3.2.1 255.255.255.0 secondary ip address 100.3.3.1 255.255.255.0 secondary ip address 100.3.4.1 255.255.255.0 secondary ip address 100.3.1.1 255.255.255.0 ! router bgp 3 network 100.3.1.0 mask 255.255.255.0 network 100.3.2.0 mask 255.255.255.0 network 100.3.3.0 mask 255.255.255.0 network 100.3.4.0 mask 255.255.255.0 neighbor 13.13.13.1 remote-as 1 neighbor 13.13.13.1 send-community neighbor 13.13.13.1 route-map COMMUNITY ip bgp-community new-format ! route-map COMMUNITY permit 10 match ip address 1 set community 3:1000 route-map COMMUNITY permit 20 match ip address 2 set community 3:2000 route-map COMMUNITY permit 30 match ip address 3 set community 3:3000 route-map COMMUNITY permit 40 match ip address 4 set community 3:4000 route-map COMMUNITY permit 1000 ! access-list 1 permit 100.3.1.0 access-list 2 permit 100.3.2.0 access-list 3 permit 100.3.3.0 access-list 4 permit 100.3.4.0
R4 Initial Configuration
R4 establishes an EBGP neighbor with AS1 (R1).
R4 Initial Configuration
router bgp 4 neighbor 14.14.14.1 remote-as 4 neighbor 14.14.14.1 send-community ip bgp-community new-format
aggregate-address command as-set option
First, add the as-set option to the aggregate-address command on R1. Also, configure summary-only to consider only aggregate route.
R1 aggregate-address as-set
router bgp 1 aggregate-address 100.0.0.0 255.0.0.0 as-set summary-only
Then the aggregate route 100.0.0.0/8 is created and advertised with the AS numbers and communities of all the pre-aggregate routes inherited.
R1 show ip bgp 100.0.0.0
R1#sh ip bgp 100.0.0.0 BGP routing table entry for 100.0.0.0/8, version 27 Paths: (1 available, best #1, table Default-IP-Routing-Table) Flag: 0x820 Advertised to non peer-group peers: 12.12.12.2 13.13.13.3 14.14.14.4 {2,3}, (aggregated by 1 100.1.1.1) 0.0.0.0 from 0.0.0.0 (100.1.1.1) Origin IGP, localpref 100, weight 32768, valid, aggregated, local, best Community: 2:1000 2:2000 2:3000 2:4000 3:1000 3:2000 3:3000 3:4000
advertise-map configuration
aadvertise-map is used to make the aggregate route inherit “only” the attributes of a particular pre-aggregate route. After advertise-map, a route map is specified, and the attributes (AS number, community) of the routes that are permitted in the route map will be inherited by the aggregate route.
Let’s actually use advertise-map. Configure only the attributes of the next route to be inherited from the pre-aggregation routes.
- 100.2.1.0/24 AS-PATH=2,Community=2:1000
- 100.3.3.0/24 AS-PATH=3,Community=3:3000
First, create a route-map to permit the routes above. The name of the route-map is SPECIFIC_ROUTE and the match condition refers to ACL1.
R1 Creating a route-map to be applied with advertise-map
access-list 1 permit 100.2.1.0 access-list 1 permit 100.3.3.0 ! route-map SPECIFIC-ROUTE permit 10 match ip address 1
Then, in BGP configuration mode, add the as-set and advertise-map options to aggregate-address.
R1 Add advertise-map to aggregate-address command
router bgp 1 aggregate-address 100.0.0.0 255.0.0.0 as-set summary-only advertise-map SPECIFIC_ROUTE
This will cause 100.0.0.0/8 to inherit only the AS numbers and communities of 100.2.1.0/24 and 100.3.3.0/24. Let’s verify this with the BGP tables on R1 and R4.
R1 show ip bgp 100.0.0.0
R1#sh ip bgp 100.0.0.0 BGP routing table entry for 100.0.0.0/8, version 28 Paths: (1 available, best #1, table Default-IP-Routing-Table) Flag: 0x820 Advertised to non peer-group peers: 12.12.12.2 13.13.13.3 14.14.14.4 {2,3}, (aggregated by 1 100.1.1.1) 0.0.0.0 from 0.0.0.0 (100.1.1.1) Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best Community: 2:1000 3:3000
R4 show ip bgp 100.0.0.0
R4#sh ip bgp 100.0.0.0 BGP routing table entry for 100.0.0.0/8, version 41 Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 1 {2,3}, (aggregated by 1 100.1.1.1) 14.14.14.1 from 14.14.14.1 (100.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best Community: 2:1000 3:3000
Summary
Points
- advertise-map is an option for “what to do with the attributes of the aggregate route”. Used to make the aggregate route inherit the AS number and COMMUNITY of only particular pre-aggregate route.
- After advertise-map, specify a route-map. Inherits the attributes of the route permitted in the route-map.
How the BGP works
- BGP Basic Configuration and Verification Commands
- BGP Neighbor Status
- BGP Neighbor Authentication
- BGP Well Known Mandatory Attributes
- Illustration: BGP Best Path Selection
- BGP KEEPALIVE timer/Hold time Configuration
- BGP Route Minimum Advertisement Interval Configuration
- BGP Route Dampening
- BGP Route Filter Overview
- BGP Route Filter : distribute-list
- BGP Route Filter : distribute-list Configuration Example
- BGP Route Filter : prefix-list
- BGP Route Filter : prefix-list Configuration Example
- BGP Route Filter : filter-list(AS_PATH ACL)-
- BGP Route Filter : filter-list(AS_PATH ACL) Configuration Example
- BGP Route Filter : Route-map
- BGP Route Filter : route-map Configuration Example
- BGP neighbor allowas-in command
- BGP neighbor as-override command
- BGP Route RIB Failure
- BGP Route Administrative Distance Adjustment
- BGP Route Load Balancing
- BGP Auto Summary
- BGP Route Summary : network command
- BGP Route Summarization : network command configuration example
- BGP Route Summary aggregate-address command
- aggregte-address command : summary-only opiton
- aggregte-address command : attribute-map opiton
- aggregte-address command : as-set opiton
- aggregte-address command : advertise-map opiton
- BGP Selective Aggregation Overview
- BGP Selective Aggregation : suppress-map
- BGP Selective Aggregation : unsuppress-map
- BGP local-as
- BGP neighbor remove-private-AS
- bgp fast-external-fallover
- BGP Prefix Limitation