I have eigrp running between my core switch and my wan router and all my /24 networks in the core are present in the wan router's routing table. Under my bgp config I have individual network statements for each of these /24 networks and then I have a couple aggregate address 172.21.4.0/22 and 172.21.8.0/22 with the summary only keyword. The summarized address appears as a rib failure in the sh ip bgp rib-failure and sh ip bgp peer x.x.x.x advertised-routes output. However, on remote ends the router appears in the routing table of those remote routers. I have a static route pointing to the null interface for each of the summary addresses because I was told you had to have a matching route in your routing table for an aggregate route. I'll be extending this summary address range to 172.21.1.0/20 and was thinking about summarizing eigrp on the uplink interface from my core to the wan router,
int vlan 1
ip summary-address eigrp 100 172.21.1.0 255.255.240.0
Then the only route the wan router would know about for any of the more specific /24s would be known via the summarized /20 route. It was my understanding of BGP that as long as their was an IGP route present, in this case eigrp advertising 172.21.1.0/20, that I could then enter a network 172.21.1.0 mask 255.255.240.0 summary-only under my bgp process without any negative impact. Is this correct and could anyone explain the rib failures I'm getting?
Right, for the BGP aggregate to make it into the RIB, there can't already exist the same route from another protocol with a better AD. You could accomplish this many ways, based upon your network needs, such as having BGP be the only creator of the summary, or fiddling with your administrative distances.
Correct as to the summary, as long as there is a more specific prefix that is a part of the summary existing in the BGP table, there will be no problem creating the aggregate. So, if you have 172.21.1.0/24, BGP would not have a problem creating a 172.21.0.0/20 aggregate, for example.