cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6230
Views
15
Helpful
10
Replies

BGP route aggregation

The_guroo_2
Level 2
Level 2

guys quick one if you have class A address with /24 (around 100 of them and you want to aggregate them as summary only) so we have to advertise the one specific network under BGP config with /24network???? is it true....all the 100 routes are learned from OSPF on WAN router from core.

or we just aggregate the address (just type) under BGP with /16 subnet as i have read some where the one route shd be in routing table (more specific) now the point is that routes are there in routing table or one specific route shd be in BGP table ....secondly does the router install a null0 route automatically whenever agrregation command is used????

10 Replies 10

Jon Marshall
Hall of Fame
Hall of Fame

so we have to advertise the one specific network under BGP config with /24network????

For the aggregate address to work at least one of the subnets contained within the summary address must be in the BGP table, note the BGP table not the IGP table. To do this you can do 1 of 2 things -

1) use a network command for one of the subnets under the router bgp config

or

2) redistribute your IGP (OSPF in your case) into BGP

As for the null route, when you use the aggregate address BGP will automatically create a null0 route for you but you don't have to manually add it.

Jon

lamav
Level 8
Level 8

Jon, you are right that one of the subnets of the aggregate address must be in the BGP table for the aggregate address to be advertised to the BGP neighbor. However, configuring the network statement for one of those subnets under the local BGP configuration does not add an entry into the BGP table, and therefore does not enable the aggregate route.

One way to create an entry into the local BGP table is to create a static route to null 0 and redistribute it into BGP. Then the aggregarte address will be advertised to the neighbor.

The other choice, of course, is to actually have a BGP speaker advertise the subnet to the local router, who will then add it to the local BGP table, and advertise the aggregate.

The last choice is to have the subnet advertised through IGP and redistribute IGP into BGP.

Switch1#
Switch1#sh run | be router bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
aggregate-address 100.100.100.0 255.255.255.0
neighbor 1.1.1.6 remote-as 2
no auto-summary
!
Switch1#sh ip bgp

Switch1#

ADD NETWORK STATEMENT

Switch1#sh run | be router bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
network 100.100.100.0 mask 255.255.255.0
aggregate-address 100.100.100.0 255.255.255.0
neighbor 1.1.1.6 remote-as 2
no auto-summary

Switch1#sh ip bgp

Switch1#

REMOVE NETWORK STATEMENT AND ADD STATIC to Null0 and REDIS STATIC

Switch1#sh run | be router bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
aggregate-address 100.100.100.0 255.255.255.0
redistribute static
neighbor 1.1.1.6 remote-as 2
no auto-summary
!
ip classless
ip route 100.100.100.0 255.255.255.0 Null0

Switch1#sh ip bgp
BGP table version is 6, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 100.100.100.0/24 0.0.0.0                  0         32768 ?
Switch1#

HTH

Victor

I think I may now understand what you meant. Your suggestion was based on the presumtion that the subnet already exists in the route table, correct?

[EDIT If so, it may be worth mentioning that there is an added caveat that the network statement must use the mask keyword and the prefix length must be the exact same as the prefix length of the subnet in the IGP table.

So, if the aggregating router is learning about 100.100.100.100/32 through RIP, and you want to use the network statement to inject the route into the local BGP table, you must use the mask keyword and the prefix length must be the exact same length as the IGP route. [EDIT]

Victor

Hello Victor,

yes the network command has to be used for a component subnet of the aggregate already existing in the IP routing  table.

This is the advantage of the aggregate-address command

About your other notes:

with auto-summary disabled (no auto-summary) the network command requires an exact match in IP routing table so mask option has to be added for a subnet of a major network or it will not be advertised and no major network summary route is created

with auto-summary enabled ( auto-summary) a network command for the major network is enough to have a summary route as specific as the major network generated if a component subnet of the same major network exists in the IP routing table.

Now the default is no auto-summary

Hope to help

Giuseppe

Giuseppe:

Yes, you are absolutely  correct and I know that -- I just thought that maybe Jon was un pazzo and needed some clarification.

Giuseppe

I just thought that maybe Jon was un pazzo and needed some clarification

Knowing what Victor is like i'm guessing "un pazzo" is not the most flattering of comments, could you translate for me then at least i will know how insulting he is being

Jon

Hello Jon,

Victor is showing good knowledge of Italian language (more then BGP and less then OSPF where he is progressing, some of his recent OSPF threads were really in depth)

un pazzo =  crazy man

note: it can have a positive meaning between friends, and knowing Victor's sense of humour this should be the meaning

I jumped into the discussion when I saw that he was trying to use a network command for the aggregate-address.

Instead of admitting his little misunderstanding he tried to involve you in this way....

Compliments for the new super silver star !!!

Best Regards

Giuseppe

Edit:

corrected I had missed a 's  after Victor

Victor

I think I may now understand what you meant. Your suggestion was based on the presumtion that the subnet already exists in the route table, correct?

Yes, if the subnet exists already in the IGP routing table then using the network command under BGP will enter that subnet in the BGP table.

Edit - obviously if the subnet did not exist in the IGP table there would be very little point in using the network statement

Jon

Yes, well, it is obvious, but being that its Saturday night, I wasnt sure if you were totally arseholed or perhaps lost your crackers...

Jon Marshall
Hall of Fame
Hall of Fame

Giuseppe

knowing Victor sense of humour this should be the meaning

You mean Victor has a sense of humour, can't say as i have noticed

Thanks for the translation, not as bad as i thought after all. And thanks for the congrats, takes a lot longer these days for us to change stars

Jon

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco