BGP Aggregate Address Command


The Aggregate address command under BGP allows to the advertisement of a summary address covering a set of routes. It also allows for the manipulation of the attributes of the summary and the suppression of the routes its covering.

Let walk though each of these in turn, we start with 4 routers connected as follows

R1 (5.0.1.0/24 and 5.0.2.0/24) and R3 (5.0.0.0/24, 5.0.3.0/24) are each advertising a set of routes that R2 will aggregate.

*******Send the summary

R2(config-router)#aggregate-address 5.0.0.0 255.255.252.0

When R2 is configured with the above the aggregate 5.0.0.0/22 is sent to the other routers along with all the specifics. BGP unlike other routing protocols has to be told to remove the specifics.

R4(config-if)#do sh ip bgp | be Net
Network          Next Hop            Metric LocPrf Weight Path
*> 5.0.0.0/24       10.1.24.2                              0 2 3 i
*> 5.0.0.0/22       10.1.24.2                0             0 2 i
*> 5.0.2.0/24       10.1.24.2                              0 2 1 i
*> 5.0.3.0/24       10.1.24.2                              0 2 3 i
*> 5.1.0.0/24       10.1.24.2                              0 2 1 i

*******Removing the specific routes

Adding the summary-only key word will have BGP filter all the specifics covered by the aggregate.

R2(config-router)#aggregate-address 5.0.0.0 255.255.252.0 summary-only

R4(config-if)#do sh ip bgp | be Net
Network          Next Hop            Metric LocPrf Weight Path
*> 5.0.0.0/22       10.1.24.2                0             0 2 i
*> 5.1.0.0/24       10.1.24.2                              0 2 1 i

*******Setting AS-Set to remove atomic-aggregate attribute

When we look at the aggregate route on R3 we can see the atomic-aggregate attribute is set

R3(config-router)#do sh ip bgp 5.0.0.0 255.255.252.0
BGP routing table entry for 5.0.0.0/22, version 8
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
2, (aggregated by 2 10.1.24.2)
10.1.23.2 from 10.1.23.2 (10.1.24.2)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best

To remove this the AS-set parameter is used. This uses the attributes of the constituent routes covered by the aggregate and incorporates them in to the aggregate route.

R2(config-router)#aggregate-address 5.0.0.0 255.255.252.0 summary-only as-set

Once done the route disappears from R1 and R3. When we look at the route on R4 we can see why.

R4(config-if)#do sh ip bgp 5.0.0.0 255.255.252.0
BGP routing table entry for 5.0.0.0/22, version 16
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2 {3,1}, (aggregated by 2 10.1.24.2)
10.1.24.2 from 10.1.24.2 (10.1.24.2)
Origin IGP, metric 0, localpref 100, valid, external, best

As we can see from the output on R4 the route now includes in the as-path {3,1}. When the router (R1 or R3) see this loop avoidance kicks in and the aggregate isn’t placed into the BGP table.

R4 still has connectivity to the routes from R1 and R3  however R1 and R3 cant communicate with each other.

*******Restricting the routes used for AS-set

We would like R1 to receive the aggregate to reach R3′s routes. this mean we need to remove R1′s routes from being used in the AS-set command, we achieve this with the advertise-map option.

First we create an ACL with the routes from R3 we want to include in the AS-set, tie it together with a route-map and add it to the aggregate address command.

R2(config)#access-list 3 permit host 5.0.0.0
R2(config)#access-list 3 permit host 5.0.3.0
R2(config)#
R2(config)#route-map as-set-include permit 10
R2(config-route-map)#match ip add 3
R2(config-route-map)#ex
R2(config)#
R2(config)#router bgp 2
R2(config-router)##aggregate-address 5.0.0.0 255.255.252.0 summary-only as-set advertise-map as-set-include

Now when we check on R4 we see the route no longer includes R1′s AS in the as-path and the aggregate now appears on R1.

R4(config-if)#do sh ip bgp 5.0.0.0 255.255.252.0
BGP routing table entry for 5.0.0.0/22, version 31
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2 3, (aggregated by 2 10.1.24.2)
10.1.24.2 from 10.1.24.2 (10.1.24.2)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best

*******Unsuppress map

Now that we have fixed R1 now we need to fix R3. The best way to do this would be to send R3 R1′s 2 specific routes. We achieve this with the unsuppress-map neighbor command.

Create an ACL with the routes to be unsuppresed, tie it together with a route-map and apply it to the neighbor

R2(config)#access-list 1 permit 5.0.1.0
R2(config)#access-list 1 permit 5.0.2.0
R2(config)#
R2(config)#route-map Un-supress-R1 permit 10
R2(config-route-map)#match ip add 1
R2(config-route-map)#
R2(config-route-map)#router bgp 2
R2(config-router)#nei 10.1.23.3 unsuppress-map Un-supress-R1
R2(config-router)#
R2(config-router)#do clear ip bgp * out

Lastly don’t forget to do a “clear ip bgp * out” to apply the policy to the neighbor.

Advertisements

About ccie4all
Hello, and welcome to the first post of my CCIE blog This blog has got one simple goal and that is to improve our skills in Cisco Networking field so we can become best engineers on a job market. Wordpress Blog https://ccie4all.wordpress.com/ information about the changes made to Gns3 BGP , MPLS and R&S CCIE labs. In order to access and download all provided materials and receive important updates from Gns3 BGP , MPLS and R&S CCIE labs under GNS3 tab in the main header please go ahead and subscribe to https://ccie4all.wordpress.com/ ! All other posts have not been affected and can be accessed at any given time. Enjoy ! Tom

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: